AUTOMATIC1111 / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
135.19k stars 25.82k forks source link

[Bug]: API - Denoising Strength *ALWAYS* in metadata #13553

Closed altoiddealer closed 8 months ago

altoiddealer commented 8 months ago

Is there an existing issue for this?

What happened?

Using the API, I am sending the following payload:

payload = {'prompt':'a cute dog']

The metadata for this image (and every image generated via the API) includes "Denoising Strength: 0".

Anytime I want to send an image from "PNG Info" tab to txt2img or to img2img, it enables HR Fix now by default and has to be toggled off.

I don't think Denoising Strength should be included in the metadata when HR fix is disabled.

payload

2023-10-08_11-11-57_0

Screenshot 2023-10-08 111305

Steps to reproduce the problem

  1. Generate an image via API
  2. Every image will include Denoising Strength in the metadata, regardless of whether it is enabled or not.

What should have happened?

Denoising Strength should be excluded from the metadata by default

Sysinfo

sysinfo.txt

What browsers do you use to access the UI ?

Google Chrome

Console logs

Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Version: v1.6.0
Commit hash: 5ef669de080814067961f28357256e8fe27544f4
Checking ReActor requirements... Ok
Launching Web UI with arguments: --xformers --no-half-vae --medvram-sdxl --api --listen
2023-10-08 11:09:18,276 - ControlNet - INFO - ControlNet v1.1.410
ControlNet preprocessor location: C:\0_SD\sd.webui\webui\extensions\sd-webui-controlnet\annotator\downloads
2023-10-08 11:09:18,352 - ControlNet - INFO - ControlNet v1.1.410
11:09:18 - ReActor - STATUS - Running v0.4.2-b3
Loading weights [f61328e842] from C:\0_SD\sd.webui\webui\models\Stable-diffusion\sdxl\RealitiesEdgeXL_4.safetensors
Creating model from config: C:\0_SD\sd.webui\webui\repositories\generative-models\configs\inference\sd_xl_base.yaml
Running on local URL:  http://0.0.0.0:7860

To create a public link, set `share=True` in `launch()`.
Startup time: 17.8s (prepare environment: 5.7s, import torch: 1.9s, import gradio: 0.7s, setup paths: 0.5s, initialize shared: 0.2s, other imports: 0.5s, load scripts: 1.5s, create ui: 2.1s, gradio launch: 4.5s).
Loading VAE weights specified in settings: C:\0_SD\sd.webui\webui\models\VAE\sdxl_vae.safetensors
Applying attention optimization: xformers... done.
Model loaded in 14.9s (load weights from disk: 1.1s, create model: 1.6s, apply weights to model: 10.0s, calculate empty prompt: 2.0s).
Reusing loaded model sdxl\RealitiesEdgeXL_4.safetensors [f61328e842] to load sdxl\nightvisionXLPhotorealisticPortrait_beta0702Bakedvae.safetensors [397a298477]
Loading weights [397a298477] from C:\0_SD\sd.webui\webui\models\Stable-diffusion\sdxl\nightvisionXLPhotorealisticPortrait_beta0702Bakedvae.safetensors
Loading VAE weights specified in settings: C:\0_SD\sd.webui\webui\models\VAE\sdxl_vae.safetensors
Applying attention optimization: xformers... done.
Weights loaded in 16.6s (send model to cpu: 0.4s, load weights from disk: 0.9s, apply weights to model: 14.8s, load VAE: 0.5s).
Restoring base VAE
Applying attention optimization: xformers... done.
VAE weights loaded.
100%|██████████████████████████████████████████████████████████████████████████████████| 30/30 [00:11<00:00,  2.57it/s]
Loading VAE weights specified in settings: C:\0_SD\sd.webui\webui\models\VAE\sdxl_vae.safetensors0:07<00:00,  3.71it/s]
Applying attention optimization: xformers... done.
VAE weights loaded.
Total progress: 100%|██████████████████████████████████████████████████████████████████| 30/30 [00:11<00:00,  2.61it/s]
Reusing loaded model sdxl\nightvisionXLPhotorealisticPortrait_beta0702Bakedvae.safetensors [397a298477] to load sdxl\RealitiesEdgeXL_4.safetensors [f61328e842]
Loading weights [f61328e842] from C:\0_SD\sd.webui\webui\models\Stable-diffusion\sdxl\RealitiesEdgeXL_4.safetensors
Loading VAE weights specified in settings: C:\0_SD\sd.webui\webui\models\VAE\sdxl_vae.safetensors
Applying attention optimization: xformers... done.
Weights loaded in 12.7s (load weights from disk: 0.8s, apply weights to model: 11.4s, load VAE: 0.5s).
100%|██████████████████████████████████████████████████████████████████████████████████| 50/50 [00:06<00:00,  8.11it/s]
Total progress: 100%|██████████████████████████████████████████████████████████████████| 50/50 [00:05<00:00,  9.31it/s]
Total progress: 100%|██████████████████████████████████████████████████████████████████| 50/50 [00:05<00:00, 12.56it/s]

Additional information

No response

missionfloyd commented 8 months ago

13466

For now, you can add "denoising_strength": None to your payload, or use the dev branch with git switch dev

altoiddealer commented 8 months ago

Thanks! I’ll do that for now :)

I didn’t think to try denoising strength = None I did try = ‘’ but it didn’t do the trick

altoiddealer commented 8 months ago

Just replying to confirm that setting the key payload[‘denoising_strength’] = None did indeed to the trick