ComfyUI模型下载与路径问题解决
1.路径报错信息一
got prompt
model_path is D:\AI\ComfyUI_windows\ComfyUI\custom_nodes\comfyui_controlnet_aux\ckpts\hr16\Diffusion-Edge\diffusion_edge_indoor.pt
making attention of type 'vanilla' with 512 in_channels
Working with z of shape (1, 3, 80, 80) = 19200 dimensions.
making attention of type 'vanilla' with 512 in_channels
Failed to find C:\Users\彭林/.cache\torch\hub\checkpoints\vgg16-397923af.pth.
Downloading from pytorch.org
model_path is D:\AI\ComfyUI_windows\ComfyUI\custom_nodes\comfyui_controlnet_aux\ckpts\torch\vgg16-397923af.pth
loaded pretrained LPIPS loss from taming/modules/autoencoder/lpips\vgg.pth
Failed to find C:\Users\彭林/.cache\torch\hub\checkpoints\swin_b-68c6b09e.pth.
Downloading from pytorch.org
model_path is D:\AI\ComfyUI_windows\ComfyUI\custom_nodes\comfyui_controlnet_aux\ckpts\torch\swin_b-68c6b09e.pth
!!! Exception during processing !!! PytorchStreamReader failed reading zip archive: failed finding central directory
Traceback (most recent call last):
File "D:\AI\ComfyUI_windows\ComfyUI\execution.py", line 327, 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 "D:\AI\ComfyUI_windows\ComfyUI\execution.py", line 202, 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 "D:\AI\ComfyUI_windows\ComfyUI\execution.py", line 174, in _map_node_over_list
process_inputs(input_dict, i)
File "D:\AI\ComfyUI_windows\ComfyUI\execution.py", line 163, in process_inputs
results.append(getattr(obj, func)(**inputs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\AI\ComfyUI_windows\ComfyUI\custom_nodes\comfyui_controlnet_aux\node_wrappers\diffusion_edge.py", line 30, in execute
.from_pretrained(filename = f"diffusion_edge_{environment}.pt") \
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\AI\ComfyUI_windows\ComfyUI\custom_nodes\comfyui_controlnet_aux\src\custom_controlnet_aux\diffusion_edge\__init__.py", line 16, in from_pretrained
model = DiffusionEdge(prepare_args(model_path))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\AI\ComfyUI_windows\ComfyUI\custom_nodes\comfyui_controlnet_aux\src\custom_controlnet_aux\diffusion_edge\model.py", line 44, in __init__
unet = Unet(dim=unet_cfg.dim,
^^^^^^^^^^^^^^^^^^^^^^
File "D:\AI\ComfyUI_windows\ComfyUI\custom_nodes\comfyui_controlnet_aux\src\custom_controlnet_aux\diffusion_edge\denoising_diffusion_pytorch\mask_cond_unet.py", line 703, in __init__
swin_b_model.load_state_dict(torch.load(custom_torch_download(filename="swin_b-68c6b09e.pth")), strict=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\AI\ComfyUI_windows\python_embeded\Lib\site-packages\torch\serialization.py", line 1432, in load
with _open_zipfile_reader(opened_file) as opened_zipfile:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\AI\ComfyUI_windows\python_embeded\Lib\site-packages\torch\serialization.py", line 763, in __init__
super().__init__(torch._C.PyTorchFileReader(name_or_buffer))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory
Deepseek解决方案
The error occurs because the swin_b-68c6b09e.pth model file is either missing, incomplete, or corrupted. Here’s how to resolve it:
Manually Download the Model:
Visit the official PyTorch URL: https://download.pytorch.org/models/swin_b-68c6b09e.pth
Ensure the download completes fully (~440MB).
Place the Model Correctly:
Save the downloaded file to:
复制
D:\AI\ComfyUI_windows\ComfyUI\custom_nodes\comfyui_controlnet_aux\ckpts\torch\swin_b-68c6b09e.pth
1.Replace any existing corrupted/incomplete file.
2.Verify File Integrity:
3.Check the file size matches the expected size (~440MB).
If using a browser download, retry if interrupted.
4.Update Custom Nodes:
5.Ensure comfyui_controlnet_aux is up-to-date in case of bugs in model handling.
6.After fixing, the error should resolve as the model loads correctly. If issues persist, check file permissions or reinstall the custom node.
综上所述解决方法:
删掉230MB,重新下载440MB的解决
2.路径报错信息二
Updating: ComfyUI_MatAnyone_Kytra
[ComfyUI-Manager] Queued works are completed.
{
'update-comfyui': 1, 'update-main': 18}
After restarting ComfyUI, please refresh the browser.
got prompt
D:\AI\ComfyUI_windows\python_embeded\Lib\site-packages\albumentations\__init__.py:13: UserWarning: A new version of Albumentations is available: 2.0.5 (you have 1.4.15). Upgrade using: pip install -U albumentations. To disable automatic update checks, set the environment variable NO_ALBUMENTATIONS_UPDATE to 1.
check_for_updates()
D:\AI\ComfyUI_windows\python_embeded\Lib\site-packages\torch\functional