IrisRainbowNeko / HCP-Diffusion

A universal Stable-Diffusion toolbox
Apache License 2.0
893 stars 75 forks source link

fix: SDXL training error of wrong shape crop_info when using cfg_scale #62

Closed SLAPaper closed 4 months ago

SLAPaper commented 7 months ago

In SDXL, if using classifier free guidance, the time_ids (crop_info in HCP) 's shape needs to be doubled like latents and text_embeds, or will get error in running.

Reference: https://github.com/huggingface/diffusers/blob/v0.24.0/src/diffusers/pipelines/stable_diffusion_xl/pipeline_stable_diffusion_xl.py#L1083