Closed makeoo1 closed 9 months ago
What's the output of "pip list -v"? If the packages are somewhere other than appdata\local you're probably installing to another python. What command are you using to install torch? It's best to install with
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121 or whatever current command https://pytorch.org/get-started/locally/ lists
Follow the instructions at https://pytorch.org/get-started/locally/#windows-verification afterwards and see if you can
If torch_directml got installed somehow you probably need to remove that first too.
sorry for the late answer:
-I used the command that is given in the installation section and follow it step by step. Right now i have installed torch with cu181 because for some reason also my A1111 was giving me problems and it was slower then usual ( i normally got around 29 it/s ). I followed the steps in this post to install torch https://www.reddit.com/r/StableDiffusion/comments/11x57ev/installing_cudnn_to_boost_stable_diffusion/
-how can i remove torch_directml?
-attached is my -v list.
thx for the help!
UPDATE:
i made it work by following your steps, downgrading protobuf, unistalling x formers from the directory and looking around online.
But now i am getting this error which i am not sure what does it even mean;
eidt: i am also getting this error
Thx again
Glad stuff is working. :-) I don't know why torch is such a pain sometimes but that command above will always do it for me.
The tensorflow error appears to be because it's built against an outdated CUDA version, so I'd just reinstall tensorflow against the same runtime you used for torch. I don't think many nodes actually use it for anything but might as well fix it.
You can install an xformers + flash-attention2 windows version that works with PyTorch 2.1.0 and CUDA 12.1 if you want from https://github.com/bdashore3/flash-attention/releases/download/2.3.2/flash_attn-2.3.2-cp310-cp310-win_amd64.whl (then pip install the wheel when it's done downloading) and pip3 install -U xformers --index-url https://download.pytorch.org/whl/cu121 I found that it speeds things up by a lot on larger image generations vs the pytorch2 attention (and helps smaller sizes too, just nothing spectacular vs pytorch2) so you might want to install it but it isn't required. Now that flash attention 2 is building correctly on windows again the xformers builds might include it already, I'm not entirely sure since it's a different module. I'd just install flash attention first then do xformers. I did similar but xformers didn't have a wheel built against any of the newer versions yet so that's built from source on my machine.
The socket error is something I've been hitting a lot since Saturday, mainly when I update all nodes with ComfyUI-Manager; there's a bug happening in some node that calls the local websockets interacting with web browsers which it attempts to redirect to different security settings, I'm still clueless on how to fix that one. It usually doesn't cause further issues unless you access something that tries to open an internet connection, then the whole cmd window will freeze. Full debug web server output didn't give me anything useful about what was causing it except a 101 response when a local ws:// URL was accessed.
Many thanks for everything and the explanation!
I will do as soon as i can and report here any updates (in case you wanna keep the issue open)
Have a good one :D
Hey sorry it took more than i thought. I been trying for a while to get it working but I can't get it done. I am trying to install Flash_attn by following your instruction but i am getting this error. I downloaded the file and the did "pip install flash-attn==2.3.2" in the windows CMD .
ah installing wheels is a different command. It's trying to do the build, you want:
pip install flash_attn-2.3.2-cp310-cp310-win_amd64.whl
in the directory you saved the download
The error you got is because you don't have the CUDA developer's toolkit installed (nvcc is from that) which also needs at least the visual studio community tools installed. You shouldn't need it unless you're really dead set on building something from scratch.
I followed your steps and i think i installed everything correcly but now im getting an error with the K sampler and i can't render anything. I updated comfyui and then installed xformes.
Microsoft Windows [Version 10.0.19045.3693] (c) Microsoft Corporation. All rights reserved.
C:_ComfyUi\ComfyUI>python main.py --dont-upcast-attention --auto-launch ** ComfyUI start up time: 2023-11-20 20:29:48.763810
Prestartup times for custom nodes: 0.0 seconds: C:_ComfyUi\ComfyUI\custom_nodes\ComfyUI-Manager
Total VRAM 24563 MB, total RAM 32690 MB
xformers version: 0.0.22.post7
2023-11-20 20:29:51.010080: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found
2023-11-20 20:29:51.010175: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
Set vram state to: NORMAL_VRAM
Device: cuda:0 NVIDIA GeForce RTX 4090 : cudaMallocAsync
VAE dtype: torch.bfloat16
disabling upcasting of attention
Using xformers cross attention
Adding extra search path checkpoints C:/SD/stable-diffusion-webui/models/Stable-diffusion
Adding extra search path configs C:/SD/stable-diffusion-webui/models/Stable-diffusion
Adding extra search path vae C:/SD/stable-diffusion-webui/models/VAE
Adding extra search path loras C:/SD/stable-diffusion-webui/models/Lora
Adding extra search path loras C:/SD/stable-diffusion-webui/models/LyCORIS
Adding extra search path upscale_models C:/SD/stable-diffusion-webui/models/ESRGAN
Adding extra search path upscale_models C:/SD/stable-diffusion-webui/models/RealESRGAN
Adding extra search path upscale_models C:/SD/stable-diffusion-webui/models/SwinIR
Adding extra search path embeddings C:/SD/stable-diffusion-webui/embeddings
Adding extra search path hypernetworks C:/SD/stable-diffusion-webui/models/hypernetworks
Adding extra search path controlnet C:_SD_\stable-diffusion-webui\extensions\sd-webui-controlnet\models
[AnimateDiff] - WARNING - xformers is enabled but it has a bug that can cause issue while using with AnimateDiff.
Traceback (most recent call last):
File "C:_ComfyUi\ComfyUI\nodes.py", line 1735, in load_custom_node
module_spec.loader.exec_module(module)
File "
Cannot import C:_ComfyUi\ComfyUI\custom_nodes\comfyui-animatediff module for custom nodes: module 'comfy.model_management' has no attribute 'maximum_batch_area'
Comfyroll Custom Nodes: Loaded Registered sys.path: ['C:\_ComfyUi\ComfyUI\custom_nodes\comfyui_controlnet_aux\src\init.py', 'C:\_ComfyUi\ComfyUI\custom_nodes\comfyui_controlnet_aux\src\custom_pycocotools', 'C:\_ComfyUi\ComfyUI\custom_nodes\comfyui_controlnet_aux\src\custom_oneformer', 'C:\_ComfyUi\ComfyUI\custom_nodes\comfyui_controlnet_aux\src\custom_mmpkg', 'C:\_ComfyUi\ComfyUI\custom_nodes\comfyui_controlnet_aux\src\custom_midas_repo', 'C:\_ComfyUi\ComfyUI\custom_nodes\comfyui_controlnet_aux\src\custom_detectron2', 'C:\_ComfyUi\ComfyUI\custom_nodes\comfyui_controlnet_aux\src\controlnet_aux', 'C:\_ComfyUi\ComfyUI\custom_nodes\comfyui_controlnet_aux\src', 'C:\_ComfyUi\ComfyUI\custom_nodes\ComfyUI_Comfyroll_CustomNodes\nodes\comfy', 'C:\_ComfyUi\ComfyUI\custom_nodes\ComfyUI_Comfyroll_CustomNodes\nodes\comfy', 'C:\_ComfyUi\ComfyUI\custom_nodes\ComfyUI_Comfyroll_CustomNodes\nodes\comfy', 'C:\_ComfyUi\ComfyUI\custom_nodes\ComfyUI_Comfyroll_CustomNodes\nodes\comfy', 'C:\_ComfyUi\ComfyUI\custom_nodes\ComfyUI-Frame-Interpolation', 'C:\Users\M\AppData\Local\Programs\Python\Python310\lib\site-packages\git\ext\gitdb', 'C:\_ComfyUi\ComfyUI\comfy', 'C:\_ComfyUi\ComfyUI', 'C:\Users\M\AppData\Local\Programs\Python\Python310\python310.zip', 'C:\Users\M\AppData\Local\Programs\Python\Python310\DLLs', 'C:\Users\M\AppData\Local\Programs\Python\Python310\lib', 'C:\Users\M\AppData\Local\Programs\Python\Python310', 'C:\Users\M\AppData\Local\Programs\Python\Python310\lib\site-packages', 'C:\Users\M\AppData\Local\Programs\Python\Python310\lib\site-packages\win32', 'C:\Users\M\AppData\Local\Programs\Python\Python310\lib\site-packages\win32\lib', 'C:\Users\M\AppData\Local\Programs\Python\Python310\lib\site-packages\Pythonwin', '../..'] DWPose: Onnxruntime with acceleration providers detected. Caching sessions (might take around half a minute)... 2023-11-20 20:29:55.0525022 [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 "C:\Users\M\AppData\Local\Programs\Python\Python310\lib\site-packages\onnxruntime\capi\onnxruntime_providers_cuda.dll"
2023-11-20 20:29:55.0599594 [W:onnxruntime:Default, onnxruntime_pybind_state.cc:747 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. 2023-11-20 20:29:55.4626093 [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 "C:\Users\M\AppData\Local\Programs\Python\Python310\lib\site-packages\onnxruntime\capi\onnxruntime_providers_cuda.dll"
2023-11-20 20:29:55.4699695 [W:onnxruntime:Default, onnxruntime_pybind_state.cc:747 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
FizzleDorf Custom Nodes: Loaded
C:\Users\M\AppData\Local\Programs\Python\Python310\lib\site-packages\torchvision\transforms\functional_tensor.py:5: UserWarning: The torchvision.transforms.functional_tensor module is deprecated in 0.15 and will be removed in 0.17. Please don't rely on it. You probably just need to use APIs in torchvision.transforms.functional or in torchvision.transforms.v2.functional.
warnings.warn(
[comfy_mtb] | INFO -> loaded 56 nodes successfuly
[comfy_mtb] | INFO -> Some nodes (3) could not be loaded. This can be ignored, but go to http://127.0.0.1:8188/mtb if you want more information.
Traceback (most recent call last):
File "C:_ComfyUi\ComfyUI\nodes.py", line 1735, in load_custom_node
module_spec.loader.exec_module(module)
File "
Cannot import C:_ComfyUi\ComfyUI\custom_nodes\efficiency-nodes-comfyui module for custom nodes: cannot import name 'CompVisVDenoiser' from 'comfy.samplers' (C:_ComfyUi\ComfyUI\comfy\samplers.py)
WAS Node Suite: OpenCV Python FFMPEG support is enabled
WAS Node Suite Warning: ffmpeg_bin_path
is not set in C:\_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 197 nodes successfully.
"Challenges are what make life interesting and overcoming them is what makes life meaningful." - Joshua J. Marine
Import times for custom nodes: 0.0 seconds: C:_ComfyUi\ComfyUI\custom_nodes\ComfyUI-Image-Selector 0.0 seconds: C:_ComfyUi\ComfyUI\custom_nodes\sd-dynamic-thresholding 0.0 seconds: C:_ComfyUi\ComfyUI\custom_nodes\ComfyUi_NNLatentUpscale 0.0 seconds: C:_ComfyUi\ComfyUI\custom_nodes\stability-ComfyUI-nodes 0.0 seconds: C:_ComfyUi\ComfyUI\custom_nodes\ComfyUI-Advanced-ControlNet 0.0 seconds: C:_ComfyUi\ComfyUI\custom_nodes\ComfyUI_FizzNodes 0.0 seconds: C:_ComfyUi\ComfyUI\custom_nodes\images-grid-comfy-plugin 0.0 seconds: C:_ComfyUi\ComfyUI\custom_nodes\ComfyUI-Inspire-Pack 0.0 seconds: C:_ComfyUi\ComfyUI\custom_nodes\ComfyUI-AnimateDiff-Evolved 0.0 seconds (IMPORT FAILED): C:_ComfyUi\ComfyUI\custom_nodes\comfyui-animatediff 0.0 seconds (IMPORT FAILED): C:_ComfyUi\ComfyUI\custom_nodes\efficiency-nodes-comfyui 0.0 seconds: C:_ComfyUi\ComfyUI\custom_nodes\ComfyUI-Frame-Interpolation 0.0 seconds: C:_ComfyUi\ComfyUI\custom_nodes\Derfuu_ComfyUI_ModdedNodes 0.0 seconds: C:_ComfyUi\ComfyUI\custom_nodes\ComfyUI-VideoHelperSuite 0.2 seconds: C:_ComfyUi\ComfyUI\custom_nodes\ComfyUI_Comfyroll_CustomNodes 0.4 seconds: C:_ComfyUi\ComfyUI\custom_nodes\ComfyUI-Manager 0.8 seconds: C:_ComfyUi\ComfyUI\custom_nodes\comfy_mtb 1.5 seconds: C:_ComfyUi\ComfyUI\custom_nodes\comfyui_controlnet_aux 1.6 seconds: C:_ComfyUi\ComfyUI\custom_nodes\was-node-suite-comfyui
Starting server
To see the GUI go to: http://127.0.0.1:8188 FETCH DATA from: C:_ComfyUi\ComfyUI\custom_nodes\ComfyUI-Manager\extension-node-map.json [comfy_mtb] | WARNING -> Found multiple match, we will pick the first C:_ComfyUi\ComfyUI\models\upscale_models ['C:\_ComfyUi\ComfyUI\models\upscale_models', 'C:/SD/stable-diffusion-webui/models/ESRGAN', 'C:/SD/stable-diffusion-webui/models/RealESRGAN', 'C:/SD/stable-diffusion-webui/models/SwinIR'] [comfy_mtb] | WARNING -> No Face Restore checkpoints found at C:_ComfyUi\ComfyUI\models\face_restore (if you've used mtb before these checkpoints were saved in upscale_models before) [comfy_mtb] | WARNING -> For now we fallback to upscale_models but this will be removed in a future version got prompt model_type EPS adm 0 Using xformers attention in VAE Working with z of shape (1, 4, 32, 32) = 4096 dimensions. Using xformers attention in VAE missing {'cond_stage_model.clip_l.text_projection', 'cond_stage_model.clip_l.logit_scale'} [AnimateDiffEvo] - INFO - Loading motion module mm_sd_v15_v2.ckpt [AnimateDiffEvo] - INFO - Using fp16, converting motion module to fp16 Requested to load SD1ClipModel Loading 1 new model [] [] [] [] Using xformers attention in VAE Working with z of shape (1, 4, 32, 32) = 4096 dimensions. Using xformers attention in VAE Leftover VAE keys ['model_ema.decay', 'model_ema.num_updates'] [AnimateDiffEvo] - INFO - Ejecting motion module mm_sd_v15_v2.ckpt version None. ERROR:root:!!! Exception during processing !!! ERROR:root:Traceback (most recent call last): File "C:_ComfyUi\ComfyUI\custom_nodes\ComfyUI-AnimateDiff-Evolved\animatediff\sampling.py", line 140, in animatediff_sample orig_maximum_batch_area = model_management.maximum_batch_area # allows for "unlimited area hack" to prevent halving of conds/unconds AttributeError: module 'comfy.model_management' has no attribute 'maximum_batch_area'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:_ComfyUi\ComfyUI\execution.py", line 153, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "C:_ComfyUi\ComfyUI\execution.py", line 83, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) File "C:_ComfyUi\ComfyUI\execution.py", line 76, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) File "C:_ComfyUi\ComfyUI\nodes.py", line 1237, in sample return common_ksampler(model, seed, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, denoise=denoise) File "C:_ComfyUi\ComfyUI\nodes.py", line 1207, in common_ksampler samples = comfy.sample.sample(model, noise, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, File "C:_ComfyUi\ComfyUI\custom_nodes\ComfyUI-AnimateDiff-Evolved\animatediff\sampling.py", line 205, in animatediff_sample model_management.maximum_batch_area = orig_maximum_batch_area UnboundLocalError: local variable 'orig_maximum_batch_area' referenced before assignment
Prompt executed in 19.52 seconds got prompt model_type EPS adm 0 Using xformers attention in VAE Working with z of shape (1, 4, 32, 32) = 4096 dimensions. Using xformers attention in VAE missing {'cond_stage_model.clip_l.text_projection', 'cond_stage_model.clip_l.logit_scale'} loaded straight to GPU Requested to load BaseModel Loading 1 new model Requested to load SD1ClipModel Loading 1 new model [AnimateDiffEvo] - INFO - Ejecting motion module mm_sd_v15_v2.ckpt version None. ERROR:root:!!! Exception during processing !!! ERROR:root:Traceback (most recent call last): File "C:_ComfyUi\ComfyUI\custom_nodes\ComfyUI-AnimateDiff-Evolved\animatediff\sampling.py", line 140, in animatediff_sample orig_maximum_batch_area = model_management.maximum_batch_area # allows for "unlimited area hack" to prevent halving of conds/unconds AttributeError: module 'comfy.model_management' has no attribute 'maximum_batch_area'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:_ComfyUi\ComfyUI\execution.py", line 153, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "C:_ComfyUi\ComfyUI\execution.py", line 83, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) File "C:_ComfyUi\ComfyUI\execution.py", line 76, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) File "C:_ComfyUi\ComfyUI\nodes.py", line 1237, in sample return common_ksampler(model, seed, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, denoise=denoise) File "C:_ComfyUi\ComfyUI\nodes.py", line 1207, in common_ksampler samples = comfy.sample.sample(model, noise, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, File "C:_ComfyUi\ComfyUI\custom_nodes\ComfyUI-AnimateDiff-Evolved\animatediff\sampling.py", line 205, in animatediff_sample model_management.maximum_batch_area = orig_maximum_batch_area UnboundLocalError: local variable 'orig_maximum_batch_area' referenced before assignment
Prompt executed in 18.86 seconds
UPDATE:
sorry for the confusion, the error i just mentioned i don't think it's related with what we were talking about.
I fixed the sampler error by downgrading to the version of the day I installed comfyui (ee74ef5).
It seems that the images generation was indeed speed up! But i am not sure about what's happening with the Ksampler
@makeoo1 do you fix the problem? I have the same problem... :S
@makeoo1 do you fix the problem? I have the same problem... :S
nope ... :/
@makeoo1 do you fix the problem? I have the same problem... :S
nope ... :/
Finally i started the program...
I repeat all installation steps from "Anaconda" instead the "Windows Power Shell". And later i started the script with the command from Anaconda too.
Now the script start fine for me
For this issue, I choose to delete the entire directory of "python_embeded" and then copy a new one from the consolidation package. Silly but fast...Of course, some node environments still need to be reinstalled, but at least there won't be any more errors
never had a problem before then I installed a custom node that caused comfyUI to stop working. I removed the node from the folder but still didn't work. I reinstalled the comfyUI folder but i get this error also after following the steps in the installation guide. I tired to reinstall torch few times but i always get this error