Mikubill / sd-webui-controlnet

WebUI extension for ControlNet
GNU General Public License v3.0
16.81k stars 1.93k forks source link

[Bug]: “Image to Image, Resize and Fill" bug - unable to fill content in selected directions. #1991

Closed hpx502766238 closed 1 year ago

hpx502766238 commented 1 year ago

Is there an existing issue for this?

What happened?

For example, I want to expand the image of a girl (only upper body, 512x512) to a full body without compromising the current details. I use "Image to Image, Resize and Fill," and enable the ControlNet inpaint to keep details. However, the result is that the image expands from the center rather than from one side. In the demonstration video, the top area of the image is not necessary. demonstration video onedrive link:https://1drv.ms/v/s!AiY-RHw-0-RVinVeT_NGgk-CcpXL?e=FMUgWv

same issue in sd webui: https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/12789

Steps to reproduce the problem

1.I sent it to "Image to Image," then I clicked the edit button to optimize the image edge. 2.After that, I clicked auto-detection to optimize the resolution, but it didn't work. So I double-clicked the image and tried auto-3.detection again, and it worked. 4.I set the resize mode, denoise strength to 1, enabled the ControlNet inpaint, set the resize mode, and checked "ControlNet is more important." 5.I generated the image.

What should have happened?

2.The result is that the image expanded from the center, not from one side. In the demonstrative video, the top area of the image is not necessary.

Commit where the problem happens

webui: version: v1.5.2  •  python: 3.10.12  •  torch: 2.0.1+cu118  •  xformers: 0.0.20  •  gradio: 3.32.0  •  checkpoint: fe54b5d04d controlnet: version v1.1.238 main | 0cfc88b6 | Mon Aug 14 00:07:03 2023

What browsers do you use to access the UI ?

Microsoft Edge

Command Line Arguments

--opt-split-attention --opt-channelslast --opt-sdp-attention --opt-sub-quad-attention --xformers --no-half-vae

List of enabled extensions

PBRemTools | https://github.com/mattyamonaca/PBRemTools.git | main | 91e16d32 | Tue Aug 1 10:08:11 2023 SD-CN-Animation | https://github.com/volotat/SD-CN-Animation.git | main | 2e257bbf | Tue May 30 16:49:03 2023 SadTalker | https://github.com/OpenTalker/SadTalker.git | main | bd5b64af | Sun Aug 6 04:17:40 2023 Stable-Diffusion-Webui-Civitai-Helper | https://github.com/butaixianran/Stable-Diffusion-Webui-Civitai-Helper.git | main | 920ca326 | Tue May 23 11:53:22 2023 a1111-sd-webui-tagcomplete | https://github.com/DominikDoom/a1111-sd-webui-tagcomplete.git | main | 5deb72cd | Wed Aug 16 08:50:05 2023 adetailer | https://github.com/Bing-su/adetailer.git | main | 22602536 | Mon Aug 14 14:45:42 2023 model-keyword | https://github.com/mix1009/model-keyword.git | main | 748674ba | Thu Aug 17 06:01:15 2023 multidiffusion-upscaler-for-automatic1111 | https://github.com/pkuliyi2015/multidiffusion-upscaler-for-automatic1111.git | main | f9f8073e | Sat Jul 22 06:53:11 2023 sd-3dmodel-loader | https://github.com/jtydhr88/sd-3dmodel-loader.git | master | 1e01cc16 | Fri Jun 30 01:16:04 2023 sd-webui-3d-open-pose-editor | https://github.com/nonnonstop/sd-webui-3d-open-pose-editor.git | main | f2d5aac5 | Sat Apr 15 13:21:06 2023 sd-webui-controlnet | https://github.com/Mikubill/sd-webui-controlnet.git | main | 0cfc88b6 | Mon Aug 14 00:07:03 2023 sd-webui-openpose-editor | https://github.com/huchenlei/sd-webui-openpose-editor.git | main | d352f29e | Sat Jul 22 21:15:12 2023 sd-webui-prompt-all-in-one | https://github.com/Physton/sd-webui-prompt-all-in-one | main | 20685967 | Thu Aug 17 17:18:31 2023 sd-webui-regional-prompter | https://github.com/hako-mikan/sd-webui-regional-prompter.git | main | e75f5b96 | Thu Aug 10 15:39:08 2023 sd-webui-roop | https://github.com/s0md3v/sd-webui-roop | main | e6333fbe | Fri Jul 7 09:22:59 2023 sd_civitai_extension | https://github.com/civitai/sd_civitai_extension.git | main | 6afadb00 | Fri Aug 4 23:08:54 2023 stable-diffusion-webui-images-browser | https://github.com/AlUlkesh/stable-diffusion-webui-images-browser.git | main | 6fe65acc | Thu Aug 17 06:33:07 2023 stable-diffusion-webui-localization-zh_Hans

Console logs

hpx502766238@WSL2-Ubuntu:~/stable-diffusion-webui$ ./webui.sh

################################################################
Install script for stable-diffusion + Web UI
Tested on Debian 11 (Bullseye)
################################################################

################################################################
Running on hpx502766238 user
################################################################

