Skip to content

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

@mostafij-rahman

Description

@mostafij-rahman

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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions