give me steps to solve the following issue I got from comfyui (with pinokio frontend) trying run a workflow: Microsoft Windows [Version 10.0.22631.4169]
(c) Microsoft Corporation. All rights reserved.
C:\pinokio\api\comfyui.git\app>CALL C:\pinokio\bin\miniconda\etc\conda\activate.d\vs2017_get_vsinstall_dir.bat
Did not find VSINSTALLDIR
Windows SDK version found as: "10.0.19041.0"
The system cannot find the path specified.
Did not find VSINSTALLDIR
C:\pinokio\api\comfyui.git\app>if defined INCLUDE (set "INCLUDE_CONDA_NVCC_BACKUP=" )
** ComfyUI startup time: 2024-09-21 15:01:26.299781
** Platform: Windows
** Python version: 3.10.14 | packaged by conda-forge | (main, Mar 20 2024, 12:40:08) [MSC v.1938 64 bit (AMD64)]
** Python executable: C:\pinokio\api\comfyui.git\app\env\Scripts\python.exe
** ComfyUI Path: C:\pinokio\api\comfyui.git\app
** Log path: C:\pinokio\api\comfyui.git\app\comfyui.log
Prestartup times for custom nodes:
0.0 seconds: C:\pinokio\api\comfyui.git\app\custom_nodes\rgthree-comfy
0.9 seconds: C:\pinokio\api\comfyui.git\app\custom_nodes\ComfyUI-Manager
Total VRAM 16376 MB, total RAM 32540 MB
pytorch version: 2.3.1+cu121
Set vram state to: NORMAL_VRAM
Device: cuda:0 NVIDIA GeForce RTX 4080 : cudaMallocAsync
A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.1.1 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.
If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.
Assistant
Traceback (most recent call last): File "C:\pinokio\api\comfyui.git\app\main.py", line 90, in
import execution
File "C:\pinokio\api\comfyui.git\app\execution.py", line 13, in
import nodes
File "C:\pinokio\api\comfyui.git\app\nodes.py", line 21, in
import comfy.diffusers_load
File "C:\pinokio\api\comfyui.git\app\comfy\diffusers_load.py", line 3, in
import comfy.sd
File "C:\pinokio\api\comfyui.git\app\comfy\sd.py", line 8, in
from .ldm.cascade.stage_c_coder import StageC_coder
File "C:\pinokio\api\comfyui.git\app\comfy\ldm\cascade\stage_c_coder.py", line 19, in
import torchvision
File "C:\pinokio\api\comfyui.git\app\env\lib\site-packages\torchvision_init_.py", line 6, in
from torchvision import meta_registrations, datasets, io, models, ops, transforms, utils
File "C:\pinokio\api\comfyui.git\app\env\lib\site-packages\torchvision\models_init.py", line 2, in
from .convnext import *
File "C:\pinokio\api\comfyui.git\app\env\lib\site-packages\torchvision\models\convnext.py", line 8, in
from ..ops.misc import Conv2dNormActivation, Permute
File "C:\pinokio\api\comfyui.git\app\env\lib\site-packages\torchvision\ops_init_.py", line 23, in
from .poolers import MultiScaleRoIAlign
File "C:\pinokio\api\comfyui.git\app\env\lib\site-packages\torchvision\ops\poolers.py", line 10, in
from .roi_align import roi_align
File "C:\pinokio\api\comfyui.git\app\env\lib\site-packages\torchvision\ops\roi_align.py", line 4, in
import torch.dynamo
File "C:\pinokio\api\comfyui.git\app\env\lib\site-packages\torch_dynamo_init.py", line 64, in
torch.manual_seed = disable(torch.manual_seed)
File "C:\pinokio\api\comfyui.git\app\env\lib\site-packages\torch_dynamo\decorators.py", line 50, in disable
return DisableContext()(fn)
File "C:\pinokio\api\comfyui.git\app\env\lib\site-packages\torch_dynamo\eval_frame.py", line 410, in call
(filename is None or trace_rules.check(fn))
File "C:\pinokio\api\comfyui.git\app\env\lib\site-packages\torch_dynamo\trace_rules.py", line 3378, in check
return check_verbose(obj, is_inlined_call).skipped
File "C:\pinokio\api\comfyui.git\app\env\lib\site-packages\torch_dynamo\trace_rules.py", line 3361, in check_verbose
rule = torch._dynamo.trace_rules.lookup_inner(
File "C:\pinokio\api\comfyui.git\app\env\lib\site-packages\torch_dynamo\trace_rules.py", line 3442, in lookup_inner
rule = get_torch_obj_rule_map().get(obj, None)
File "C:\pinokio\api\comfyui.git\app\env\lib\site-packages\torch_dynamo\trace_rules.py", line 2782, in get_torch_obj_rule_map
obj = load_object(k)
File "C:\pinokio\api\comfyui.git\app\env\lib\site-packages\torch_dynamo\trace_rules.py", line 2811, in load_object
val = _load_obj_from_str(x[0])
File "C:\pinokio\api\comfyui.git\app\env\lib\site-packages\torch_dynamo\trace_rules.py", line 2795, in load_obj_from_str
return getattr(importlib.import_module(module), obj_name)
File "C:\pinokio\bin\miniconda\lib\importlib_init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "C:\pinokio\api\comfyui.git\app\env\lib\site-packages\torch\nested_internal\nested_tensor.py", line 417, in
values=torch.randn(3, 3, device="meta"),
C:\pinokio\api\comfyui.git\app\env\lib\site-packages\torch\nested_internal\nested_tensor.py:417: UserWarning: Failed to initialize NumPy: _ARRAY_API not found (Triggered internally at ..\torch\csrc\utils\tensor_numpy.cpp:84.)
values=torch.randn(3, 3, device="meta"),
Using pytorch cross attention
[Prompt Server] web root: C:\pinokio\api\comfyui.git\app\web
[Crystools INFO] Crystools version: 1.17.0
[Crystools INFO] CPU: 13th Gen Intel(R) Core(TM) i7-13700K - Arch: AMD64 - OS: Windows 10
[Crystools INFO] Pynvml (Nvidia) initialized.
[Crystools INFO] GPU/s:
[Crystools INFO] 0) NVIDIA GeForce RTX 4080
[Crystools INFO] NVIDIA Driver: 560.81
Loading: ComfyUI-Impact-Pack (V7.6)
Loading: ComfyUI-Impact-Pack (Subpack: V0.6)
[Impact Pack] Wildcards loading done.
Loading: ComfyUI-Inspire-Pack (V1.2.1)
C:\pinokio\api\comfyui.git\app\env\lib\site-packages\albumentations_init_.py:13: UserWarning: A new version of Albumentations is available: 1.4.15 (you have 1.4.14). Upgrade using: pip install -U albumentations. To disable automatic update checks, set the environment variable NO_ALBUMENTATIONS_UPDATE to 1.
check_for_updates()
Total VRAM 16376 MB, total RAM 32540 MB
pytorch version: 2.3.1+cu121
Set vram state to: NORMAL_VRAM
Device: cuda:0 NVIDIA GeForce RTX 4080 : cudaMallocAsync
Loading: ComfyUI-Manager (V2.51)
ComfyUI Revision: 2715 [364b69e9] | Released on '2024-09-21'
[comfyui_controlnet_aux] | INFO -> Using ckpts path: C:\pinokio\api\comfyui.git\app\custom_nodes\comfyui_controlnet_aux\ckpts
[comfyui_controlnet_aux] | INFO -> Using symlinks: False
[comfyui_controlnet_aux] | INFO -> Using ort providers: ['CUDAExecutionProvider', 'DirectMLExecutionProvider', 'OpenVINOExecutionProvider', 'ROCMExecutionProvider', 'CPUExecutionProvider', 'CoreMLExecutionProvider']
C:\pinokio\api\comfyui.git\app\custom_nodes\comfyui_controlnet_aux\node_wrappers\dwpose.py:26: UserWarning: DWPose: Onnxruntime not found or doesn't come with acceleration providers, switch to OpenCV with CPU device. DWPose might run very slowly
warnings.warn("DWPose: Onnxruntime not found or doesn't come with acceleration providers, switch to OpenCV with CPU device. DWPose might run very slowly")
[tinyterraNodes] Loaded
Traceback (most recent call last):
File "C:\pinokio\api\comfyui.git\app\nodes.py", line 1994, in load_custom_node
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in call_with_frames_removed
File "C:\pinokio\api\comfyui.git\app\custom_nodes\efficiency-nodes-comfyui_init.py", line 9, in
from .efficiency_nodes import NODE_CLASS_MAPPINGS
File "C:\pinokio\api\comfyui.git\app\custom_nodes\efficiency-nodes-comfyui\efficiency_nodes.py", line 403, in
class TSC_KSampler:
File "C:\pinokio\api\comfyui.git\app\custom_nodes\efficiency-nodes-comfyui\efficiency_nodes.py", line 404, in TSC_KSampler
empty_image = pil2tensor(Image.new('RGBA', (1, 1), (0, 0, 0, 0)))
File "C:\pinokio\api\comfyui.git\app\custom_nodes\efficiency-nodes-comfyui\tsc_utils.py", line 83, in pil2tensor
return torch.from_numpy(np.array(image).astype(np.float32) / 255.0).unsqueeze(0)
RuntimeError: Numpy is not available
Cannot import C:\pinokio\api\comfyui.git\app\custom_nodes\efficiency-nodes-comfyui module for custom nodes: Numpy is not available
[rgthree] Loaded 42 magnificent nodes.
[rgthree] NOTE: Will NOT use rgthree's optimized recursive execution as ComfyUI has changed.
Traceback (most recent call last):
File "C:\pinokio\api\comfyui.git\app\nodes.py", line 1994, in load_custom_node
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in call_with_frames_removed
File "C:\pinokio\api\comfyui.git\app\custom_nodes\was-node-suite-comfyui_init.py", line 1, in
from .WAS_Node_Suite import NODE_CLASS_MAPPINGS
File "C:\pinokio\api\comfyui.git\app\custom_nodes\was-node-suite-comfyui\WAS_Node_Suite.py", line 37, in
from numba import jit
File "C:\pinokio\api\comfyui.git\app\env\lib\site-packages\numba_init_.py", line 59, in
ensure_critical_deps()
File "C:\pinokio\api\comfyui.git\app\env\lib\site-packages\numba_init.py", line 45, in _ensure_critical_deps
raise ImportError(msg)
ImportError: Numba needs NumPy 2.0 or less. Got NumPy 2.1.
Cannot import C:\pinokio\api\comfyui.git\app\custom_nodes\was-node-suite-comfyui module for custom nodes: Numba needs NumPy 2.0 or less. Got NumPy 2.1.
To see the GUI go to: http://127.0.0.1:8188
FETCH DATA from: C:\pinokio\api\comfyui.git\app\custom_nodes\ComfyUI-Manager\extension-node-map.json [DONE]
[]
[]
[]
[]
[Impact Pack] Wildcards loading done.
got prompt
!!! Exception during processing !!! Numpy is not available
Traceback (most recent call last):
File "C:\pinokio\api\comfyui.git\app\execution.py", line 323, in execute
output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
File "C:\pinokio\api\comfyui.git\app\execution.py", line 198, in get_output_data
return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
File "C:\pinokio\api\comfyui.git\app\execution.py", line 169, in _map_node_over_list
process_inputs(input_dict, i)
File "C:\pinokio\api\comfyui.git\app\execution.py", line 158, in process_inputs
results.append(getattr(obj, func)(**inputs))
File "C:\pinokio\api\comfyui.git\app\nodes.py", line 1574, in load_image
image = torch.from_numpy(image)[None,]
RuntimeError: Numpy is not available
Prompt executed in 0.07 seconds
It looks like you're encountering errors related to NumPy version compatibility when running ComfyUI with the Pinokio frontend. The main issue is that some modules and custom nodes in your setup require an older version of NumPy, but you currently have NumPy 2.1.1 installed.
Error Summary:
Numba Compatibility Issue:
code
ImportError: Numba needs NumPy 2.0 or less. Got NumPy 2.1.
Numpy Not Available Error:
code
RuntimeError: Numpy is not available
These errors indicate that certain modules were compiled with NumPy 1.x and are incompatible with NumPy 2.1.1. To resolve this, you need to downgrade NumPy to a compatible version (e.g., NumPy 1.24.3).
Steps to Resolve the Issue:
1. Activate the Correct Python Environment
First, you need to activate the Python environment that ComfyUI is using. Based on your command, it seems the environment is located at C:\pinokio\api\comfyui.git\app\env.
This will activate the virtual environment for ComfyUI. You should see (env) or a similar indicator in your command prompt.
2. Verify the Current NumPy Version
Check the currently installed NumPy version:
batch
(env) C:\> pip show numpy
This should display NumPy 2.1.1, which is causing compatibility issues.
3. Uninstall the Current NumPy Version
Uninstall NumPy 2.1.1:
batch
(env) C:\> pip uninstall numpy
Confirm the uninstallation when prompted.
4. Install a Compatible NumPy Version
Install NumPy version 1.24.3, which is compatible with the modules requiring NumPy 1.x:
batch
(env) C:\> pip install numpy==1.24.3
This will install the specified version of NumPy.
5. Verify the NumPy Downgrade
Ensure that NumPy has been downgraded successfully:
batch
(env) C:\> pip show numpy
You should now see:
code
Name: numpy
Version: 1.24.3
6. Restart ComfyUI
Navigate to the ComfyUI application directory and restart the application:
batch
(env) C:\> cd C:\pinokio\api\comfyui.git\app
(env) C:\pinokio\api\comfyui.git\app> python main.py --disable-xformers
Alternatively, if you have a specific command to start ComfyUI with Pinokio frontend, use that command.
7. Test Your Workflow
Try running your workflow again. The NumPy-related errors should be resolved now.
Explanation of the Issue:
NumPy Version Incompatibility:
NumPy 2.x introduced breaking changes that are not compatible with modules compiled against NumPy 1.x.
Modules like Numba and other custom nodes in ComfyUI expect NumPy versions less than 2.0.
Numba Dependency:
Numba is a Just-In-Time compiler that translates a subset of Python and NumPy code into fast machine code.
It requires a NumPy version that it was designed to work with, which is NumPy 1.x in this case.
Custom Nodes and Modules:
Some custom nodes in ComfyUI may have dependencies or compiled extensions that are not yet compatible with NumPy 2.x.
Downgrading NumPy ensures that these nodes can function correctly.
Additional Tips:
Prevent Automatic NumPy Upgrades:
To avoid this issue in the future, you can specify the NumPy version in your requirements.txt or environment configuration files.
Example entry in requirements.txt:
code
numpy==1.24.3
Check for Pending Updates:
Regularly check if the modules you use have been updated to support NumPy 2.x.
Once they are compatible, you can consider upgrading NumPy if needed.
Use Virtual Environments:
Always use isolated virtual environments for different projects to prevent package version conflicts.
Summary:
By downgrading NumPy to a compatible version (1.24.3), you should be able to resolve the compatibility issues with Numba and other custom nodes in ComfyUI. This should allow you to run your workflow without encountering the "Numpy is not available" errors.
If you continue to experience issues or encounter new errors, please provide the updated error messages, and I'll be happy to assist further.