################################################################
Repo already cloned, using it as install directory
################################################################

################################################################
Create and activate python venv
################################################################

################################################################
Launching launch.py...
################################################################
Using TCMalloc: libtcmalloc_minimal.so.4
Python 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0]
Version: v1.5.2
Commit hash: c9c8485bc1e8720aba70f029d25cba1c4abf2b5c

#######################################################################################################
Initializing Civitai Link
If submitting an issue on github, please provide the below text for debugging purposes:

Python revision: 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0]
Civitai Link revision: 6afadb00cfaba842f9ba15cd82174ff7aacd5dac
SD-WebUI revision: c9c8485bc1e8720aba70f029d25cba1c4abf2b5c

Checking Civitai Link requirements...
[+] python-socketio[client] version 5.7.2 installed.

#######################################################################################################

Checking roop requirements
Install insightface==0.7.3
Installing sd-webui-roop requirement: insightface==0.7.3
Install onnx==1.14.0
Installing sd-webui-roop requirement: onnx==1.14.0
Install onnxruntime==1.15.0
Installing sd-webui-roop requirement: onnxruntime==1.15.0
Install opencv-python>=4.7.0.72
Installing sd-webui-roop requirement: opencv-python>=4.7.0.72

Launching Web UI with arguments: --opt-split-attention --opt-channelslast --opt-sdp-attention --opt-sub-quad-attention --xformers --no-half-vae
[-] ADetailer initialized. version: 23.8.0, num models: 9
2023-08-25 01:30:24,486 - ControlNet - INFO - ControlNet v1.1.238
ControlNet preprocessor location: /home/hpx502766238/stable-diffusion-webui/extensions/sd-webui-controlnet/annotator/downloads
2023-08-25 01:30:24,570 - ControlNet - INFO - ControlNet v1.1.238
sd-webui-prompt-all-in-one background API service started successfully.
2023-08-25 01:30:24,769 - roop - INFO - roop v0.0.2
2023-08-25 01:30:24,769 - roop - INFO - roop v0.0.2
Civitai: API loaded
Loading weights [fe54b5d04d] from /home/hpx502766238/stable-diffusion-webui/models/Stable-diffusion/leosamsMoonfilm_filmGrain20.safetensors
Creating model from config: /home/hpx502766238/stable-diffusion-webui/configs/v1-inference.yaml
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
Running on local URL:  http://127.0.0.1:7860
To create a public link, set `share=True` in `launch()`.
Civitai: Check resources for missing preview images
Startup time: 9.4s (load scripts: 5.0s, create ui: 2.0s, gradio launch: 2.2s, app_started_callback: 0.2s).
Civitai: Found 2 resources missing preview images
Civitai: Found 1 hash matches
Civitai: Updated 0 preview images
100%|███████████████████████████████████████████████████████████████████████| 20/20 [00:02<00:00,  7.44it/s]
Total progress: 100%|███████████████████████████████████████████████████████| 20/20 [00:04<00:00,  4.17it/s]
100%|███████████████████████████████████████████████████████████████████████| 20/20 [00:02<00:00,  7.33it/s]
Total progress: 100%|███████████████████████████████████████████████████████| 20/20 [00:04<00:00,  4.12it/s]
100%|███████████████████████████████████████████████████████████████████████| 20/20 [00:07<00:00,  2.78it/s]
Total progress: 100%|███████████████████████████████████████████████████████| 20/20 [00:32<00:00,  1.64s/it]
2023-08-26 17:44:05,122 - ControlNet - INFO - Loading model: control_v11p_sd15_inpaint [ebff9138]  2.79it/s]
2023-08-26 17:44:12,332 - ControlNet - INFO - Loaded state_dict from [/home/hpx502766238/stable-diffusion-webui/extensions/sd-webui-controlnet/models/control_v11p_sd15_inpaint.pth]
2023-08-26 17:44:12,332 - ControlNet - INFO - Loading config: /home/hpx502766238/stable-diffusion-webui/extensions/sd-webui-controlnet/models/control_v11p_sd15_inpaint.yaml
2023-08-26 17:44:19,686 - ControlNet - INFO - ControlNet model control_v11p_sd15_inpaint [ebff9138] loaded.
2023-08-26 17:44:19,688 - ControlNet - INFO - using inpaint as input
2023-08-26 17:44:19,692 - ControlNet - INFO - Loading preprocessor: inpaint_only
2023-08-26 17:44:19,692 - ControlNet - INFO - preprocessor resolution = 552
  0%|                                                                                | 0/20 [00:00<?, ?it/s]2023-08-26 17:44:30,060 - ControlNet - INFO - ControlNet used torch.float32 VAE to encode torch.Size([1, 4, 137, 69]).
100%|███████████████████████████████████████████████████████████████████████| 20/20 [00:23<00:00,  1.15s/it]
Total progress: 100%|███████████████████████████████████████████████████████| 20/20 [00:41<00:00,  2.10s/it]
Saving backup of webui/extension state to /home/hpx502766238/stable-diffusion-webui/config_states/2023_08_26-18_10_29_aaa.json.

Additional information

https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/12789

huchenlei commented 1 year ago

This is intended behavior.