5/18/2023 0 Comments Metal capable gpu mac proM1/M2 performance is very sensitive to memory pressure. Image = pipe(prompt).images Performance Recommendations # Results match those from the CPU device after the warmup pass. Prompt = "a photo of an astronaut riding a horse on mars" # First-time "warmup" pass (see explanation above) # Recommended if your computer has < 64 GB of RAM Pipe = om_pretrained( "runwayml/stable-diffusion-v1-5") You only need to do this pass once, and it’s ok to use just one inference step and discard the result.Ĭopied # make sure you're logged in with `huggingface-cli login` from diffusers import StableDiffusionPipeline This is a temporary workaround for a weird issue we have detected: the first inference pass produces slightly different results than subsequent ones. We recommend to “prime” the pipeline using an additional one-time pass through it. The snippet below demonstrates how to use the mps backend using the familiar to() interface to move the Stable Diffusion pipeline to your M1 or M2 device. You can install it with pip or conda using the instructions in. macOS 12.6 or later (13.0 or later recommended).Mac computer with Apple silicon (M1/M2) hardware.These are the steps you need to follow to use your M1 or M2 computer with Stable Diffusion. □ Diffusers is compatible with Apple silicon for Stable Diffusion inference, using the PyTorch mps device. How to use Stable Diffusion in Apple Silicon (M1/M2)
0 Comments
Leave a Reply. |