Skip to content

VAE not work,when use StableDiffusionPipeline.from_single_file #4194

@zhaoyun0071

Description

@zhaoyun0071

Describe the bug

pipe = StableDiffusionPipeline.from_single_file("xx.safetensors",
                                                torch_dtype=torch.float16, load_safety_checker=False, controlnet=False,vae=AutoencoderKL.from_pretrained("stabilityai/sd-vae-ft-mse",torch_dtype=torch.float16).to("cuda")
                                                ).to("cuda")

**above code ,vae not work!! pictures use same seed with or without vae have no difference

but bellow work ,hahhaaaaa**

pipe = StableDiffusionPipeline.from_single_file("xx.safetensors",
                                                torch_dtype=torch.float16, load_safety_checker=False, controlnet=False
                                                ).to("cuda")
pipe.vae=AutoencoderKL.from_pretrained("stabilityai/sd-vae-ft-mse",torch_dtype=torch.float16).to("cuda")

Reproduction

above code

Logs

No response

System Info

diffusers-0.19.0.dev0 6b1abba

Who can help?

@patrickvonplaten, @sayakpaul, and @williamberman

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