melMass / comfy_mtb

Animation oriented nodes pack for ComfyUI
MIT License
429 stars 49 forks source link

[bug] MTB not working with ComfyUI and pytorch 2.1 / cu121 #114

Closed rethink-studios closed 11 months ago

rethink-studios commented 1 year ago

Describe the bug

loaded a working workflow into the latest ComfyUI using pytorch 2.1 / cu121 and Comfy could not load 7 essential nodes for face swapping

[comfy_mtb] | INFO -> loaded 48 nodes successfuly [comfy_mtb] | INFO -> Some nodes (7) could not be loaded. This can be ignored, but go to http://127.0.0.1:8188/mtb if you want more information.

Reproduction

Load an old working MTB/faceswap scene into ComfyUI and pytorch 2.1 / cu121

Expected behavior

To work?

Operating System

Windows (Default)

Comfy Mode

Comfy Portable (embed) (Default)

Console output

D:\ComfyUI_BETA>.\python_embeded\python.exe -s ComfyUI\main.py --preview-method auto --windows-standalone-build --highvram
** ComfyUI start up time: 2023-10-16 16:15:53.065657

Prestartup times for custom nodes:
   0.0 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\rgthree-comfy
   0.0 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\ComfyUI-Manager

Total VRAM 24564 MB, total RAM 130813 MB
Set vram state to: HIGH_VRAM
Device: cuda:0 NVIDIA GeForce RTX 4090 : cudaMallocAsync
VAE dtype: torch.bfloat16
Using pytorch cross attention
Adding extra search path checkpoints D:/stable-diffusion-webui\models/Stable-diffusion
Adding extra search path configs D:/stable-diffusion-webui\models/Stable-diffusion
Adding extra search path vae D:/stable-diffusion-webui\models/VAE
Adding extra search path loras D:/stable-diffusion-webui\models/Lora
Adding extra search path upscale_models D:/stable-diffusion-webui\models/ESRGAN
Adding extra search path upscale_models D:/stable-diffusion-webui\models/SwinIR
Adding extra search path upscale_models D:/stable-diffusion-webui\models/RealESRGAN
Adding extra search path upscale_models D:/stable-diffusion-webui\models/GFPGAN
Adding extra search path embeddings D:/stable-diffusion-webui\embeddings
Adding extra search path hypernetworks D:/stable-diffusion-webui\models/hypernetworks
Adding extra search path controlnet D:/stable-diffusion-webui/models/ControlNet
Adding extra search path sam D:/stable-diffusion-webui\models/sam
Using pytorch cross attention
### Loading: ComfyUI-Impact-Pack (V4.23.5)
e: module 'sys' has no attribute '__comfyui_manager_register_message_collapse'
### Loading: ComfyUI-Impact-Pack (Subpack: V0.2.4)
### Loading: ComfyUI-Inspire-Pack (V0.30)
### Loading: ComfyUI-Manager (V0.26.2)
### ComfyUI Revision: 1582 [c8013f73]
OpenPose Editor: Loaded
### Loading: ComfyUI-Workflow-Component (V0.42.4) !! WARN: This is an experimental extension. Extremely unstable. !!
Comfyroll Custom Nodes: Loaded
Registered sys.path: ['D:\\ComfyUI_BETA\\ComfyUI\\custom_nodes\\comfyui_controlnet_aux\\src\\__init__.py', 'D:\\ComfyUI_BETA\\ComfyUI\\custom_nodes\\comfyui_controlnet_aux\\src\\custom_pycocotools', 'D:\\ComfyUI_BETA\\ComfyUI\\custom_nodes\\comfyui_controlnet_aux\\src\\custom_oneformer', 'D:\\ComfyUI_BETA\\ComfyUI\\custom_nodes\\comfyui_controlnet_aux\\src\\custom_mmpkg', 'D:\\ComfyUI_BETA\\ComfyUI\\custom_nodes\\comfyui_controlnet_aux\\src\\custom_midas_repo', 'D:\\ComfyUI_BETA\\ComfyUI\\custom_nodes\\comfyui_controlnet_aux\\src\\custom_detectron2', 'D:\\ComfyUI_BETA\\ComfyUI\\custom_nodes\\comfyui_controlnet_aux\\src\\controlnet_aux', 'D:\\ComfyUI_BETA\\ComfyUI\\custom_nodes\\comfyui_controlnet_aux\\src', 'D:\\ComfyUI_BETA\\ComfyUI\\custom_nodes\\ComfyUI_Comfyroll_CustomNodes\\comfy', 'D:\\ComfyUI_BETA\\ComfyUI\\custom_nodes\\ComfyUI_Comfyroll_CustomNodes\\comfy', 'D:\\ComfyUI_BETA\\ComfyUI\\custom_nodes\\ComfyUI-WD14-Tagger\\comfy', 'D:\\ComfyUI_BETA\\ComfyUI\\custom_nodes\\ComfyUI-Custom-Scripts', 'D:\\ComfyUI_BETA\\python_embeded\\Lib\\site-packages\\git\\ext\\gitdb', WindowsPath('D:/ComfyUI_BETA/ComfyUI'), 'D:\\ComfyUI_BETA\\ComfyUI\\custom_nodes\\cg-image-picker', 'D:\\ComfyUI_BETA\\ComfyUI\\comfy', 'D:\\ComfyUI_BETA\\ComfyUI', 'D:\\ComfyUI_BETA\\python_embeded\\python311.zip', 'D:\\ComfyUI_BETA\\python_embeded', 'D:\\ComfyUI_BETA\\python_embeded\\Lib\\site-packages', 'D:\\ComfyUI_BETA\\python_embeded\\Lib\\site-packages\\win32', 'D:\\ComfyUI_BETA\\python_embeded\\Lib\\site-packages\\win32\\lib', 'D:\\ComfyUI_BETA\\python_embeded\\Lib\\site-packages\\Pythonwin', 'D:\\ComfyUI_BETA\\ComfyUI\\custom_nodes\\ComfyUI-Impact-Pack\\modules', 'D:\\ComfyUI_BETA\\ComfyUI\\custom_nodes\\ComfyUI-Impact-Pack\\impact_subpack', '../..', 'D:\\ComfyUI_BETA\\ComfyUI\\custom_nodes\\ComfyUI-Workflow-Component']
DWPose: Onnxruntime with acceleration providers detected. Caching sessions (might take around half a minute)...
EP Error D:\a\_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1193 onnxruntime::ProviderLibrary::Get [ONNXRuntimeError] : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "D:\ComfyUI_BETA\python_embeded\Lib\site-packages\onnxruntime\capi\onnxruntime_providers_tensorrt.dll"
 when using ['TensorrtExecutionProvider', 'CUDAExecutionProvider', 'CPUExecutionProvider']
