stable-diffusion-webui icon indicating copy to clipboard operation
stable-diffusion-webui copied to clipboard

[Bug]: Suddenly DPM img2img is all blurry

Open enzyme69 opened this issue 2 years ago • 8 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues and checked the recent builds/commits

What happened?

I've been using img2img like normally, mostly with ControlNet, everything was fine, but suddenly today every result is blurry when I use DPM on macOS.

When I switch to Euler A, I get the sharp result.

Steps to reproduce the problem

When using Euler A, compare to DDM Karras, etc.

What should have happened?

It should not be blurry.

Commit where the problem happens

When doing img2img

What platforms do you use to access the UI ?

MacOS

What browsers do you use to access the UI ?

Apple Safari

Command Line Arguments

No

List of extensions

ControlNet

Console logs

ython 3.10.10 (main, Feb  8 2023, 05:34:50) [Clang 14.0.0 (clang-1400.0.29.202)]
Commit hash: 0cc0ee1bcb4c24a8c9715f66cede06601bfc00c8
Installing requirements for Web UI
Installing requirement for sd-webui-controlnet


Installing sd-dynamic-prompts requirements.txt

Launching Web UI with arguments: --no-half --upcast-sampling --no-half-vae --use-cpu interrogate
Warning: caught exception 'Torch not compiled with CUDA enabled', memory monitor disabled
No module 'xformers'. Proceeding without it.
==============================================================================
You are running torch 1.12.1.
The program is tested to work with torch 1.13.1.
To reinstall the desired version, run with commandline flag --reinstall-torch.
Beware that this will cause a lot of large files to be downloaded, as well as
there are reports of issues with training tab on the latest version.

Use --skip-version-check commandline argument to disable this check.
==============================================================================
Loading weights [fc2511737a] from /Users/jimmygunawan/stable-diffusion-webui/models/Stable-diffusion/chilloutmix_NiPrunedFp32Fix.safetensors
Creating model from config: /Users/jimmygunawan/stable-diffusion-webui/configs/v1-inference.yaml
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
Applying cross attention optimization (InvokeAI).
Textual inversion embeddings loaded(1): ulzzang-6500
Model loaded in 6.6s (create model: 0.5s, apply weights to model: 4.7s, move model to device: 1.2s).
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Loading preprocessor: none, model: control_sd15_openpose [fef5e48e]
Loaded state_dict from [/Users/jimmygunawan/stable-diffusion-webui/extensions/sd-webui-controlnet/models/control_sd15_openpose.pth]
ControlNet model control_sd15_openpose [fef5e48e] loaded.
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:34<00:00,  1.73s/it]
Total progress: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:28<00:00,  1.40s/it]
Will process 89 images, creating 1 new images for each.
INFO:sd_dynamic_prompts.dynamic_prompting:Prompt matrix will create 1 images in a total of 1 batches.
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:48<00:00,  2.43s/it]
INFO:sd_dynamic_prompts.dynamic_prompting:Prompt matrix will create 1 images in a total of 1 batches.                                          | 20/1780 [00:29<42:52,  1.46s/it]
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:47<00:00,  2.38s/it]
INFO:sd_dynamic_prompts.dynamic_prompting:Prompt matrix will create 1 images in a total of 1 batches.                                          | 40/1780 [01:30<47:59,  1.65s/it]
  5%|███████                                                                                                                                      | 1/20 [00:13<04:12, 13.29s/it]
