RePaintPipeline always returns black image when pipe.to("mps") is called
See original GitHub issueDescribe the bug
When I try to do the inpainting with RePaintPipeline on the MPS backend it only returns black image. It works fine with CPU, but very slow.
Reproduction
scheduler = RePaintScheduler.from_config("google/ddpm-ema-celebahq-256")
pipe = RePaintPipeline.from_pretrained("google/ddpm-ema-celebahq-256", scheduler=scheduler)
device = torch.device("mps")
pipe = pipe.to(device)
def inpaint(image, mask):
output = pipe(
original_image=image,
mask_image=mask,
num_inference_steps=20,
eta=0.0,
jump_length=1,
jump_n_sample=2,
return_dict=False,
)
print(output)
image.paste(output[0][0], (x, y))
return np.array(image)
Logs
No response
System Info
diffusers
version: 0.7.2- Platform: macOS-12.6-arm64-arm-64bit
- Python version: 3.9.12
- PyTorch version (GPU?): 1.13.0.dev20221002 (False)
- Huggingface_hub version: 0.10.0
- Transformers version: 4.24.0
- Using GPU in script?: yes
- Using distributed or parallel set-up in script?: no
Issue Analytics
- State:
- Created 10 months ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Why does StableDiffusionPipeline return black images when ...
When I try to generate 1 image from 1 prompt, the output looks fine, but when I try to generate multiple images using...
Read more >Releases · huggingface/diffusers - GitHub
Diffusers: State-of-the-art diffusion models for image and audio generation in ... Ensure Flax pipeline always returns numpy array by @pcuenca in #1435 ...
Read more >patrickvonplaten - PullAnswer
diffusers 0.5.1 crashs on MPS with unexpected keyword argument 'device_map' ... RePaintPipeline always returns black image when pipe.to("mps") is called.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@anton-l could you take a look?
Hi, @pcuenca, any chances for a fix?