huggingface / huggingface/diffusers

pipeline does not work with conversion to fp16 in the to cuda call

Offen
#7,693 8 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
stale
Vorherrschende Sprache
Python
Sterne
34.5k
Forks
7.3k
Ø Merge
3 T. 3 Std.
Gemergte PRs (30 T.)
91

Beschreibung

Hi,

i was using and doing some fine-tuning with the Pixart model.
and i found a problem that i could pin it down to:

this code works:
```
pipe2 = PixArtAlphaPipeline.from_pretrained("PixArt-alpha/PixArt-XL-2-512x512", torch_dtype=torch.float16)
pipe2.to("cuda")
image = pipe2(prompt, num_inference_steps=20).images[0]

```

while this does not, it gives out just noise images :
```
pipe1 = PixArtAlphaPipeline.from_pretrained("PixArt-alpha/PixArt-XL-2-512x512")
pipe1.to("cuda", dtype=torch.float16)
image = pipe1(prompt, num_inference_steps=20).images[0]
```

i have looked through the code, and i cannot find any issues so far.
has anyone encountered a similar problem or has tips where to look further?

i am on WSL Ubuntu, diffusers==0.27.2, torch==2.2.2

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Start by reproducing the two PixArtAlphaPipeline snippets with diffusers 0.27.2 and torch 2.2.2 on WSL Ubuntu, comparing the pipeline state and generated outputs after each CUDA conversion. Done means identifying why the two conversion paths differ and making the dtype conversion produce valid, non-noise images.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python, pytorch
Bereich
machine-learning
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.