Total progress:   2%|██▊                                                                                                                     | 41/1780 [02:01<1:25:53,  2.96s/it]
Loading weights [c35782bad8] from /Users/jimmygunawan/stable-diffusion-webui/models/Stable-diffusion/realisticVisionV13_v13.safetensors
Applying cross attention optimization (InvokeAI).
Weights loaded in 7.2s (load weights from disk: 0.4s, apply weights to model: 4.8s, move model to device: 2.0s).
INFO:sd_dynamic_prompts.dynamic_prompting:Prompt matrix will create 1 images in a total of 1 batches.
restoring last networks
Loading preprocessor: openpose, model: control_sd15_openpose [fef5e48e]
Loaded state_dict from [/Users/jimmygunawan/stable-diffusion-webui/extensions/sd-webui-controlnet/models/control_sd15_openpose.pth]
ControlNet model control_sd15_openpose [fef5e48e] loaded.
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:40<00:00,  2.03s/it]
Total progress: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:30<00:00,  1.51s/it]
INFO:sd_dynamic_prompts.dynamic_prompting:Prompt matrix will create 1 images in a total of 1 batches.
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:34<00:00,  1.74s/it]
Total progress: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:31<00:00,  1.56s/it]
INFO:sd_dynamic_prompts.dynamic_prompting:Prompt matrix will create 1 images in a total of 1 batches.
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:37<00:00,  1.88s/it]
Total progress: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:33<00:00,  1.69s/it]
Will process 89 images, creating 1 new images for each.
INFO:sd_dynamic_prompts.dynamic_prompting:Prompt matrix will create 1 images in a total of 1 batches.
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:37<00:00,  1.86s/it]
INFO:sd_dynamic_prompts.dynamic_prompting:Prompt matrix will create 1 images in a total of 1 batches.                                          | 20/1780 [00:31<48:28,  1.65s/it]
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:34<00:00,  1.74s/it]
INFO:sd_dynamic_prompts.dynamic_prompting:Prompt matrix will create 1 images in a total of 1 batches.                                          | 40/1780 [01:11<42:44,  1.47s/it]
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:38<00:00,  1.92s/it]
INFO:sd_dynamic_prompts.dynamic_prompting:Prompt matrix will creat

Additional information

When using DPM all my result is blurry like it's censored or something: 00018-3690123702

enzyme69 avatar Feb 21 '23 12:02 enzyme69

This may not be the cause of your problem, but I noticed that your example image has 'Noise Multiplier: 0' in its metadata, which doesn't seem normal.

Did your settings get messed up somehow? Try with a different Noise multiplier for img2img in the global settings to see if the problem remains.

settings screenshot

When I import the image with the PNG Info tab, it even tries to give a global override for 'Noise multiplier: 0.0', which doesn't actually work and is ignored (my default of 0.75 is used), and the images generated seem sharp (I only did a little testing, though).

Furthermore, I cannot even manually set 0 for that value in the settings. For me, 0.5 is the minimum it lets me choose. I did a very quick test and using 0.5 does seem blurrier for DPM samplers compared to Euler a, so maybe 0.0 would explain what you see?

I guess it's also possible that it was just an error with how the metadata got written to the file, and the multiplier wasn't actually 0 or related to your issue...

EfourC avatar Feb 22 '23 08:02 EfourC

I am having exactly the same problem, since last night. I am not using Control Net though, and I am getting blurry Img2Img results using all samplers, and any checkpoint. I don't know what might have happened, I don't think I touched any settings, and my noise multipler is 0.54... I can't change it using the slider at the top of the screen, and I can't find it in Global Settings. If anyone has any idea why this could have happened, or what info would be useful to provide, I'd be very helpful because currently my entire workflow is rendered useless.

dr-formalyst avatar Mar 09 '23 22:03 dr-formalyst

Weird.. what is the metadata of an example image that generated with the problem? Maybe there is some sort of corruption of the settings, but that's pure speculation.

You can just open the file with something like Notepad++ and take a screenshot.

notepad++_koqwL29OLk

EfourC avatar Mar 09 '23 22:03 EfourC

Thanks @EfourC for the suggestion. I did it, and for some reason the actual model does not appear in my PNG header like it does in yours. Maybe that could be the problem, it makes sense, but I don't know why the model wouldn't be there. I will try again tonight. blurred-img2img

dr-formalyst avatar Mar 10 '23 18:03 dr-formalyst

Thanks.. hmm your metadata looks ok to me so I'm not sure what could be causing the blurriness in your images.

As for the model name, I believe i it's just an option you can enable. However, it being enabled or disabled wouldn't affect image generation. I hadn't thought about it when I took my screenshot, but it also shows testing out code changes that add separate highres prompts, so just ignore those too.

EfourC avatar Mar 10 '23 19:03 EfourC

Have you found a solution to your problem? I would suggest checking if your Noise multiplier for img2img is less than 1 image Find or set this function in settings > user interface > quicksettings list > write this command - initial_noise_multiplier image

BabkaSAL0ED avatar Apr 22 '23 23:04 BabkaSAL0ED

I'm having similar issues except it happens with all samplers and Euler A doesn't give sharp results.

ptppan avatar Apr 27 '23 16:04 ptppan

Latent hires was making the blur for me, i changed it to ESRGAN 4x (web ui with python 2.0.1)

Wildboy85 avatar May 28 '23 04:05 Wildboy85

It was the noise multiplier causing this for me. Had to turn it up above 1

IanMcGarryWWU avatar Jun 04 '23 16:06 IanMcGarryWWU