Skip to content

Sana-sprint pipeline failing on MPS #11342

@bertaveira

Description

@bertaveira

Describe the bug

I noticed that if I run the SanaSprintPipeline on MPS the output is totally broken. Running on CPU works fine.

Reproduction

from diffusers.pipelines.sana.pipeline_sana_sprint import SanaSprintPipeline

pipeline = SanaSprintPipeline.from_pretrained("Efficient-Large-Model/Sana_Sprint_0.6B_1024px_diffusers")
pipeline.to("mps")

prompt = "a tiny astronaut hatching from an egg on the moon"
image = pipeline(prompt=prompt).images[0]
image.show()

The output I get is this:

Image

Just by removing the pipeline.to("mps") it generates a good image:

Image

Logs

System Info

Macbook M2 Pro 32GB RAM

  • 🤗 Diffusers version: 0.33.0.dev0
  • Platform: macOS-14.7.4-arm64-arm-64bit
  • Running on Google Colab?: No
  • Python version: 3.12.8
  • PyTorch version (GPU?): 2.6.0 (False)
  • Flax version (CPU?/GPU?/TPU?): not installed (NA)
  • Jax version: not installed
  • JaxLib version: not installed
  • Huggingface_hub version: 0.29.3
  • Transformers version: 4.49.0
  • Accelerate version: 1.5.2
  • PEFT version: 0.15.0
  • Bitsandbytes version: not installed
  • Safetensors version: 0.5.3
  • xFormers version: not installed
  • Accelerator: Apple M2 Pro
  • Using GPU in script?: yes?
  • Using distributed or parallel set-up in script?: No

Who can help?

@yiyixuxu @DN6

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