Closed salva133 closed 8 months ago
Interesting. These logs shows that in the first generation you only enabled the instant id controlnet model, and it does not report error.
024-01-29 20:33:01,872 - ControlNet - INFO - Loading model from cache: control_instant_id_sdxl [eb2d3ec0]
2024-01-29 20:33:01,875 - ControlNet - INFO - Using preprocessor: instant_id_face_keypoints
2024-01-29 20:33:01,875 - ControlNet - INFO - preprocessor resolution = 512
2024-01-29 20:33:04,256 - ControlNet - INFO - ControlNet Hooked - Time = 2.3944098949432373
100%|██████████████████████████████████████████████████████████████████████████████████| 20/20 [00:26<00:00, 1.30s/it]
Total progress: 100%|██████████████████████████████████████████████████████████████████| 20/20 [00:25<00:00, 1.25s/it]
Subsequent generations have both units hooked, but do report errors.
Can you add --controlnet-loglevel DEBUG
to your launch script, and attach new console logs?
Hello Hu, thanks for helping me with this.
No problem, here is the new log:
From https://github.com/AUTOMATIC1111/stable-diffusion-webui
* branch master -> FETCH_HEAD
Already up to date.
venv "venv\Scripts\Python.exe"
Python 3.10.9 (tags/v3.10.9:1dd9be6, Dec 6 2022, 20:01:21) [MSC v.1934 64 bit (AMD64)]
Version: v1.7.0
Commit hash: cf2772fab0af5573da775e7437e6acdca424f26e
Launching Web UI with arguments: --xformers --no-half-vae --controlnet-loglevel DEBUG
Civitai Helper: Get Custom Model Folder
ControlNet preprocessor location: F:\SD-WebUI\extensions\sd-webui-controlnet\annotator\downloads
2024-01-30 15:06:40,036 - ControlNet - INFO - ControlNet v1.1.440
2024-01-30 15:06:41,509 - ControlNet - INFO - ControlNet v1.1.440
Loading weights [084819b80f] from F:\SD-WebUI\models\Stable-diffusion\SDXL\1_SFW\diamondVisualXL_v20.safetensors
2024-01-30 15:06:41,742 - ControlNet - DEBUG - Create LRU cache (max_size=16) for preprocessor results.
2024-01-30 15:06:41,743 - ControlNet - DEBUG - __init__ ran in: 0.001 sec
2024-01-30 15:06:41,746 - ControlNet - DEBUG - Setting txt2img_generate.
2024-01-30 15:06:41,747 - ControlNet - DEBUG - A1111 initialized 1/17.
2024-01-30 15:06:41,751 - ControlNet - DEBUG - Setting txt2img_hr-checkbox.
2024-01-30 15:06:41,752 - ControlNet - DEBUG - A1111 initialized 2/17.
2024-01-30 15:06:41,756 - ControlNet - DEBUG - Setting txt2img_width.
2024-01-30 15:06:41,757 - ControlNet - DEBUG - A1111 initialized 3/17.
2024-01-30 15:06:41,758 - ControlNet - DEBUG - Setting txt2img_height.
2024-01-30 15:06:41,758 - ControlNet - DEBUG - A1111 initialized 4/17.
2024-01-30 15:06:41,777 - ControlNet - DEBUG - uigroup ran in: 0.014 sec
2024-01-30 15:06:41,794 - ControlNet - DEBUG - uigroup ran in: 0.015 sec
2024-01-30 15:06:41,796 - ControlNet - DEBUG - ui ran in: 0.034 sec
2024-01-30 15:06:41,857 - ControlNet - DEBUG - Create LRU cache (max_size=16) for preprocessor results.
2024-01-30 15:06:41,859 - ControlNet - DEBUG - __init__ ran in: 0.002 sec
2024-01-30 15:06:41,863 - ControlNet - DEBUG - Setting img2img_generate.
2024-01-30 15:06:41,863 - ControlNet - DEBUG - A1111 initialized 5/17.
2024-01-30 15:06:41,870 - ControlNet - DEBUG - Setting img2img_inpaint_full_res.
2024-01-30 15:06:41,871 - ControlNet - DEBUG - A1111 initialized 6/17.
2024-01-30 15:06:41,872 - ControlNet - DEBUG - Setting img2img_img2img_tab.
2024-01-30 15:06:41,873 - ControlNet - DEBUG - A1111 initialized 7/17.
2024-01-30 15:06:41,875 - ControlNet - DEBUG - Setting img2img_img2img_sketch_tab.
2024-01-30 15:06:41,875 - ControlNet - DEBUG - A1111 initialized 8/17.
2024-01-30 15:06:41,877 - ControlNet - DEBUG - Setting img2img_inpaint_tab.
2024-01-30 15:06:41,877 - ControlNet - DEBUG - A1111 initialized 9/17.
2024-01-30 15:06:41,879 - ControlNet - DEBUG - Setting img2img_inpaint_sketch_tab.
2024-01-30 15:06:41,880 - ControlNet - DEBUG - A1111 initialized 10/17.
2024-01-30 15:06:41,882 - ControlNet - DEBUG - Setting img2img_inpaint_upload_tab.
2024-01-30 15:06:41,883 - ControlNet - DEBUG - A1111 initialized 11/17.
2024-01-30 15:06:41,885 - ControlNet - DEBUG - Setting img2img_batch_tab.
2024-01-30 15:06:41,886 - ControlNet - DEBUG - A1111 initialized 12/17.
2024-01-30 15:06:41,887 - ControlNet - DEBUG - Setting img2img_batch_input_dir.
2024-01-30 15:06:41,888 - ControlNet - DEBUG - A1111 initialized 13/17.
2024-01-30 15:06:41,889 - ControlNet - DEBUG - Setting img2img_batch_output_dir.
2024-01-30 15:06:41,889 - ControlNet - DEBUG - A1111 initialized 14/17.
2024-01-30 15:06:41,894 - ControlNet - DEBUG - Setting img2img_width.
2024-01-30 15:06:41,895 - ControlNet - DEBUG - A1111 initialized 15/17.
2024-01-30 15:06:41,897 - ControlNet - DEBUG - Setting img2img_height.
2024-01-30 15:06:41,898 - ControlNet - DEBUG - A1111 initialized 16/17.
2024-01-30 15:06:41,903 - ControlNet - DEBUG - get_default_ui_unit ran in: 0.001 sec
2024-01-30 15:06:41,920 - ControlNet - DEBUG - uigroup ran in: 0.018 sec
2024-01-30 15:06:41,937 - ControlNet - DEBUG - uigroup ran in: 0.015 sec
2024-01-30 15:06:41,943 - ControlNet - INFO - ControlNet UI callback registered.
2024-01-30 15:06:41,944 - ControlNet - DEBUG - ui ran in: 0.042 sec
Civitai Helper: Settings:
Civitai Helper: max_size_preview: True
Civitai Helper: skip_nsfw_preview: True
Civitai Helper: open_url_with_js: True
Civitai Helper: proxy:
Civitai Helper: use civitai api key: False
Running on local URL: http://127.0.0.1:7860
Creating model from config: F:\SD-WebUI\repositories\generative-models\configs\inference\sd_xl_base.yaml
To create a public link, set `share=True` in `launch()`.
2024-01-30 15:06:44,389 - ControlNet - DEBUG - Create LRU cache (max_size=16) for preprocessor results.
Startup time: 48.2s (prepare environment: 13.0s, import torch: 19.0s, import gradio: 2.7s, setup paths: 2.4s, initialize shared: 0.4s, other imports: 2.1s, setup codeformer: 0.3s, list SD models: 1.1s, load scripts: 4.6s, create ui: 1.1s, gradio launch: 1.7s).
Applying attention optimization: xformers... done.
Model loaded in 27.6s (load weights from disk: 2.4s, create model: 0.5s, apply weights to model: 23.7s, apply half(): 0.1s, move model to device: 0.2s, load textual inversion embeddings: 0.3s, calculate empty prompt: 0.3s).
2024-01-30 15:07:46,417 - ControlNet - DEBUG - Prevent update 0
2024-01-30 15:07:46,418 - ControlNet - DEBUG - Switch to control type Instant_ID
2024-01-30 15:07:48,810 - ControlNet - DEBUG - Prevent update slider value: 0
2024-01-30 15:07:48,810 - ControlNet - DEBUG - Build slider for module: instant_id_face_embedding - False
2024-01-30 15:08:05,363 - ControlNet - DEBUG - Prevent update 0
2024-01-30 15:08:05,363 - ControlNet - DEBUG - Switch to control type Instant_ID
2024-01-30 15:08:07,143 - ControlNet - DEBUG - Prevent update slider value: 0
2024-01-30 15:08:07,143 - ControlNet - DEBUG - Build slider for module: instant_id_face_keypoints - False
load checkpoint from F:\SD-WebUI\models\BLIP\model_base_caption_capfilt_large.pth
Reusing loaded model SDXL\1_SFW\diamondVisualXL_v20.safetensors [084819b80f] to load SDXL\1_SFW\juggernautXL_v8Rundiffusion.safetensors [aeb7e9e689]
Loading weights [aeb7e9e689] from F:\SD-WebUI\models\Stable-diffusion\SDXL\1_SFW\juggernautXL_v8Rundiffusion.safetensorsApplying attention optimization: xformers... done.
Weights loaded in 57.7s (send model to cpu: 34.5s, load weights from disk: 1.4s, apply weights to model: 19.5s, move model to device: 2.2s).
2024-01-30 15:12:38,579 - ControlNet - INFO - unit_separate = False, style_align = False | 10/80 [00:17<01:30, 1.29s/it]
2024-01-30 15:12:38,579 - ControlNet - INFO - Loading model from cache: ip-adapter_instant_id_sdxl [c5c25a50]
2024-01-30 15:12:38,581 - ControlNet - DEBUG - load_control_model ran in: 0.002 sec
2024-01-30 15:12:38,588 - ControlNet - DEBUG - choose_input_image ran in: 0.005 sec
2024-01-30 15:12:38,589 - ControlNet - DEBUG - is_upscale_script=False
2024-01-30 15:12:38,595 - ControlNet - DEBUG - Use numpy seed 2329771170.
2024-01-30 15:12:38,596 - ControlNet - INFO - Using preprocessor: instant_id_face_embedding
2024-01-30 15:12:38,596 - ControlNet - INFO - preprocessor resolution = 512
2024-01-30 15:12:38,624 - ControlNet - INFO - Loading model from cache: control_instant_id_sdxl [eb2d3ec0]
2024-01-30 15:12:38,631 - ControlNet - DEBUG - choose_input_image ran in: 0.007 sec
2024-01-30 15:12:38,631 - ControlNet - DEBUG - is_upscale_script=False
2024-01-30 15:12:38,639 - ControlNet - DEBUG - Use numpy seed 2329771170.
2024-01-30 15:12:38,639 - ControlNet - INFO - Using preprocessor: instant_id_face_keypoints
2024-01-30 15:12:38,640 - ControlNet - INFO - preprocessor resolution = 512
2024-01-30 15:12:38,653 - ControlNet - DEBUG - Calling preprocessor instant_id_face_keypoints outside of cache.
2024-01-30 15:12:38,914 - ControlNet - DEBUG - detectmap_proc ran in: 0.061 sec
*** Error running process: F:\SD-WebUI\extensions\sd-webui-controlnet\scripts\controlnet.py
Traceback (most recent call last):
File "F:\SD-WebUI\modules\scripts.py", line 718, in process
script.process(p, *script_args)
File "F:\SD-WebUI\extensions\sd-webui-controlnet\scripts\utils.py", line 95, in wrapper
result = func(*args, **kwargs)
File "F:\SD-WebUI\extensions\sd-webui-controlnet\scripts\controlnet.py", line 1143, in process
self.controlnet_hack(p)
File "F:\SD-WebUI\extensions\sd-webui-controlnet\scripts\utils.py", line 95, in wrapper
result = func(*args, **kwargs)
File "F:\SD-WebUI\extensions\sd-webui-controlnet\scripts\controlnet.py", line 1128, in controlnet_hack
self.controlnet_main_entry(p)
File "F:\SD-WebUI\extensions\sd-webui-controlnet\scripts\utils.py", line 95, in wrapper
result = func(*args, **kwargs)
File "F:\SD-WebUI\extensions\sd-webui-controlnet\scripts\controlnet.py", line 1106, in controlnet_main_entry
assert i > 0, "InstantID control model should follow ipadapter model."
AssertionError: InstantID control model should follow ipadapter model.
I still do not get it why it says "InstantID control model should follow ipadapter model". The CN-Unit order is IP-Adapter Model and then Control Model, which is what I am getting from that error message what needs to happen.
There is a chance that you named the instant id's controlnet model as ip-adapter_instant_id_sdxl
, so that the unit0 is complaining not finding an IPAdapter unit before it to read embedding from.
You can tell this by file size. The ControlNet model is 2.5GB while ipadapter model is 1.6GB.
You can tell this by file size. The ControlNet model is 2.5GB while ipadapter model is 1.6GB.
Yea that could be the issue bc it is exactly the other way around xD I'll change it and if that solves the problem I'll close the issue. Are there plans for avoiding this by already naming them correctly from the get-go?
Also the download links need to be checked bc I was double-checking that by file name and file size and I still screwed it up.
Thanks for the support, the file names were the issue.
I will add ControlModelType
logging when loading the model, so that this type of issues become more obvious in logs.
The naming in InstantID's huggingface repo probably cannot change, as their pipeline also needs specific file name. We can mirror these files with the names we expected in huggingface, but I am not so convinced to do so just for the naming.
I will add
ControlModelType
logging when loading the model, so that this type of issues become more obvious in logs.
That's a start :) Thanks again and have a good day.
Is there an existing issue for this?
What happened?
I just set up the models as described in the guide. When running the generation I get the following traceback: ** Error running process: F:\SD-WebUI\extensions\sd-webui-controlnet\scripts\controlnet.py Traceback (most recent call last): File "F:\SD-WebUI\modules\scripts.py", line 718, in process script.process(p, script_args) File "F:\SD-WebUI\extensions\sd-webui-controlnet\scripts\controlnet.py", line 1143, in process self.controlnet_hack(p) File "F:\SD-WebUI\extensions\sd-webui-controlnet\scripts\controlnet.py", line 1128, in controlnet_hack self.controlnet_main_entry(p) File "F:\SD-WebUI\extensions\sd-webui-controlnet\scripts\controlnet.py", line 1106, in controlnet_main_entry assert i > 0, "InstantID control model should follow ipadapter model." AssertionError: InstantID control model should follow ipadapter model.
Steps to reproduce the problem
What should have happened?
The Face of the generated person should correspond to the person given in CNet.
Commit where the problem happens
webui: https://google.com/search?q=aeb7e9e6897a1e58b10494bd989d001e3d4bc9b634633cd7b559838f612c2867 controlnet: https://github.com/Mikubill/sd-webui-controlnet/commit/c5432dd4f605ff5ddc63a6b477d8df68654ea65c
What browsers do you use to access the UI ?
Mozilla Firefox
Command Line Arguments
List of enabled extensions
Console logs
Additional information
No response