Falling back to ['CUDAExecutionProvider', 'CPUExecutionProvider'] and retrying.
2023-10-16 16:15:56.0629162 [E:onnxruntime:Default, provider_bridge_ort.cc:1480 onnxruntime::TryGetProviderInfo_CUDA] D:\a\_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1193 onnxruntime::ProviderLibrary::Get [ONNXRuntimeError] : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "D:\ComfyUI_BETA\python_embeded\Lib\site-packages\onnxruntime\capi\onnxruntime_providers_cuda.dll"

2023-10-16 16:15:56.0680855 [W:onnxruntime:Default, onnxruntime_pybind_state.cc:743 onnxruntime::python::CreateExecutionProviderInstance] Failed to create CUDAExecutionProvider. Please reference https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html#requirements to ensure all dependencies are met.
EP Error D:\a\_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1193 onnxruntime::ProviderLibrary::Get [ONNXRuntimeError] : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "D:\ComfyUI_BETA\python_embeded\Lib\site-packages\onnxruntime\capi\onnxruntime_providers_tensorrt.dll"
 when using ['TensorrtExecutionProvider', 'CUDAExecutionProvider', 'CPUExecutionProvider']
Falling back to ['CUDAExecutionProvider', 'CPUExecutionProvider'] and retrying.
2023-10-16 16:15:56.4598113 [E:onnxruntime:Default, provider_bridge_ort.cc:1480 onnxruntime::TryGetProviderInfo_CUDA] D:\a\_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1193 onnxruntime::ProviderLibrary::Get [ONNXRuntimeError] : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "D:\ComfyUI_BETA\python_embeded\Lib\site-packages\onnxruntime\capi\onnxruntime_providers_cuda.dll"

2023-10-16 16:15:56.4668608 [W:onnxruntime:Default, onnxruntime_pybind_state.cc:743 onnxruntime::python::CreateExecutionProviderInstance] Failed to create CUDAExecutionProvider. Please reference https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html#requirements to ensure all dependencies are met.
DWPose: Sessions cached
Davemane42 Custom Nodes: Loaded
FizzleDorf Custom Nodes: Loaded
Loading network distribution node pack
[tinyterraNodes] Loaded
[comfy_mtb] | WARNING -> Failed to remove web mtb directory: Cannot call rmtree on a symbolic link
Please manually remove it from disk (D:\ComfyUI_BETA\ComfyUI\web\extensions\mtb) and restart the server.
[comfy_mtb] | INFO -> loaded 48 nodes successfuly
[comfy_mtb] | INFO -> Some nodes (7) could not be loaded. This can be ignored, but go to http://127.0.0.1:8188/mtb if you want more information.
Efficiency Nodes: Adding City96's 'SD-Latent-Upscaler' selections to the 'HighRes-Fix' node...Success!
Patching UNetModel.forward
UNetModel.forward has been successfully patched.
Downloading anime face detector...
Failed to download lbpcascade_animeface.xml so please download it yourself.
[Power Noise Suite]: 🦚🦚🦚 Hrruuh-hhruh!!! 🦚🦚🦚
[Power Noise Suite]: Tamed 11 wild nodes.

