Skip to content

train_text_to_image_sdxl.py ema not working #5783

@Jack000

Description

@Jack000

Describe the bug

I did a few training runs with train_text_to_image_sdxl.py before realizing that the EMA checkpoint never changed.

Looking at train_text_to_image.py - it seems that there is no ema_unet.step() in the sdxl training code so the ema model is never updated.

it's also missing this bit at the start:

if args.use_ema:
    ema_unet.to(accelerator.device)

Reproduction

just the huggingface sample code

Logs

No response

System Info

latest version of diffusers

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