-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DPM/UniPC schedulers (possibly more) seem to have massive stability issues on model KohakuXL vs ComfyUI #5646
Comments
Can you try whether the fix to DPM provided here: #5541 could help? |
@patrickvonplaten using euler_at_final with either default, use_karras_sigmas, or use_lu_lambdas does help the issue slightly, but it is still very apparent. use_karras_sigmas tends to be less noisy than default, while use_lu_lambdas tends to have larger but less splotches. |
hi @Xynonners sorry I can't reproduce this. I tried this script - think euler indeed looks better but I would say dpm output is more or less within the expected range, unlike the output you provided. Did I miss anything here? import torch
from diffusers import StableDiffusionXLPipeline, DPMSolverMultistepScheduler, EulerAncestralDiscreteScheduler
pipeline = StableDiffusionXLPipeline.from_pretrained("KBlueLeaf/kohaku-xl-beta7.1", torch_dtype=torch.float16)
pipeline.enable_model_cpu_offload()
generator = torch.Generator(device="cuda").manual_seed(42)
ims = pipeline(prompt="realistic car 3 d render sci - fi car and sci - fi robotic factory structure in the coronation of napoleon painting and digital billboard with point cloud in the middle, unreal engine 5, keyshot, octane, artstation trending, ultra high detail, ultra realistic, cinematic, 8 k, 1 6 k, in style of zaha hadid, in style of nanospace,", num_inference_steps=30, generator=generator)
ims.images[0].save("euler.png")
pipeline.scheduler = DPMSolverMultistepScheduler.from_config(pipeline.scheduler.config)
generator = torch.Generator(device="cuda").manual_seed(42)
ims = pipeline(prompt="realistic car 3 d render sci - fi car and sci - fi robotic factory structure in the coronation of napoleon painting and digital billboard with point cloud in the middle, unreal engine 5, keyshot, octane, artstation trending, ultra high detail, ultra realistic, cinematic, 8 k, 1 6 k, in style of zaha hadid, in style of nanospace,", num_inference_steps=30, use_lu_lambdas =True, euler_at_final = True, generator=generator)
ims.images[0].save("dpm.png") |
@yiyixuxu I narrowed it down to the guidance_scale parameter, it seems like DPM is unstable at high guidance scale. import torch
from diffusers import StableDiffusionXLPipeline, DPMSolverMultistepScheduler, EulerAncestralDiscreteScheduler
pipeline = StableDiffusionXLPipeline.from_single_file("UpDraft/models/kohakuXLBeta_beta71.safetensors", torch_dtype=torch.float16)
pipeline.enable_model_cpu_offload()
generator = torch.Generator(device="cuda").manual_seed(42)
ims = pipeline(guidance_scale=14.0, prompt="realistic car 3 d render sci - fi car and sci - fi robotic factory structure in the coronation of napoleon painting and digital billboard with point cloud in the middle, unreal engine 5, keyshot, octane, artstation trending, ultra high detail, ultra realistic, cinematic, 8 k, 1 6 k, in style of zaha hadid, in style of nanospace,", num_inference_steps=30, generator=generator)
ims.images[0].save("euler.png")
pipeline.scheduler = DPMSolverMultistepScheduler.from_config(pipeline.scheduler.config)
generator = torch.Generator(device="cuda").manual_seed(42)
ims = pipeline(guidance_scale=14.0, prompt="realistic car 3 d render sci - fi car and sci - fi robotic factory structure in the coronation of napoleon painting and digital billboard with point cloud in the middle, unreal engine 5, keyshot, octane, artstation trending, ultra high detail, ultra realistic, cinematic, 8 k, 1 6 k, in style of zaha hadid, in style of nanospace,", num_inference_steps=30, use_lu_lambdas =True, euler_at_final = True, generator=generator)
ims.images[0].save("dpm.png") Also, the introduction of accelerate also, while making the model much slower, also seems to serve to destabilize it a larger amount. |
@yiyixuxu can you look into this to see if it has been fixed? |
Gentle re-ping |
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread. Please note that issues that do not follow the contributing guidelines are likely to be ignored. |
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread. Please note that issues that do not follow the contributing guidelines are likely to be ignored. |
cc @Beinsezii here since you have been testing our schedulers |
@Xynonners should probably try again on the latest pytorch/diffusers. |
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread. Please note that issues that do not follow the contributing guidelines are likely to be ignored. |
closing this for now! |
Describe the bug
The model KohakuXL in diffusers, seems to run into a massive noise/stability issue that doesn't seem to be present within ComfyUI/AUTO1111, on UniPC/DPM schedulers (possibly more) that doesn't go away with high step counts.
At 15S:
At 30S:
Euler A 30S:
Reproduction
Logs
System Info
diffusers
version: 0.22.0.dev0Who can help?
@yiyixuxu @patrickvonplaten
The text was updated successfully, but these errors were encountered: