When I use
with torch.autocast("cuda"):
images = pipe(...)
the output is noise
Reproduction
import torch
from diffusers import PixArtAlphaPipeline
pipe = PixArtAlphaPipeline.from_pretrained("PixArt-alpha/PixArt-XL-2-1024-MS", torch_dtype=torch.float16)
pipe.enable_model_cpu_offload()
prompt = "A small cactus with a happy face in the Sahara desert."
with torch.autocast("cuda"):
image = pipe(prompt).images[0]
Describe the bug
When I use with torch.autocast("cuda"): images = pipe(...)
the output is noise![validation_0_fe0c3de4f9a024ad739f](https://github.com/huggingface/diffusers/assets/61224076/0529f04e-7e04-499a-b6ef-26e32b4bf033)
Reproduction
import torch from diffusers import PixArtAlphaPipeline
pipe = PixArtAlphaPipeline.from_pretrained("PixArt-alpha/PixArt-XL-2-1024-MS", torch_dtype=torch.float16) pipe.enable_model_cpu_offload() prompt = "A small cactus with a happy face in the Sahara desert."
with torch.autocast("cuda"): image = pipe(prompt).images[0]
Logs
No response
System Info
master
Who can help?
No response