huggingface / huggingface/diffusers

Analysis of Classifier-Free Guidance Weight Schedulers

Open
#7,756 12 comments 4 reactions 0 assignees View on GitHub
consider-for-modular-diffusers stale
Dominant language
Python
Stars
34.5k
Forks
7.3k
Avg merge
3d 3h
Merged PRs (30d)
91

Description

### Model/Pipeline/Scheduler description

The paper's authors performs an analysis and proposes 1 line change in order to make Classifier-Free Guidance looks better
![cfg](https://github.com/huggingface/diffusers/assets/23548268/95e6801a-d734-4a50-bfbc-1d48a224f248)

I personally run some test to confirm

**SD1.5 DDIM scheduler, 50 steps, "a photograph of an astronaut riding a horse", seed: 1024**
guidance scale: 7.5
static
![sd_default](https://github.com/huggingface/diffusers/assets/23548268/884f5b8b-60fb-4b9d-b680-e6a3d6a047ab)

linear (proposed)
![sd_default_linear](https://github.com/huggingface/diffusers/assets/23548268/7d3e70b4-7483-4857-a99a-5dbd522efc94)

guidance scale: 14.0
static
![sd_org](https://github.com/huggingface/diffusers/assets/23548268/f3059e37-c333-4383-a261-7563fe0f1b14)

linear (proposed)
![sd_linear](https://github.com/huggingface/diffusers/assets/23548268/f0cad0e6-4e58-4c32-8394-cb588b6f95d0)

### Open source status

- [ ] The model implementation is available.
- [ ] The model weights are available (Only relevant if addition is not a scheduler).

### Provide useful links for the implementation

Paper: https://arxiv.org/abs/2404.13040

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.