[rgthree] Loaded 15 exciting nodes.
[rgthree] Optimizing ComfyUI recursive execution. If queueing and/or re-queueing seems broken, change "patch_recursive_execution" to false in rgthree_config.json

Searge-SDXL v4.2 in D:\ComfyUI_BETA\ComfyUI\custom_nodes\SeargeSDXL
WAS Node Suite: BlenderNeko's Advanced CLIP Text Encode found, attempting to enable `CLIPTextEncode` support.
WAS Node Suite: `CLIPTextEncode (BlenderNeko Advanced + NSP)` node enabled under `WAS Suite/Conditioning` menu.
WAS Node Suite: OpenCV Python FFMPEG support is enabled
WAS Node Suite: `ffmpeg_bin_path` is set to: D:\ComfyUI\ComfyUI\ffmpeg\bin
WAS Node Suite: Finished. Loaded 197 nodes successfully.

        "Art is not about making something perfect, it's about making something meaningful." - Unknown

Import times for custom nodes:
   0.0 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\SDXLAspectRatio.py
   0.0 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\gcLatentTunnel.py
   0.0 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\SD-Latent-Upscaler
   0.0 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\ksampler_sdxl.py
   0.0 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\Textnode.py
   0.0 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\ComfyUI-SDXL-EmptyLatentImage
   0.0 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\comfyui-latentmirror
   0.0 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\sdxl_prompt_styler
   0.0 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\noise_latent_perlinpinpin
   0.0 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\sdxl-recommended-res-calc
   0.0 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\ComfyUI_Noise
   0.0 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\ComfyUi_PromptStylers
   0.0 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\comfyui_dagthomas
   0.0 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\ComfyUI_TiledKSampler
   0.0 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\cg_custom_core
   0.0 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\ComfyUI-post-processing-nodes
   0.0 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\ComfyUI_ADV_CLIP_emb
   0.0 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\ComfyUI_NetDist
   0.0 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\ComfyUI_Cutoff
   0.0 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\ComfyUI_NestedNodeBuilder
   0.0 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\ComfyUI_IPAdapter_plus
   0.0 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\FreeU_Advanced
   0.0 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\stability-ComfyUI-nodes
   0.0 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\ComfyUI_SeeCoder
   0.0 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\ComfyI2I
   0.0 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\ComfyUI_Dave_CustomNode
   0.0 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\ComfyUI-Loopchain
   0.0 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\cg-use-everywhere
   0.0 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\PowerNoiseSuite
   0.0 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\ComfyUI-Advanced-ControlNet
   0.0 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\ComfyUI-OpenPose-Editor
   0.0 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\ComfyUI_fabric
   0.0 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\ComfyUI-Custom-Scripts
   0.0 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\ComfyUI-Inspire-Pack
   0.0 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\cg-image-picker
   0.0 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\IPAdapter-ComfyUI
   0.0 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale
   0.0 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\ComfyUI_experiments
   0.0 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\ComfyUI_Comfyroll_CustomNodes
   0.0 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\ComfyUI-AnimateDiff-Evolved
   0.0 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\images-grid-comfy-plugin
   0.0 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\Derfuu_ComfyUI_ModdedNodes
   0.0 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\efficiency-nodes-comfyui
   0.0 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\rgthree-comfy
   0.0 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\ComfyUI_essentials
   0.0 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\ComfyUI-Workflow-Component
   0.0 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\ComfyUI-WD14-Tagger
   0.1 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\comfy_mtb
   0.1 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\ComfyUI_FizzNodes
   0.2 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\SeargeSDXL
   0.2 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\clipseg.py
   0.2 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\ComfyUI-Manager
   0.2 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\ComfyUI-Impact-Pack
   0.4 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\ComfyUI_tinyterraNodes
   0.8 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\was-node-suite-comfyui
   1.1 seconds: D:\ComfyUI_BETA\ComfyUI\custom_nodes\comfyui_controlnet_aux

Starting server

To see the GUI go to: http://127.0.0.1:8188
FETCH DATA from: D:\ComfyUI_BETA\ComfyUI\custom_nodes\ComfyUI-Manager\extension-node-map.json

Additional context

LOVE faceswapping, and wanted to upgrade ComfyUI without xformers. Currently migrating away from the old build

melMass commented 1 year ago

Hey,

Thanks for the report, the faceswap and film nodes have been superseded by other extensions, you can read more about it here: https://github.com/melMass/comfy_mtb#optional-nodes

That said they are still there as I like their implementation and I will add some simple instructions soon for people that still want to use them.

FILM will probably never get updated since I use the original implementation from google (that is quite old) that relies on tensorflow, and unfortunately tensorflow on windows doesn't support GPU and I've already spent way too much time on this isolated matter. The FrameInterpolation nodes are way better anyway I did not test it yet but it includes FILM among other models and use a PyTorch implementation of the original paper, removing all the issues I had.