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

[Bug]: Inpaint "Only masked" with inpainting models not working in 1.7.0

Open marchcat69 opened this issue 1 year ago • 7 comments

Checklist

  • [ ] The issue exists after disabling all extensions
  • [ ] The issue exists on a clean installation of webui
  • [ ] The issue is caused by an extension, but I believe it is caused by a bug in the webui
  • [X] The issue exists in the current version of the webui
  • [X] The issue has not been reported before recently
  • [ ] The issue has been reported before but has not been fixed yet

What happened?

To fix the eyes in the image I mask the eye area. But in Webui v1.7.0 inpaint "Only masked" with inpainting models produces output image same as input with any settings (Denoising strength, Seed, Sampling steps, CFG). With regular model (not Inpainting) image changes. I tried using two different models: "absolutereality_v181INPAINTING.safetensors" and "realisticVisionV51_v51VAE-inpainting.safetensors" downloaded from civitai site. No results with both.

Steps to reproduce the problem

  1. Go to img2img inpaint tab.
  2. Select "Only masked" mode.
  3. Create masked area on the input image.
  4. Set any settings in generation parameters
  5. Press "Generate"

What should have happened?

The image below the masked area should change depending on the options you select.

What browsers do you use to access the UI ?

No response

Sysinfo

"Platform": "Linux-5.8.0-2-amd64-x86_64-with-glibc2.31",
"Python": "3.11.4",
"Version": "v1.7.0",
"Commit": "cf2772fab0af5573da775e7437e6acdca424f26e",
"Script path": "/root/1data/apps/local/stable-diffusion-webui",
"Data path": "/root/1data/apps/local/stable-diffusion-webui",
"Extensions dir": "/root/1data/apps/local/stable-diffusion-webui/extensions",
"Checksum": "0c445b30edc7411197bd51923d6191285f94932a02eba287aa0734526e1329dd",
"Commandline": [
    "launch.py",
    "--opt-sdp-no-mem-attention",
    "--no-half-vae",
    "--upcast-sampling",
    "--no-hashing",
    "--medvram",
    "--always-batch-cond-uncond",
    "--autolaunch"
],
"Torch env info": {
    "torch_version": "2.1.0",
    "is_debug_build": "False",
    "cuda_compiled_version": "11.8",
    "gcc_version": "(Debian 10.2.1-6) 10.2.1 20210110",
    "clang_version": "11.0.1-2",
    "cmake_version": "version 3.26.3",
    "os": "Debian GNU/Linux 11 (bullseye) (x86_64)",
    "libc_version": "glibc-2.31",
    "python_version": "3.11.4 (main, Sep 14 2023, 15:29:16) [GCC 10.2.1 20210110] (64-bit runtime)",
    "python_platform": "Linux-5.8.0-2-amd64-x86_64-with-glibc2.31",
    "is_cuda_available": "True",
    "cuda_runtime_version": null,
    "cuda_module_loading": "LAZY",
    "nvidia_driver_version": "545.23.06",
    "nvidia_gpu_models": "GPU 0: NVIDIA GeForce RTX 2060",

...

Console logs

Loading weights [7e16c94105] from ../stable-diffusion-webui/models/Stable-diffusion/absolutereality_v181INPAINTING.safetensors
Loading VAE weights specified in settings: ../stable-diffusion-webui/models/VAE/vae-ft-mse-840000-ema-pruned.safetensors
Applying attention optimization: sdp-no-mem... done.
Weights loaded in 90.2s (load weights from disk: 4.2s, apply weights to model: 85.8s, load VAE: 0.1s).
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:06<00:00,  3.23it/s]

Additional information

No response

marchcat69 avatar Feb 09 '24 15:02 marchcat69

I have the same problem

helpmethankyou avatar Feb 09 '24 16:02 helpmethankyou

Show your generation params (png info)

light-and-ray avatar Feb 10 '24 16:02 light-and-ray

Show your generation params (png info)

I found the cause of this issue. Occurred because the "Inpainting conditioning mask strength" parameter was set to zero. Apparently I accidentally set this parameter to zero or this is the default setting in Webui v1.7.0. It is strange that this setting only affects inpainting models and not regular models.

marchcat69 avatar Feb 11 '24 18:02 marchcat69

I found the cause of this issue. Occurred because the "Inpainting conditioning mask strength" parameter was set to zero. Apparently I accidentally set this parameter to zero or this is the default setting in Webui v1.7.0. It is strange that this setting only affects inpainting models and not regular models.

Where do I find this setting??

a3nima avatar Feb 12 '24 12:02 a3nima

In settings 🗿

light-and-ray avatar Feb 12 '24 12:02 light-and-ray

ah yea, now Ive found it, i ve overlooked it, because it's already at 1.

btw I cannot use either only masked or masked. with an inpainting model I get:

NansException: A tensor with all NaNs was produced in Unet. This could be either because there's not enough precision to represent the picture, or because your video card does not support half type. Try setting the "Upcast cross attention layer to float32" option in Settings > Stable Diffusion or using the --no-half commandline argument to fix this. Use --disable-nan-check commandline argument to disable this check.

a3nima avatar Feb 12 '24 12:02 a3nima

Screenshot_2024-02-12-16-27-42-161_org.mozilla.firefox-edit.jpg

light-and-ray avatar Feb 12 '24 12:02 light-and-ray