mirror of
https://github.com/Comfy-Org/comfy-kitchen.git
synced 2026-11-04 23:37:42 +00:00
[GH-ISSUE #5] cannot import name '_C' from partially initialized module 'comfy_kitchen.backends.cuda #2
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/comfy-kitchen#2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @lyh111901886 on GitHub (Jan 6, 2026).
Original GitHub issue: https://github.com/Comfy-Org/comfy-kitchen/issues/5
Found comfy_kitchen backend cuda: {'available': False, 'disabled': False, 'unavailable_reason': "cannot import name '_C' from partially initialized module 'comfy_kitchen.backends.cuda' (most likely due to a circular import) (E:\AI\ComfyUI_Mie_V7.0\python_embeded\Lib\site-packages\comfy_kitchen\backends\cuda\init.py)", 'capabilities': []}
@contentis commented on GitHub (Jan 6, 2026):
Could you try installing comfy-kitchen[cublas]?
@ailthrim commented on GitHub (Jan 6, 2026):
That didn't solve it for me. Renaming the _C.abi3.pyd file doesn't fix it either.
Same exact error.
@contentis commented on GitHub (Jan 6, 2026):
Could you share:
@patientx commented on GitHub (Jan 6, 2026):
same thing here and I have and amd gpu using rocm. Hopefully this whole thing isn't nvidia centered and if that is so all the models comfy would support in the future also won't use this as base since we can already use / load / generate 99% of the models with base comfy setup with our amd gpus.
@contentis commented on GitHub (Jan 6, 2026):
You'll not be able to run CUDA compiled code on AMD. But this shouldn't be an issue - if a backend is not available (e.g. CUDA) it'll fallback in order CUDA->Triton->Eager by default. You can also set the priority manually and or disbale backends. It should not break any compatability - with the worst case being fallback to the torch-eager / default behaviour.
@ailthrim commented on GitHub (Jan 6, 2026):
Absolutely.
Also, I compiled comfy-kitchen from source using CUDA 13.0 Toolkit and it built fine, but same issue related to "import _C".
@twri commented on GitHub (Jan 6, 2026):
Probably same issue as #4.
@contentis commented on GitHub (Jan 6, 2026):
Could you try using this and see if it fixes the issue: https://github.com/Comfy-Org/comfy-kitchen/pull/8
You can also just replace the cuda/init.py to test in your current install.
@tuolaku commented on GitHub (Jan 6, 2026):
the same issue.
Python 3.13.9
PyTorch:2.9.1+cu130
显卡:RTX 5090D(SM120)
@brendanwallison commented on GitHub (Jan 6, 2026):
I was getting this error. After using the most recent hotfix, the error shifted.
Found comfy_kitchen backend cuda: {'available': False, 'disabled': False, 'unavailable_reason': 'DLL load failed while importing _C: The specified module could not be found.', 'capabilities': []}
Python version: 3.13.5
pytorch version: 2.9.1+cu130
ComfyUI version: 0.7.0
GPU: RTX 3090
@contentis commented on GitHub (Jan 6, 2026):
Can you check if cublas is installed using pip freeze?
@Vanlams commented on GitHub (Jan 7, 2026):
Found comfy_kitchen backend cuda: {'available': False, 'disabled': True, 'unavailable_reason': 'DLL load failed while importing _C: 找不到指定的模块。', 'capabilities': []}
How can I solve this problem? I compiled comfy_kitchen, but it still doesn't work. Even after upgrading comfy_kitchen to 0.2.3, the problem persists.
Checkpoint files will always be loaded safely.
Total VRAM 24576 MB, total RAM 65457 MB
pytorch version: 2.9.1+cu128
xformers version: 0.0.33.post2
Set vram state to: NORMAL_VRAM
Device: cuda:0 NVIDIA GeForce RTX 3090 : cudaMallocAsync
Using async weight offloading with 2 streams
Enabled pinned memory 29455.0
working around nvidia conv3d memory bug.
Found comfy_kitchen backend eager: {'available': True, 'disabled': False, 'unavailable_reason': None, 'capabilities': ['apply_rope', 'apply_rope1', 'dequantize_nvfp4', 'dequantize_per_tensor_fp8', 'quantize_nvfp4', 'quantize_per_tensor_fp8', 'scaled_mm_nvfp4']}
Found comfy_kitchen backend cuda: {'available': False, 'disabled': True, 'unavailable_reason': 'DLL load failed while importing _C: 找不到指定的模块。', 'capabilities': []}
Found comfy_kitchen backend triton: {'available': True, 'disabled': True, 'unavailable_reason': None, 'capabilities': ['apply_rope', 'apply_rope1', 'dequantize_nvfp4', 'dequantize_per_tensor_fp8', 'quantize_nvfp4', 'quantize_per_tensor_fp8']}
Using xformers attention
Python version: 3.12.8 (tags/v3.12.8:2dc476b, Dec 3 2024, 19:30:04) [MSC v.1942 64 bit (AMD64)]
ComfyUI version: 0.7.0
ComfyUI frontend version: 1.35.9
[Prompt Server] web root: E:\Stable-Diffusion\ComfyUI\python_embeded\Lib\site-packages\comfyui_frontend_package\static
Total VRAM 24576 MB, total RAM 65457 MB
pytorch version: 2.9.1+cu128
xformers version: 0.0.33.post2
Set vram state to: NORMAL_VRAM
Device: cuda:0 NVIDIA GeForce RTX 3090 : cudaMallocAsync
Using async weight offloading with 2 streams
Enabled pinned memory 29455.0
@ailthrim commented on GitHub (Jan 7, 2026):
I updated to the latest version of comfy-kitchen 0.2.3, built from source. It appears to be working properly now. Have yet to actually test the fp8 performance however. Thanks. Also, pytest PASSED essentially every test except for 8 but that's because my 4070 Ti doesn't support nvfp4. All good!