huggingface / huggingface/diffusers
RePaintPipeline always returns black image when pipe.to("mps") is called
- Lingua principale
- Python
- Stelle
- 34.5k
- Fork
- 7.3k
- Merge medio
- 3g 3h
- PR unite (30g)
- 91
Descrizione
### 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
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.