-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sana broke on MacOS. Grey images on MPS, NaN's on CPU. #10334
Comments
Hello @Vargol. Just to understand this better, did it "break", or did it never work? |
It's the first time I've tried it, so technically it never worked. |
import torch
from diffusers import SanaPipeline
pipe = SanaPipeline.from_pretrained(
"Efficient-Large-Model/Sana_1600M_1024px_BF16_diffusers",
variant="bf16",
torch_dtype=torch.bfloat16,
)
pipe.to("mps")
pipe.vae.to(torch.bfloat16)
pipe.text_encoder.to(torch.bfloat16)
prompt = 'Self-portrait oil painting, a beautiful cyborg with golden hair, 8k'
image = pipe(prompt=prompt)[0]
image[0].save("sana.png") Try this BF16 version model, pls. @Vargol |
@Vargol Just curious, what is the max unified memory usage for the above? |
I haven't used any fancy memory monitor things but Activity monitor was reporting 18.4Gb Memory usage during iteration peaking at 20Gb I assume during the decode. After the run was complete and python had return I was running at 8.Gb. EDIT: Just ran another run, and the python binary was reported at 10.43Gb during iteration and 12.98G Gb during the decode. |
Describe the bug
Just started to play with Sana, was excited when I saw it was coming to Diffusers as the NVIDIA supplied code was full of CUDA only stuff.
Ran the example code, changing cuda to mps and got a grey image.
Removed the move to MPS to run it on the CPU and the script failed with
that suggests the latents had NaN's on the CPU.
Reproduction
removed
pipe.to("mps")
to run on the CPU.Logs
System Info
Who can help?
@pcuenca
The text was updated successfully, but these errors were encountered: