Kosinkadink / ComfyUI-Advanced-ControlNet

ControlNet scheduling and masking nodes with sliding context support
GNU General Public License v3.0
593 stars 59 forks source link

(IMPORT FAILED) under the latest version of Comfyui and the latest version of ComfyUI-Advanced-ControlNet. #181

Closed Giresharu closed 1 month ago

Giresharu commented 1 month ago

Snipaste_2024-09-18_03-14-08 Snipaste_2024-09-18_03-20-34

log:

[START] Security scan
[DONE] Security scan
## ComfyUI-Manager: installing dependencies done.
** ComfyUI startup time: 2024-09-18 03:16:18.367261
** Platform: Windows
** Python version: 3.11.6 (tags/v3.11.6:8b6ee5b, Oct  2 2023, 14:57:12) [MSC v.1935 64 bit (AMD64)]
** Python executable: D:\Program Files\ComfyUI\comfypy\Scripts\python.exe
** ComfyUI Path: D:\Program Files\ComfyUI\ComfyUI
** Log path: D:\Program Files\ComfyUI\comfyui.log

Prestartup times for custom nodes:
   0.0 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\rgthree-comfy
   0.0 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\ComfyUI-Easy-Use
   1.8 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\ComfyUI-Manager

Total VRAM 12288 MB, total RAM 31701 MB
pytorch version: 2.1.2+cu121
Set vram state to: NORMAL_VRAM
Device: cuda:0 NVIDIA GeForce RTX 3060 : cudaMallocAsync
Using pytorch cross attention
[Prompt Server] web root: D:\Program Files\ComfyUI\ComfyUI\web
Traceback (most recent call last):
  File "D:\Program Files\ComfyUI\ComfyUI\nodes.py", line 1941, in load_custom_node
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "D:\Program Files\ComfyUI\ComfyUI\custom_nodes\ComfyUI-Advanced-ControlNet\__init__.py", line 1, in <module>
    from .adv_control.nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
  File "D:\Program Files\ComfyUI\ComfyUI\custom_nodes\ComfyUI-Advanced-ControlNet\adv_control\nodes.py", line 8, in <module>
    from .control import load_controlnet, convert_to_advanced, is_advanced_controlnet, is_sd3_advanced_controlnet
  File "D:\Program Files\ComfyUI\ComfyUI\custom_nodes\ComfyUI-Advanced-ControlNet\adv_control\control.py", line 11, in <module>
    from comfy.controlnet import ControlBase, ControlNet, ControlLora, T2IAdapter, StrengthType
ImportError: cannot import name 'StrengthType' from 'comfy.controlnet' (D:\Program Files\ComfyUI\ComfyUI\comfy\controlnet.py)

Cannot import D:\Program Files\ComfyUI\ComfyUI\custom_nodes\ComfyUI-Advanced-ControlNet module for custom nodes: cannot import name 'StrengthType' from 'comfy.controlnet' (D:\Program Files\ComfyUI\ComfyUI\comfy\controlnet.py)
[Allor]: 0 nodes were overridden.
[Allor]: 12 modules were enabled.
[Allor]: 98 nodes were loaded.
Adding D:\Program Files\ComfyUI\ComfyUI\custom_nodes to sys.path
Efficiency Nodes: Attempting to add Control Net options to the 'HiRes-Fix Script' Node (comfyui_controlnet_aux add-on)...Success!
Loaded Efficiency nodes from D:\Program Files\ComfyUI\ComfyUI\custom_nodes\efficiency-nodes-comfyui
Loaded ControlNetPreprocessors nodes from D:\Program Files\ComfyUI\ComfyUI\custom_nodes\comfyui_controlnet_aux
cannot import name 'StrengthType' from 'comfy.controlnet' (D:\Program Files\ComfyUI\ComfyUI\comfy\controlnet.py)
Could not find AnimateDiff nodes
Loaded IPAdapter nodes from D:\Program Files\ComfyUI\ComfyUI\custom_nodes\ComfyUI_IPAdapter_plus
Loaded VideoHelperSuite from D:\Program Files\ComfyUI\ComfyUI\custom_nodes\ComfyUI-VideoHelperSuite
### Loading: ComfyUI-Impact-Pack (V7.5.2)
### Loading: ComfyUI-Impact-Pack (Subpack: V0.6)
### Loading: ComfyUI-Impact-Pack (V7.5.2)
Loaded ImpactPack nodes from [Impact Pack] Wildcards loading done.D:\Program Files\ComfyUI\ComfyUI\custom_nodes\ComfyUI-Impact-Pack

[Impact Pack] Wildcards loading done.
[Crystools INFO] Crystools version: 1.16.6
[Crystools INFO] CPU: AMD Ryzen 9 7950X 16-Core Processor - Arch: AMD64 - OS: Windows 10
[Crystools INFO] Pynvml (Nvidia) initialized.
[Crystools INFO] GPU/s:
[Crystools INFO] 0) NVIDIA GeForce RTX 3060
[Crystools INFO] NVIDIA Driver: 560.94
[ComfyUI-Easy-Use] server: v1.2.3 Loaded
[ComfyUI-Easy-Use] web root: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\ComfyUI-Easy-Use\web_version/v1 Loaded
### Loading: ComfyUI-Impact-Pack (V7.5.2)
[Impact Pack] Wildcards loading done.
### Loading: ComfyUI-Inspire-Pack (V0.61.2)
Total VRAM 12288 MB, total RAM 31701 MB
pytorch version: 2.1.2+cu121
Set vram state to: NORMAL_VRAM
Device: cuda:0 NVIDIA GeForce RTX 3060 : cudaMallocAsync
### Loading: ComfyUI-Manager (V2.48.6)
### ComfyUI Revision: 2489 [8115d8cc] | Released on '2024-08-07'
json_repair## OK
--------------
 ### Mixlab Nodes: Loaded
ChatGPT.available True
edit_mask.available True
simple_lama_inpainting## OK
## lama torchscript model not found: D:\Program Files\ComfyUI\ComfyUI\models\lama\big-lama.pt,pls download from https://github.com/enesmsahin/simple-lama-inpainting/releases/download/v0.1.0/big-lama.pt
LaMaInpainting.available True
[ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/extension-node-map.json
## clip_interrogator_model not found: D:\Program Files\ComfyUI\ComfyUI\models\clip_interrogator\Salesforce\blip-image-captioning-base, pls download from https://huggingface.co/Salesforce/blip-image-captioning-base
ClipInterrogator.available True
[ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/custom-node-list.json
[ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/alter-list.json
[ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/model-list.json
## text_generator_model not found: D:\Program Files\ComfyUI\ComfyUI\models\prompt_generator\text2image-prompt-generator, pls download from https://huggingface.co/succinctly/text2image-prompt-generator/tree/main
## zh_en_model not found: D:\Program Files\ComfyUI\ComfyUI\models\prompt_generator\opus-mt-zh-en, pls download from https://huggingface.co/Helsinki-NLP/opus-mt-zh-en/tree/main
PromptGenerate.available True
ChinesePrompt.available True
RembgNode_.available True
[ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/github-stats.json
TripoSR.available
MiniCPMNode.available
Scenedetect.available False
FishSpeech.available False
 --------------
Openpose Editor Plus: Loaded
[ReActor] - STATUS - Running v0.5.1-a7 in ComfyUI
Torch version: 2.1.2+cu121
Workspace manager - Openning file hash dict
🦄🦄Loading: Workspace Manager (V2.1.0)
------------------------------------------
Comfyroll Studio v1.76 :  175 Nodes Loaded
------------------------------------------
** For changes, please see patch notes at https://github.com/Suzie1/ComfyUI_Comfyroll_CustomNodes/blob/main/Patch_Notes.md
** For help, please see the wiki at https://github.com/Suzie1/ComfyUI_Comfyroll_CustomNodes/wiki
------------------------------------------
### [START] ComfyUI AlekPet Nodes ###
Node -> ArgosTranslateNode [Loading]
Node -> ExtrasNode [Loading]
Node -> PainterNode [Loading]
Node -> PoseNode [Loading]
Node -> TranslateNode [Loading]
### [END] ComfyUI AlekPet Nodes ###
2024-09-18 03:16:31,241 - roop - INFO - roop v0.0.2
[comfy_mtb] | INFO -> loaded 85 nodes successfuly
FaceDetailer: Model directory already exists
FaceDetailer: Model already exists

[rgthree] Loaded 42 fantastic nodes.
[rgthree] Will use rgthree's optimized recursive execution.

WAS Node Suite: OpenCV Python FFMPEG support is enabled
WAS Node Suite Warning: `ffmpeg_bin_path` is not set in `D:\Program Files\ComfyUI\ComfyUI\custom_nodes\was-node-suite-comfyui\was_suite_config.json` config file. Will attempt to use system ffmpeg binaries if available.
WAS Node Suite: Finished. Loaded 218 nodes successfully.

        "Don't be afraid to give up the good to go for the great." - John D. Rockefeller

Import times for custom nodes:
   0.0 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\websocket_image_save.py
   0.0 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\AIGODLIKE-ComfyUI-Translation
   0.0 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\ComfyUI_LatentToRGB
   0.0 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\LoadLoraWithTags
   0.0 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\sdxl_prompt_styler
   0.0 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\ComfyUI-mxToolkit
   0.0 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\ComfyUI-InstantIDUtils
   0.0 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\ComfyUI_Noise
   0.0 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\sd-dynamic-thresholding
   0.0 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\cg-use-everywhere
   0.0 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\stability-ComfyUI-nodes
   0.0 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\ComfyUI_IPAdapter_plus
   0.0 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\Comfy-Photoshop-SD
   0.0 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\masquerade-nodes-comfyui
   0.0 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\efficiency-nodes-comfyui
   0.0 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\ComfyUI_InstantID
   0.0 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\ComfyUI-VideoHelperSuite
   0.0 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\comfyui-lama-remover
   0.0 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\ComfyUI_experiments
   0.0 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\ComfyUI-post-processing-nodes
   0.0 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\ComfyUI-WD14-Tagger
   0.0 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\ComfyUI-Openpose-Editor-Plus
   0.0 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\ComfyI2I
   0.0 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\wlsh_nodes
   0.0 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\comfyui_controlnet_aux
   0.0 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\ComfyUI-EasyNode
   0.0 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\ComfyUI_JPS-Nodes
   0.0 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\ComfyUI-Text_Image-Composite
   0.0 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\images-grid-comfy-plugin
   0.0 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\ComfyUI-Custom-Scripts
   0.0 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\comfyui-instantId-faceswap
   0.0 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\comfy-image-saver
   0.0 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\ComfyMath
   0.0 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\ComfyUI_essentials
   0.0 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\ComfyUI-Chibi-Nodes
   0.0 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale
   0.0 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\comfyui-magic-clothing
   0.0 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\ComfyUI-Impact-Pack
   0.0 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\comfy-qr
   0.0 seconds (IMPORT FAILED): D:\Program Files\ComfyUI\ComfyUI\custom_nodes\ComfyUI-Advanced-ControlNet
   0.0 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\facerestore
   0.0 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\ComfyUI_roop
   0.0 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\rgthree-comfy
   0.0 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\Derfuu_ComfyUI_ModdedNodes
   0.0 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\ComfyUI-KJNodes
   0.0 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\ComfyUI_Comfyroll_CustomNodes-main
   0.0 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\facerestore_cf
   0.0 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\comfyui-workspace-manager
   0.0 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\ComfyUI-Inspire-Pack
   0.0 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\comfy_mtb
   0.0 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\ComfyUI-Crystools
   0.1 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\comfyui-reactor-node
   0.1 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\comfyui_segment_anything
   0.3 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\clipseg.py
   0.4 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\ComfyUI-Easy-Use
   0.5 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\ComfyUI-Manager
   0.5 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\ComfyUI-Allor
   0.7 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\comfyui-art-venture
   0.9 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\comfyui-mixlab-nodes
   1.4 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\DZ-FaceDetailer
   1.6 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\was-node-suite-comfyui
   2.1 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\ComfyUI-InstantID
   4.0 seconds: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\ComfyUI_Custom_Nodes_AlekPet

Starting server
To see the GUI go to: http://198.18.0.1:8188 or http://127.0.0.1:8188
To see the GUI go to: https://198.18.0.1:8189 or https://127.0.0.1:8189
D:\Program Files\ComfyUI\ComfyUI\custom_nodes\comfyui-mixlab-nodes\webApp\lib/photoswipe-lightbox.esm.min.js
FETCH DATA from: D:\Program Files\ComfyUI\ComfyUI\custom_nodes\ComfyUI-Manager\extension-node-map.json [DONE]
D:\Program Files\ComfyUI\ComfyUI\custom_nodes\comfyui-mixlab-nodes\webApp\lib/photoswipe.min.css
D:\Program Files\ComfyUI\ComfyUI\custom_nodes\comfyui-mixlab-nodes\webApp\lib/pickr.min.js
D:\Program Files\ComfyUI\ComfyUI\custom_nodes\comfyui-mixlab-nodes\webApp\lib/model-viewer.min.js
D:\Program Files\ComfyUI\ComfyUI\custom_nodes\comfyui-mixlab-nodes\webApp\lib/juxtapose.min.js
D:\Program Files\ComfyUI\ComfyUI\custom_nodes\comfyui-mixlab-nodes\webApp\lib/juxtapose.css
D:\Program Files\ComfyUI\ComfyUI\custom_nodes\comfyui-mixlab-nodes\webApp\lib/classic.min.css
data_path:  D:\Program Files\ComfyUI\ComfyUI\custom_nodes\comfyui-mixlab-nodes\data
Error reading JSON from undefined/my_workflows\NSFW\nudy 21.json: Extra data: line 1 column 38721 (char 38720)
Giresharu commented 1 month ago

Oh, I understand now. Don't update to the main branch; need to specify the branch to v1.1.0 instead. So the installation failure in ComfyUI Manager might be due to this reason as well.

Kosinkadink commented 1 month ago

No, v1.1.0 is very outdated. You just need to update ComfyUI.

Giresharu commented 1 month ago

No, v1.1.0 is very outdated. You just need to update ComfyUI.

Sorry, although I switched to the v1.1.0 branch of ComfyUI-Advanced-ControlNet and resolved the issue, I still don’t quite understand what you mean.

I confirmed in the official Comfyui release that the latest version of Comfyui is v0.2.2, which is what I am using, and I have pulled to ensure there is no newer version available.

As for the latest version of ComfyUI-Advanced-ControlNet, I am unsure whether the main branch is a version under development or the latest version?

In any case, cloning the main branch directly will result in the issues mentioned above, so I decided to revert to the v1.1.0 branch. Could it be that normally the main branch is supposed to be the latest usable branch?

Kosinkadink commented 1 month ago

StrengthType is a variable defined in ComfyUI that I am referencing, it is not something I defined myself. Since you get an error about it, it means your ComfyUI version is outdated (likely by at least a month or two).

Link to the exact line of code in current ComfyUI where this is defined: https://github.com/comfyanonymous/ComfyUI/blob/master/comfy/controlnet.py#L58

Giresharu commented 1 month ago

StrengthType is a variable defined in ComfyUI that I am referencing, it is not something I defined myself. Since you get an error about it, it means your ComfyUI version is outdated (likely by at least a month or two).

Link to the exact line of code in current ComfyUI where this is defined: comfyanonymous/ComfyUI@master/comfy/controlnet.py#L58

Thank you! It seems just as you said, my comfyui was missing the StrengthType type. I searched in my local files and found that it was not there, which made me realize that the cloned comfyui repository I have is a version modified by a third party. No wonder there were issues even though it was supposed to be the latest version.