huggingface / huggingface/diffusers

[Q] Possibly unused `self.final_alpha_cumprod`

Open
#9,395 7 comments 0 reactions 0 assignees View on GitHub
stale
Dominant language
Python
Stars
34.5k
Forks
7.3k
Avg merge
3d 3h
Merged PRs (30d)
91

Description

Hello team, quick question to make sure I understand the behavior of the `step` function in LCM Scheduler.

https://github.com/huggingface/diffusers/blob/a7361dccdc581147620bbd74a6d295cd92daf616/src/diffusers/schedulers/scheduling_lcm.py#L534-L543

Here, it seems that the condition `prev_timestep >= 0` is always `True`, because `timestep` and `self.timesteps[prev_step_index]` cannot be negative. This would mean that `self.final_alpha_cumprod` is never used. Is there a way in which `prev_timestep` can be negative?

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.