Skip to content

enable_vae_tiling is not found SD image to image and inpaint pipeline #6870

Description

@MrSyee

Describe the bug

I tried to use vae_tiling in StableDiffusionImg2ImgPipeline and StableDiffusionInpaintPipeline, but the function was not defined. This option is probably needed to save memory when generating large images.

I noticed that it is enabled for StableDiffusionPipeline and ControlNet Pipeline. Is there any other reason why you didn't apply it to Img2Img?
If there are no major issues, I'd like to see it applied and I'll try to create a PR.

Thank you!

Reproduction

importtorchfromdiffusersimportAutoPipelineForImage2Imagepipe=AutoPipelineForImage2Image.from_pretrained(
"runwayml/stable-diffusion-v1-5",
torch_dtype=torch.float16,
use_safetensors=True,
).to("cuda")
pipe.enable_vae_tiling()

Logs

Loading pipeline components...: 0%|| 0/7 [00:00<?, ?it/s]`text_config_dict` is provided which will be used to initialize `CLIPTextConfig`. The value `text_config["id2label"]` will be overriden.
`text_config_dict` is provided which will be used to initialize `CLIPTextConfig`. The value `text_config["bos_token_id"]` will be overriden.
`text_config_dict` is provided which will be used to initialize `CLIPTextConfig`. The value `text_config["eos_token_id"]` will be overriden.
Loading pipeline components...: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 7/7 [00:12<00:00, 1.82s/it]
Traceback (most recent call last):
File "/home/khwankim_dc/workspace/project/sea_drawing/test.py", line 9, in<module>pipe.enable_vae_tiling()
File "/home/khwankim_dc/.pyenv/versions/project/lib/python3.10/site-packages/diffusers/configuration_utils.py", line 138, in __getattr__
raise AttributeError(f"'{type(self).__name__}' object has no attribute '{name}'")
AttributeError: 'StableDiffusionImg2ImgPipeline' object has no attribute 'enable_vae_tiling'

System Info

  • diffusers version: 0.24.0
  • Platform: Linux-5.4.0-65-generic-x86_64-with-glibc2.31
  • Python version: 3.10.13
  • PyTorch version (GPU?): 2.0.1+cu117 (True)
  • Huggingface_hub version: 0.20.3
  • Transformers version: 4.35.2
  • Accelerate version: 0.24.1
  • xFormers version: not installed
  • Using GPU in script?:
  • Using distributed or parallel set-up in script?:

Who can help?

@yiyixuxu@DN6@sayakpaul@patrickvonplaten

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions