huggingface / huggingface/diffusers

RePaintPipeline always returns black image when pipe.to("mps") is called

Open
#1,251 12 comments 0 reactions 1 assignee Assigned to @anton-l View on GitHub
bug stale wip
Dominant language
Python
Stars
34.5k
Forks
7.3k
Avg merge
3d 3h
Merged PRs (30d)
91

Description

### Describe 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

```python
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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.