Skip to content

Commit 5307ae2

Browse files
committed
update
1 parent 799cf8d commit 5307ae2

File tree

9 files changed

+16
-3
lines changed

9 files changed

+16
-3
lines changed

src/diffusers/pipelines/aura_flow/pipeline_aura_flow.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
from ...schedulers import FlowMatchEulerDiscreteScheduler
2525
from ...utils import (
2626
USE_PEFT_BACKEND,
27+
deprecate,
2728
is_torch_xla_available,
2829
logging,
2930
replace_example_docstring,
@@ -405,6 +406,7 @@ def prepare_latents(
405406

406407
# Copied from diffusers.pipelines.stable_diffusion_xl.pipeline_stable_diffusion_xl.StableDiffusionXLPipeline.upcast_vae
407408
def upcast_vae(self):
409+
deprecate("upcast_vae", "1.0.0", "`upcast_vae` is deprecated. Please use `pipe.vae.to(torch.float32)`")
408410
self.vae.to(dtype=torch.float32)
409411

410412
@property

src/diffusers/pipelines/kolors/pipeline_kolors.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from ...loaders import IPAdapterMixin, StableDiffusionLoraLoaderMixin
2323
from ...models import AutoencoderKL, ImageProjection, UNet2DConditionModel
2424
from ...schedulers import KarrasDiffusionSchedulers
25-
from ...utils import is_torch_xla_available, logging, replace_example_docstring
25+
from ...utils import deprecate, is_torch_xla_available, logging, replace_example_docstring
2626
from ...utils.torch_utils import randn_tensor
2727
from ..pipeline_utils import DiffusionPipeline, StableDiffusionMixin
2828
from .pipeline_output import KolorsPipelineOutput
@@ -579,6 +579,7 @@ def _get_add_time_ids(
579579

580580
# Copied from diffusers.pipelines.stable_diffusion_xl.pipeline_stable_diffusion_xl.StableDiffusionXLPipeline.upcast_vae
581581
def upcast_vae(self):
582+
deprecate("upcast_vae", "1.0.0", "`upcast_vae` is deprecated. Please use `pipe.vae.to(torch.float32)`")
582583
self.vae.to(dtype=torch.float32)
583584

584585
# Copied from diffusers.pipelines.latent_consistency_models.pipeline_latent_consistency_text2img.LatentConsistencyModelPipeline.get_guidance_scale_embedding

src/diffusers/pipelines/kolors/pipeline_kolors_img2img.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
from ...loaders import IPAdapterMixin, StableDiffusionXLLoraLoaderMixin
2424
from ...models import AutoencoderKL, ImageProjection, UNet2DConditionModel
2525
from ...schedulers import KarrasDiffusionSchedulers
26-
from ...utils import is_torch_xla_available, logging, replace_example_docstring
26+
from ...utils import deprecate, is_torch_xla_available, logging, replace_example_docstring
2727
from ...utils.torch_utils import empty_device_cache, randn_tensor
2828
from ..pipeline_utils import DiffusionPipeline, StableDiffusionMixin
2929
from .pipeline_output import KolorsPipelineOutput
@@ -707,6 +707,7 @@ def _get_add_time_ids(
707707

708708
# Copied from diffusers.pipelines.stable_diffusion_xl.pipeline_stable_diffusion_xl.StableDiffusionXLPipeline.upcast_vae
709709
def upcast_vae(self):
710+
deprecate("upcast_vae", "1.0.0", "`upcast_vae` is deprecated. Please use `pipe.vae.to(torch.float32)`")
710711
self.vae.to(dtype=torch.float32)
711712

712713
# Copied from diffusers.pipelines.latent_consistency_models.pipeline_latent_consistency_text2img.LatentConsistencyModelPipeline.get_guidance_scale_embedding

src/diffusers/pipelines/pag/pipeline_pag_kolors.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from ...loaders import IPAdapterMixin, StableDiffusionXLLoraLoaderMixin
2323
from ...models import AutoencoderKL, ImageProjection, UNet2DConditionModel
2424
from ...schedulers import KarrasDiffusionSchedulers
25-
from ...utils import is_torch_xla_available, logging, replace_example_docstring
25+
from ...utils import deprecate, is_torch_xla_available, logging, replace_example_docstring
2626
from ...utils.torch_utils import randn_tensor
2727
from ..kolors.pipeline_output import KolorsPipelineOutput
2828
from ..kolors.text_encoder import ChatGLMModel
@@ -597,6 +597,7 @@ def _get_add_time_ids(
597597

598598
# Copied from diffusers.pipelines.stable_diffusion_xl.pipeline_stable_diffusion_xl.StableDiffusionXLPipeline.upcast_vae
599599
def upcast_vae(self):
600+
deprecate("upcast_vae", "1.0.0", "`upcast_vae` is deprecated. Please use `pipe.vae.to(torch.float32)`")
600601
self.vae.to(dtype=torch.float32)
601602

602603
# Copied from diffusers.pipelines.latent_consistency_models.pipeline_latent_consistency_text2img.LatentConsistencyModelPipeline.get_guidance_scale_embedding

src/diffusers/pipelines/pag/pipeline_pag_sd_xl.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
from ...schedulers import KarrasDiffusionSchedulers
3737
from ...utils import (
3838
USE_PEFT_BACKEND,
39+
deprecate,
3940
is_invisible_watermark_available,
4041
is_torch_xla_available,
4142
logging,
@@ -757,6 +758,7 @@ def _get_add_time_ids(
757758

758759
# Copied from diffusers.pipelines.stable_diffusion_xl.pipeline_stable_diffusion_xl.StableDiffusionXLPipeline.upcast_vae
759760
def upcast_vae(self):
761+
deprecate("upcast_vae", "1.0.0", "`upcast_vae` is deprecated. Please use `pipe.vae.to(torch.float32)`")
760762
self.vae.to(dtype=torch.float32)
761763

762764
# Copied from diffusers.pipelines.latent_consistency_models.pipeline_latent_consistency_text2img.LatentConsistencyModelPipeline.get_guidance_scale_embedding

src/diffusers/pipelines/stable_diffusion_k_diffusion/pipeline_stable_diffusion_xl_k_diffusion.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
from ...schedulers import KarrasDiffusionSchedulers, LMSDiscreteScheduler
3838
from ...utils import (
3939
USE_PEFT_BACKEND,
40+
deprecate,
4041
logging,
4142
replace_example_docstring,
4243
scale_lora_layers,
@@ -540,6 +541,7 @@ def _get_add_time_ids(
540541

541542
# Copied from diffusers.pipelines.stable_diffusion_xl.pipeline_stable_diffusion_xl.StableDiffusionXLPipeline.upcast_vae
542543
def upcast_vae(self):
544+
deprecate("upcast_vae", "1.0.0", "`upcast_vae` is deprecated. Please use `pipe.vae.to(torch.float32)`")
543545
self.vae.to(dtype=torch.float32)
544546

545547
@property

src/diffusers/pipelines/stable_diffusion_xl/pipeline_stable_diffusion_xl.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -745,6 +745,7 @@ def _get_add_time_ids(
745745
return add_time_ids
746746

747747
def upcast_vae(self):
748+
deprecate("upcast_vae", "1.0.0", "`upcast_vae` is deprecated. Please use `pipe.vae.to(torch.float32)`")
748749
self.vae.to(dtype=torch.float32)
749750

750751
# Copied from diffusers.pipelines.latent_consistency_models.pipeline_latent_consistency_text2img.LatentConsistencyModelPipeline.get_guidance_scale_embedding

src/diffusers/pipelines/stable_diffusion_xl/pipeline_stable_diffusion_xl_instruct_pix2pix.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -585,6 +585,7 @@ def _get_add_time_ids(
585585

586586
# Copied from diffusers.pipelines.stable_diffusion_xl.pipeline_stable_diffusion_xl.StableDiffusionXLPipeline.upcast_vae
587587
def upcast_vae(self):
588+
deprecate("upcast_vae", "1.0.0", "`upcast_vae` is deprecated. Please use `pipe.vae.to(torch.float32)`")
588589
self.vae.to(dtype=torch.float32)
589590

590591
@torch.no_grad()

src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_zero_sdxl.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
from ...utils import (
2525
USE_PEFT_BACKEND,
2626
BaseOutput,
27+
deprecate,
2728
is_invisible_watermark_available,
2829
logging,
2930
scale_lora_layers,
@@ -452,6 +453,7 @@ def prepare_extra_step_kwargs(self, generator, eta):
452453

453454
# Copied from diffusers.pipelines.stable_diffusion_xl.pipeline_stable_diffusion_xl.StableDiffusionXLPipeline.upcast_vae
454455
def upcast_vae(self):
456+
deprecate("upcast_vae", "1.0.0", "`upcast_vae` is deprecated. Please use `pipe.vae.to(torch.float32)`")
455457
self.vae.to(dtype=torch.float32)
456458

457459
# Copied from diffusers.pipelines.stable_diffusion_xl.pipeline_stable_diffusion_xl.StableDiffusionXLPipeline._get_add_time_ids

0 commit comments

Comments
 (0)