huggingface / huggingface/diffusers

FluxFillPipeline quality deteriorates over multiple iterations of inpainting

Aperta
#10,204 9 commenti 0 reazioni 0 assegnatari Vedi su GitHub
bug stale
Lingua principale
Python
Stelle
34.5k
Fork
7.3k
Merge medio
3g 3h
PR unite (30g)
91

Descrizione

### Describe the bug

When the FluxFillPipeline is run multiple times on the same image, the image quality deteriorates in each iteration.

### Reproduction

```python
import torch
from diffusers import FluxFillPipeline
from diffusers.utils import load_image

pipe = FluxFillPipeline.from_pretrained("black-forest-labs/FLUX.1-Fill-dev", torch_dtype=torch.bfloat16)
pipe = pipe.to("cuda")

img = load_image("https://huggingface.co/datasets/diffusers/diffusers-images-docs/resolve/main/cup.png")
mask = load_image("https://huggingface.co/datasets/diffusers/diffusers-images-docs/resolve/main/cup_mask.png")

def fill(prompt, image, mask):
return pipe(
prompt=prompt,
image=image,
mask_image=mask,
guidance_scale=30,
num_inference_steps=50,
max_sequence_length=512,
height=1632,
width=1232,
generator=torch.Generator("cpu").manual_seed(0),
).images[0]

prompt = "a white paper cup"
for i in range(12):
print(i)
img = fill(prompt, img, mask)
img.save(f"output_{i}.png")
```

### Logs

![output_0](https://github.com/user-attachments/assets/ef11a37e-377d-4b1c-b573-5310d634db81)
![output_10](https://github.com/user-attachments/assets/996160b6-9835-4dc8-82c1-baca339cbb61)

### System Info

Diffusers Version 0.31.0
Python Version 3.10
CUDA Version 12.1.0
DGX H100

### Who can help?

@yiyixuxu @DN6 @aso

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Start by running the provided Python reproduction for FluxFillPipeline with the listed Diffusers, Python, CUDA, and hardware versions, then inspect the pipeline entry point to trace repeated inpainting calls. Done means repeated iterations no longer show the reported quality deterioration, with the behavior checked against the supplied outputs.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python, pytorch
Ambito
machine-learning
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
38/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.