-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Closed
Labels
staleIssues that haven't received updatesIssues that haven't received updates
Description
Describe the bug
The first image generated with LMSScheduler is just a green image.
Reproduction
Run with:
lms = LMSDiscreteScheduler(beta_start=0.00085, beta_end=0.012, beta_schedule="scaled_linear"
pipe = StableDiffusionPipeline.from_pretrained(..., scheduler=lms)
instead of using the default scheduler. Then the first image is completely green. The workaround I am using is to run one step before the actual diffuse function:
if isinstance(pipe.scheduler, LMSDiscreteScheduler):
# Prevent an empty first frame
with autocast("cuda"):
image = diffuse(pipe, text_embeddings, init1, 1, settings["guidance_scale"], eta)
Afterward I compute images similarly, but using e.g. 50 steps instead of one and everything is fine. The default scheduler also seems to work. I did not test other schedulers yet.
System Info
Diffusers from git, python 3.10.6, CUDA with a RTX 3060 card
Metadata
Metadata
Assignees
Labels
staleIssues that haven't received updatesIssues that haven't received updates