-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Comparing the formula for noise levels in KarrasVeScheduler
diffusers/src/diffusers/schedulers/scheduling_karras_ve.py
Lines 107 to 113 in a45dca0
| self.schedule = [ | |
| ( | |
| self.config.sigma_max | |
| * (self.config.sigma_min**2 / self.config.sigma_max**2) ** (i / (num_inference_steps - 1)) | |
| ) | |
| for i in self.timesteps | |
| ] |
with Karras, Tero, et al. (VE column of Table 1), it seems to me that there is **2 missing, and the correct formula should be
self.schedule = [
(
self.config.sigma_max**2
* (self.config.sigma_min**2 / self.config.sigma_max**2) ** (i / (num_inference_steps - 1))
)
for i in self.timesteps
]This way the noise indeed ranges from sigma_min to sigma_max, as the docstring says.
Please let me know if I'm misunderstanding something here
This actually affects the generated images: they become less grainy and oversaturated after this is fixed
Reproduction
No response
Logs
No response
System Info
diffusersversion: 0.4.0.dev0- Platform: Linux-5.10.133+-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.7.14
- PyTorch version (GPU?): 1.12.1+cu113 (True)
- Huggingface_hub version: 0.9.1
- Transformers version: 4.22.1
- Using GPU in script?: Yes
- Using distributed or parallel set-up in script?: No
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working