huggingface / huggingface/diffusers

Finetuned models aren't saved or loaded properly in train_custom_diffusion.py

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

Descrizione

### Describe the bug

Thank you for your amazing work. It seems like models are not saved or loaded properly after finetuning train_custom_diffusion.py in a new dataset. Generated validation images are expected but final test (inference) results are not expected as finetuned models are not used properly. The bug most probably in the following lines.

![image](https://github.com/user-attachments/assets/2419cb7a-be87-4211-bc38-f829fe60ffb2)

### Reproduction

Please finetune using a custom dataset and see the final test/inference results.

### Logs

_No response_

### System Info

- 珞 Diffusers version: 0.31.0.dev0
- Platform: Linux-6.5.0-45-generic-x86_64-with-glibc2.17
- Running on Google Colab?: No
- Python version: 3.8.19
- PyTorch version (GPU?): 2.4.0+cu121 (True)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Huggingface_hub version: 0.24.6
- Transformers version: 4.44.0
- Accelerate version: 0.33.0
- PEFT version: not installed
- Bitsandbytes version: not installed
- Safetensors version: 0.4.4
- xFormers version: not installed
- Accelerator: NVIDIA RTX A6000, 49140 MiB
NVIDIA RTX A6000, 49140 MiB
NVIDIA RTX A6000, 49140 MiB
NVIDIA RTX A6000, 49140 MiB
- Using GPU in script?: 4 NVIDIA RTX A6000 GPUs
- Using distributed or parallel set-up in script?: distributed

### Who can help?

_No response_

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Start with train_custom_diffusion.py and reproduce finetuning on a custom dataset using the distributed setup described in the issue. Inspect the save/load lines shown in the report and verify that final inference uses the finetuned model and produces the expected results.

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à
Tranquilla
Chiarezza
Da chiarire
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.