You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enable sliced VAE decoding. When this option is enabled, the VAE will split the input tensor in slices to
422
-
compute decoding in several steps. This is useful to save some memory and allow larger batch sizes.
423
-
"""
424
-
depr_message=f"Calling `enable_vae_slicing()` on a `{self.__class__.__name__}` is deprecated and this method will be removed in a future version. Please use `pipe.vae.enable_slicing()`."
425
-
deprecate(
426
-
"enable_vae_slicing",
427
-
"0.40.0",
428
-
depr_message,
429
-
)
430
-
self.vae.enable_slicing()
431
-
432
-
defdisable_vae_slicing(self):
433
-
r"""
434
-
Disable sliced VAE decoding. If `enable_vae_slicing` was previously enabled, this method will go back to
435
-
computing decoding in one step.
436
-
"""
437
-
depr_message=f"Calling `disable_vae_slicing()` on a `{self.__class__.__name__}` is deprecated and this method will be removed in a future version. Please use `pipe.vae.disable_slicing()`."
438
-
deprecate(
439
-
"disable_vae_slicing",
440
-
"0.40.0",
441
-
depr_message,
442
-
)
443
-
self.vae.disable_slicing()
444
-
445
-
defenable_vae_tiling(self):
446
-
r"""
447
-
Enable tiled VAE decoding. When this option is enabled, the VAE will split the input tensor into tiles to
448
-
compute decoding and encoding in several steps. This is useful for saving a large amount of memory and to allow
449
-
processing larger images.
450
-
"""
451
-
depr_message=f"Calling `enable_vae_tiling()` on a `{self.__class__.__name__}` is deprecated and this method will be removed in a future version. Please use `pipe.vae.enable_tiling()`."
452
-
deprecate(
453
-
"enable_vae_tiling",
454
-
"0.40.0",
455
-
depr_message,
456
-
)
457
-
self.vae.enable_tiling()
458
-
459
-
defdisable_vae_tiling(self):
460
-
r"""
461
-
Disable tiled VAE decoding. If `enable_vae_tiling` was previously enabled, this method will go back to
462
-
computing decoding in one step.
463
-
"""
464
-
depr_message=f"Calling `disable_vae_tiling()` on a `{self.__class__.__name__}` is deprecated and this method will be removed in a future version. Please use `pipe.vae.disable_tiling()`."
465
-
deprecate(
466
-
"disable_vae_tiling",
467
-
"0.40.0",
468
-
depr_message,
469
-
)
470
-
self.vae.disable_tiling()
471
-
472
424
defprepare_latents(
473
425
self,
474
426
image,
@@ -560,8 +512,6 @@ def __call__(
560
512
prompt: Union[str, List[str]] =None,
561
513
negative_prompt: Union[str, List[str]] =None,
562
514
true_cfg_scale: float=4.0,
563
-
height: Optional[int] =None,
564
-
width: Optional[int] =None,
565
515
layers: Optional[int] =4,
566
516
num_inference_steps: int=50,
567
517
sigmas: Optional[List[float]] =None,
@@ -607,10 +557,6 @@ def __call__(
607
557
enabled by setting `true_cfg_scale > 1` and a provided `negative_prompt`. Higher guidance scale
608
558
encourages to generate images that are closely linked to the text `prompt`, usually at the expense of
609
559
lower image quality.
610
-
height (`int`, *optional*, defaults to self.unet.config.sample_size * self.vae_scale_factor):
611
-
The height in pixels of the generated image. This is set to 1024 by default for the best results.
612
-
width (`int`, *optional*, defaults to self.unet.config.sample_size * self.vae_scale_factor):
613
-
The width in pixels of the generated image. This is set to 1024 by default for the best results.
614
560
num_inference_steps (`int`, *optional*, defaults to 50):
615
561
The number of denoising steps. More denoising steps usually lead to a higher quality image at the
616
562
expense of slower inference.
@@ -663,7 +609,7 @@ def __call__(
663
609
will be passed as `callback_kwargs` argument. You will only be able to include variables listed in the
664
610
`._callback_tensor_inputs` attribute of your pipeline class.
665
611
max_sequence_length (`int` defaults to 512): Maximum sequence length to use with the `prompt`.
666
-
resolution (`int`, *optional*, defaults to 640)
612
+
resolution (`int`, *optional*, defaults to 640):
667
613
using different bucket in (640, 1024) to determin the condition and output resolution
668
614
cfg_normalize (`bool`, *optional*, defaults to `False`)
0 commit comments