-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Staircase/Scanline artifacts with SDXL 1.0 #4310
Comments
Also happens without refiner model. |
Thanks for investigating. We think it will be beneficial for potentially similar future issues :) |
Did StabilityAI ever address this other than just silently dropping a "fixed" version (using the 0.9 VAE in the 1.0 checkpoints, as described above) in their respective repos? There's so much confusion and miscommunication around this that even the ControlNet author wasn't aware of this. (see discussion starting from here) https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/blob/main/sd_xl_base_1.0_0.9vae.safetensors |
The onnx vae should be reverted to 0.9 as well. |
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. |
Still interested to know whether or not StabilityAI officially addressed this, outside of silently releasing a "fixed" version. Seems awfully fishy to me. |
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. |
Bumping again. |
As always, we need a reproducible code snippet here :-) |
You made this change though. https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/discussions/30 So, technically this issue has already been addressed. However, my question in #4310 (comment) has not been. |
This VAE fixed it for me: |
That VAE works because it also had to be reverted back to the 0.9 VAE. https://huggingface.co/madebyollin/sdxl-vae-fp16-fix/commit/6d1073461cd0b5a6ea4fda10b812e3d9d58a8330
It still does not answer why this had to be done, and why StabilityAI made no official announcement regarding it. I believe it's incredibly misleading that a VAE labeled a version number higher, as "1.0", would have a scanline-like "watermark". |
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. |
Bumping again. |
It is still missing a reproducible code snippet. |
from diffusers.pipelines.stable_diffusion_xl.pipeline_stable_diffusion_xl import StableDiffusionXLPipeline
import torch
import gc
from PIL import Image
for url in [
"https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/blob/main/sd_xl_base_1.0.safetensors",
"https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/blob/main/sd_xl_base_1.0_0.9vae.safetensors",
]:
generator = torch.Generator(device="cuda").manual_seed(42)
pipeline_text2image = StableDiffusionXLPipeline.from_single_file(
url, torch_dtype=torch.float16, variant="fp16", use_safetensors=True,
).to("cuda")
prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"
image: Image.Image = pipeline_text2image(prompt=prompt, generator=generator).images[0]
image.save(f'{".".join(url.split('/')[-1].split('.')[:-1])}.png')
del pipeline_text2image
gc.collect()
1600% zoom of each.
The docs use A user should expect something labeled "1.0" to be the model to use and to not contain VAE decoding artifacts. They should not need insider knowledge that something additionally labeled "0.9" is actually the better model to use because VAE decoding artifacts are not present. |
@patrickvonplaten WDYT? |
Hey @catboxanon, This is really more an issue for the repo here: https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/discussions as Stability AI decides how to name the files in their repo. Could you open an issue there? |
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. |
Describe the bug
SDXL creates colorful scanline-like artifacts, especially on areas with high-frequency detail.
SDXL - Diffusers 0.19.0 - 25 Steps of DPMSolverMultistepScheduler with Karras - 20% refine steps - CFG Scale 7
Left: SDXL 1.0 - Right: SDXL 0.9
Reproduction
Run SDXL 1.0 and compare results with SDXL 0.9
Logs
No response
System Info
Diffusers 0.19.0 - Windows 10 22H2 - RTX 4090 with drivers 536.40 - FP16 model
Who can help?
No response
The text was updated successfully, but these errors were encountered: