Comfy-Org / Comfy-Org/ComfyUI

clip

Open
#15,464 1 comment 1 reaction 0 assignees View on GitHub
Potential Bug
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 6h
Merged PRs (30d)
155

Description

### Custom Node Testing

- [ ] I have tried disabling custom nodes and the issue persists (see [how to disable custom nodes](https://docs.comfy.org/troubleshooting/custom-node-issues#step-1%3A-test-with-all-custom-nodes-disabled) if you need help)

### Expected Behavior

我先去询问了 ChatGPT,它让我把文本模型放一份在这个文件夹里面,然后重启再打开一遍试一下,但是还是没有解决问

### Actual Behavior

.

### Steps to Reproduce

.

### Debug Logs

```powershell
节点在执行过程中发生错误。

# ComfyUI Error Report
## Error Details
- **Node ID:** 105:13
- **Node Type:** CLIPLoader
- **Exception Type:** ValueError
- **Exception Message:** ValueError: buffer length (394547245 bytes) after offset (0 bytes) must be a multiple of element size (2)

## Stack Trace

File "D:\ComfyUI (3)\ComfyUI\execution.py", line 545, in execute
output_data, output_ui, has_subgraph, has_pending_tasks = await get_output_data(prompt_id, unique_id, obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, v3_data=v3_data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "D:\ComfyUI (3)\ComfyUI\execution.py", line 344, in get_output_data
return_values = await _async_map_node_over_list(prompt_id, unique_id, obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, v3_data=v3_data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "D:\ComfyUI (3)\ComfyUI\execution.py", line 318, in _async_map_node_over_list
await process_inputs(input_dict, i)

File "D:\ComfyUI (3)\ComfyUI\execution.py", line 306, in process_inputs
result = f(**inputs)

File "D:\ComfyUI (3)\ComfyUI\nodes.py", line 1024, in load_clip
clip = comfy.sd.load_clip(ckpt_paths=[clip_path], embedding_directory=folder_paths.get_folder_paths("embeddings"), clip_type=clip_type, model_options=model_options)

File "D:\ComfyUI (3)\ComfyUI\comfy\sd.py", line 1458, in load_clip
sd, metadata = comfy.utils.load_torch_file(p, safe_load=True, return_metadata=True)
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "D:\ComfyUI (3)\ComfyUI\comfy\utils.py", line 149, in load_torch_file
raise e

File "D:\ComfyUI (3)\ComfyUI\comfy\utils.py", line 129, in load_torch_file
sd, metadata = load_safetensors(ckpt)
~~~~~~~~~~~~~~~~^^^^^^

File "D:\ComfyUI (3)\ComfyUI\comfy\utils.py", line 111, in load_safetensors
tensor = torch.frombuffer(mv[start:end], dtype=_TYPES[info["dtype"]]).view(info["shape"])
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

## System Information
- **ComfyUI Version:** 0.31.0
- **Arguments:** ComfyUI\main.py --feature-flag show_signin_button=true --feature-flag enable_telemetry=true --enable-manager --extra-model-paths-config C:\Users\28597\AppData\Roaming\Comfy Desktop\shared_model_paths.yaml --input-directory C:\Users\28597\AppData\Local\Comfy-Desktop\ComfyUI-Shared\input --output-directory C:\Users\28597\AppData\Local\Comfy-Desktop\ComfyUI-Shared\output
- **OS:** win32
- **Python Version:** 3.13.12 (main, Feb 12 2026, 00:38:53) [MSC v.1944 64 bit (AMD64)]
- **Embedded Python:** false
- **PyTorch Version:** 2.12.1+cu130
## Devices

- **Name:** cuda:0 NVIDIA GeForce RTX 5060 Laptop GPU : cudaMallocAsync
- **Type:** cuda
- **VRAM Total:** 8546484224
- **VRAM Free:** 7385120768
- **Torch VRAM Total:** 0
- **Torch VRAM Free:** 0

## Logs

2026-08-10T12:04:33.203202 - [INFO] setup plugin alembic.autogenerate.schemas
2026-08-10T12:04:33.203289 - [INFO] setup plugin alembic.autogenerate.tables
2026-08-10T12:04:33.203324 - [INFO] setup plugin alembic.autogenerate.types
2026-08-10T12:04:33.203356 - [INFO] setup plugin alembic.autogenerate.constraints
2026-08-10T12:04:33.203383 - [INFO] setup plugin alembic.autogenerate.defaults
2026-08-10T12:04:33.203410 - [INFO] setup plugin alembic.autogenerate.comments
2026-08-10T12:04:33.487821 - [INFO] Adding extra search path checkpoints C:\Users\28597\AppData\Local\Comfy-Desktop\ComfyUI-Shared\models\checkpoints
2026-08-10T12:04:33.487870 - [INFO] Adding extra search path classifiers C:\Users\28597\AppData\Local\Comfy-Desktop\ComfyUI-Shared\models\classifiers
2026-08-10T12:04:33.487893 - [INFO] Adding extra search path clip_vision C:\Users\28597\AppData\Local\Comfy-Desktop\ComfyUI-Shared\models\clip_vision
2026-08-10T12:04:33.487911 - [INFO] Adding extra search path configs C:\Users\28597\AppData\Local\Comfy-Desktop\ComfyUI-Shared\models\configs
2026-08-10T12:04:33.487929 - [INFO] Adding extra search path controlnet C:\Users\28597\AppData\Local\Comfy-Desktop\ComfyUI-Shared\models\controlnet
2026-08-10T12:04:33.487947 - [INFO] Adding extra search path controlnet C:\Users\28597\AppData\Local\Comfy-Desktop\ComfyUI-Shared\models\t2i_adapter
2026-08-10T12:04:33.487962 - [INFO] Adding extra search path diffusers C:\Users\28597\AppData\Local\Comfy-Desktop\ComfyUI-Shared\models\diffusers
2026-08-10T12:04:33.487977 - [INFO] Adding extra search path diffusion_models C:\Users\28597\AppData\Local\Comfy-Desktop\ComfyUI-Shared\models\diffusion_models
2026-08-10T12:04:33.487991 - [INFO] Adding extra search path embeddings C:\Users\28597\AppData\Local\Comfy-Desktop\ComfyUI-Shared\models\embeddings
2026-08-10T12:04:33.488005 - [INFO] Adding extra search path gligen C:\Users\28597\AppData\Local\Comfy-Desktop\ComfyUI-Shared\models\gligen
2026-08-10T12:04:33.488019 - [INFO] Adding extra search path hypernetworks C:\Users\28597\AppData\Local\Comfy-Desktop\ComfyUI-Shared\models\hypernetworks
2026-08-10T12:04:33.488033 - [INFO] Adding extra search path latent_upscale_models C:\Users\28597\AppData\Local\Comfy-Desktop\ComfyUI-Shared\models\latent_upscale_models
2026-08-10T12:04:33.488047 - [INFO] Adding extra search path loras C:\Users\28597\AppData\Local\Comfy-Desktop\ComfyUI-Shared\models\loras
2026-08-10T12:04:33.488060 - [INFO] Adding extra search path model_patches C:\Users\28597\AppData\Local\Comfy-Desktop\ComfyUI-Shared\models\model_patches
2026-08-10T12:04:33.488073 - [INFO] Adding extra search path audio_encoders C:\Users\28597\AppData\Local\Comfy-Desktop\ComfyUI-Shared\models\audio_encoders
2026-08-10T12:04:33.488086 - [INFO] Adding extra search path photomaker C:\Users\28597\AppData\Local\Comfy-Desktop\ComfyUI-Shared\models\photomaker
2026-08-10T12:04:33.488100 - [INFO] Adding extra search path style_models C:\Users\28597\AppData\Local\Comfy-Desktop\ComfyUI-Shared\models\style_models
2026-08-10T12:04:33.488113 - [INFO] Adding extra search path text_encoders C:\Users\28597\AppData\Local\Comfy-Desktop\ComfyUI-Shared\models\text_encoders
2026-08-10T12:04:33.488125 - [INFO] Adding extra search path upscale_models C:\Users\28597\AppData\Local\Comfy-Desktop\ComfyUI-Shared\models\upscale_models
2026-08-10T12:04:33.488138 - [INFO] Adding extra search path background_removal C:\Users\28597\AppData\Local\Comfy-Desktop\ComfyUI-Shared\models\background_removal
2026-08-10T12:04:33.488153 - [INFO] Adding extra search path frame_interpolation C:\Users\28597\AppData\Local\Comfy-Desktop\ComfyUI-Shared\models\frame_interpolation
2026-08-10T12:04:33.488170 - [INFO] Adding extra search path geometry_estimation C:\Users\28597\AppData\Local\Comfy-Desktop\ComfyUI-Shared\models\geometry_estimation
2026-08-10T12:04:33.488183 - [INFO] Adding extra search path optical_flow C:\Users\28597\AppData\Local\Comfy-Desktop\ComfyUI-Shared\models\optical_flow
2026-08-10T12:04:33.488195 - [INFO] Adding extra search path detection C:\Users\28597\AppData\Local\Comfy-Desktop\ComfyUI-Shared\models\detection
2026-08-10T12:04:33.488210 - [INFO] Adding extra search path vae C:\Users\28597\AppData\Local\Comfy-Desktop\ComfyUI-Shared\models\vae
2026-08-10T12:04:33.488223 - [INFO] Adding extra search path vae_approx C:\Users\28597\AppData\Local\Comfy-Desktop\ComfyUI-Shared\models\vae_approx
2026-08-10T12:04:33.488235 - [INFO] Adding extra search path clip C:\Users\28597\AppData\Local\Comfy-Desktop\ComfyUI-Shared\models\clip
2026-08-10T12:04:33.488249 - [INFO] Adding extra search path unet C:\Users\28597\AppData\Local\Comfy-Desktop\ComfyUI-Shared\models\unet
2026-08-10T12:04:33.488283 - [INFO] Setting output directory to: C:\Users\28597\AppData\Local\Comfy-Desktop\ComfyUI-Shared\output
2026-08-10T12:04:33.488309 - [INFO] Setting input directory to: C:\Users\28597\AppData\Local\Comfy-Desktop\ComfyUI-Shared\input
2026-08-10T12:04:33.811720 - [START] Security scan2026-08-10T12:04:33.811730 -
2026-08-10T12:04:34.663096 - [DONE] Security scan2026-08-10T12:04:34.663109 -
2026-08-10T12:04:34.664813 - ** ComfyUI startup time:2026-08-10T12:04:34.664855 - 2026-08-10T12:04:34.664873 - 2026-08-10 12:04:34.6642026-08-10T12:04:34.664888 -
2026-08-10T12:04:34.664905 - ** Platform:2026-08-10T12:04:34.664917 - 2026-08-10T12:04:34.664930 - Windows2026-08-10T12:04:34.664942 -
2026-08-10T12:04:34.664955 - ** Python version:2026-08-10T12:04:34.664966 - 2026-08-10T12:04:34.664979 - 3.13.12 (main, Feb 12 2026, 00:38:53) [MSC v.1944 64 bit (AMD64)]2026-08-10T12:04:34.664991 -
2026-08-10T12:04:34.665004 - ** Python executable:2026-08-10T12:04:34.665016 - 2026-08-10T12:04:34.665029 - D:\ComfyUI (3)\ComfyUI\.venv\Scripts\python.exe2026-08-10T12:04:34.665041 -
2026-08-10T12:04:34.665054 - ** ComfyUI Path:2026-08-10T12:04:34.665066 - 2026-08-10T12:04:34.665077 - D:\ComfyUI (3)\ComfyUI2026-08-10T12:04:34.665088 -
2026-08-10T12:04:34.665100 - ** ComfyUI Base Folder Path:2026-08-10T12:04:34.665112 - 2026-08-10T12:04:34.665123 - D:\ComfyUI (3)\ComfyUI2026-08-10T12:04:34.665134 -
2026-08-10T12:04:34.665146 - ** User directory:2026-08-10T12:04:34.665157 - 2026-08-10T12:04:34.665169 - D:\ComfyUI (3)\ComfyUI\user2026-08-10T12:04:34.665180 -
2026-08-10T12:04:34.665192 - ** ComfyUI-Manager config path:2026-08-10T12:04:34.665204 - 2026-08-10T12:04:34.665215 - D:\ComfyUI (3)\ComfyUI\user\__manager\config.ini2026-08-10T12:04:34.665227 -
2026-08-10T12:04:34.665243 - ** Log path:2026-08-10T12:04:34.665254 - 2026-08-10T12:04:34.665266 - D:\ComfyUI (3)\ComfyUI\user\comfyui.log2026-08-10T12:04:34.665278 -
2026-08-10T12:04:34.665436 - [ComfyUI-Manager] WARN: Unsafe - SSL verification bypass option is Enabled. (see D:\ComfyUI (3)\ComfyUI\user\__manager\config.ini)2026-08-10T12:04:34.665480 -
2026-08-10T12:04:35.346853 - [INFO] [PRE] ComfyUI-Manager
2026-08-10T12:04:38.266803 - [INFO] Found comfy_kitchen backend triton: {'available': False, 'disabled': True, 'unavailable_reason': "ImportError: No module named 'triton'", 'capabilities': []}
2026-08-10T12:04:38.266904 - [INFO] Found comfy_kitchen backend eager: {'available': True, 'disabled': False, 'unavailable_reason': None, 'capabilities': ['adaln', 'apply_rope', 'apply_rope1', 'apply_rope1_', 'apply_rope_', 'apply_rope_split_half', 'apply_rope_split_half1', 'apply_rope_split_half1_', 'apply_rope_split_half_', 'convrot_w4a4_linear', 'dequantize_convrot_w4a4_weight', 'dequantize_int8_convrot_weight', 'dequantize_int8_convrot_weight_dtype', 'dequantize_int8_embedding', 'dequantize_int8_simple', 'dequantize_int8_simple_dtype', 'dequantize_mxfp8', 'dequantize_nvfp4', 'dequantize_per_tensor_fp8', 'dequantize_w4a8_int8_weight', 'gemv_awq_w4a16', 'int8_linear', 'na3d', 'prepare_int4_weight_for_int8_linear', 'quantize_and_rotate_rowwise', 'quantize_convrot_w4a4_weight', 'quantize_int8_convrot_weight', 'quantize_int8_rowwise', 'quantize_int8_tensorwise', 'quantize_mxfp8', 'quantize_nvfp4', 'quantize_per_tensor_fp8', 'quantize_svdquant_w4a4', 'quantize_w4a8_int8_weight', 'rms_adaln', 'rms_rope', 'rms_rope1', 'rms_rope1_', 'rms_rope_', 'rms_rope_split_half', 'rms_rope_split_half1', 'rms_rope_split_half1_', 'rms_rope_split_half_', 'rotate_int8_convrot_weight', 'scaled_mm_mxfp8', 'scaled_mm_nvfp4', 'scaled_mm_svdquant_w4a4', 'stochastic_rounding_fp8', 'w4a8_int8_linear']}
2026-08-10T12:04:38.266943 - [INFO] Found comfy_kitchen backend hip: {'available': False, 'disabled': False, 'unavailable_reason': 'PyTorch ROCm/HIP runtime not available', 'capabilities': []}
2026-08-10T12:04:38.266976 - [INFO] Found comfy_kitchen backend cuda: {'available': True, 'disabled': False, 'unavailable_reason': None, 'capabilities': ['adaln', 'apply_rope', 'apply_rope1', 'apply_rope1_', 'apply_rope_', 'apply_rope_split_half', 'apply_rope_split_half1', 'apply_rope_split_half1_', 'apply_rope_split_half_', 'convrot_w4a4_linear', 'dequantize_convrot_w4a4_weight', 'dequantize_int8_convrot_weight', 'dequantize_int8_convrot_weight_dtype', 'dequantize_int8_simple', 'dequantize_int8_simple_dtype', 'dequantize_nvfp4', 'dequantize_per_tensor_fp8', 'dequantize_w4a8_int8_weight', 'gemv_awq_w4a16', 'int8_linear', 'na3d', 'prepare_int4_weight_for_int8_linear', 'quantize_and_rotate_rowwise', 'quantize_convrot_w4a4_weight', 'quantize_int8_convrot_weight', 'quantize_int8_rowwise', 'quantize_int8_tensorwise', 'quantize_mxfp8', 'quantize_nvfp4', 'quantize_per_tensor_fp8', 'quantize_svdquant_w4a4', 'quantize_w4a8_int8_weight', 'rms_adaln', 'rms_rope', 'rms_rope1', 'rms_rope1_', 'rms_rope_', 'rms_rope_split_half', 'rms_rope_split_half1', 'rms_rope_split_half1_', 'rms_rope_split_half_', 'rotate_int8_convrot_weight', 'scaled_mm_nvfp4', 'scaled_mm_svdquant_w4a4', 'stochastic_rounding_fp8', 'w4a8_int8_linear']}
2026-08-10T12:04:38.275562 - [INFO] Checkpoint files will always be loaded safely.
2026-08-10T12:04:38.344155 - [INFO] Total VRAM 8151 MB, total RAM 15987 MB
2026-08-10T12:04:38.344266 - [INFO] pytorch version: 2.12.1+cu130
2026-08-10T12:04:38.344546 - [INFO] Set vram state to: NORMAL_VRAM
2026-08-10T12:04:38.344651 - [INFO] Device: cuda:0 NVIDIA GeForce RTX 5060 Laptop GPU : cudaMallocAsync
2026-08-10T12:04:38.379457 - [INFO] Using async weight offloading with 2 streams
2026-08-10T12:04:38.379756 - [INFO] Enabled pinned memory 6394.0
2026-08-10T12:04:38.413848 - [INFO] Using pytorch attention
2026-08-10T12:04:41.294114 - [INFO] aimdo: src-win/cuda-detour.c:38:INFO:aimdo_setup_hooks: installing 6 hooks
2026-08-10T12:04:41.313503 - [INFO] aimdo: src/control.c:262:INFO:comfy-aimdo NVML pressure enabled
2026-08-10T12:04:41.323652 - [INFO] aimdo: src-win/shmem-detect.c:80:INFO:comfy-aimdo WDDM adapter match: NVIDIA GeForce RTX 5060 Laptop GPU runtime_luid=00000000:000129fb dxgi_luid=00000000:000129fb
2026-08-10T12:04:41.323746 - [INFO] aimdo: src/control.c:277:INFO:comfy-aimdo inited for GPU: NVIDIA GeForce RTX 5060 Laptop GPU (VRAM: 8150 MB)
2026-08-10T12:04:41.323815 - [INFO] DynamicVRAM support detected and enabled
2026-08-10T12:04:41.323852 - [INFO] Python version: 3.13.12 (main, Feb 12 2026, 00:38:53) [MSC v.1944 64 bit (AMD64)]
2026-08-10T12:04:41.323880 - [INFO] ComfyUI version: 0.31.0
2026-08-10T12:04:41.324826 - [INFO] comfy-aimdo version: 0.4.13
2026-08-10T12:04:41.325534 - [INFO] comfy-kitchen version: 0.2.28
2026-08-10T12:04:41.329741 - [INFO] comfyui-frontend-package version: 1.48.7
2026-08-10T12:04:41.329852 - [INFO] comfyui-workflow-templates version: 0.11.34
2026-08-10T12:04:41.329910 - [INFO] comfyui-embedded-docs version: 0.5.9
2026-08-10T12:04:41.329941 - [INFO] comfy-kitchen version: 0.2.28
2026-08-10T12:04:41.329967 - [INFO] comfy-aimdo version: 0.4.13
2026-08-10T12:04:41.331575 - [INFO] [Prompt Server] web root: D:\ComfyUI (3)\ComfyUI\.venv\Lib\site-packages\comfyui_frontend_package\static
2026-08-10T12:04:41.332450 - [INFO] Asset seeder disabled
2026-08-10T12:04:41.332591 - [INFO] [START] ComfyUI-Manager
2026-08-10T12:04:41.528812 - [ComfyUI-Manager] Using GitPython backend2026-08-10T12:04:41.528847 -
2026-08-10T12:04:41.566861 - [INFO] [ComfyUI-Manager] network_mode: public
2026-08-10T12:04:41.570474 - [WARNING] [ComfyUI-Manager] The matrix sharing feature has been disabled because the `matrix-nio` dependency is not installed.
To use this feature, please run the following command:
D:\ComfyUI (3)\ComfyUI\.venv\Scripts\python.exe -m pip install matrix-nio

2026-08-10T12:04:42.157848 - [INFO] No OpenGL_accelerate module loaded: No module named 'OpenGL_accelerate'
2026-08-10T12:04:42.970406 - [INFO]
Import times for custom nodes:
2026-08-10T12:04:42.970541 - [INFO] 0.0 seconds: D:\ComfyUI (3)\ComfyUI\custom_nodes\websocket_image_save.py
2026-08-10T12:04:42.970615 - [INFO]
2026-08-10T12:04:42.973502 - [INFO] Context impl SQLiteImpl.
2026-08-10T12:04:42.973604 - [INFO] Will assume non-transactional DDL.
2026-08-10T12:04:43.028181 - [INFO] Using RAM pressure cache.
2026-08-10T12:04:43.029268 - [INFO] Starting server

2026-08-10T12:04:43.029726 - [INFO] To see the GUI go to: http://127.0.0.1:8188
2026-08-10T12:05:17.862558 - [INFO] got prompt
2026-08-10T12:05:17.944799 - [INFO] VAE load device: cuda:0, offload device: cpu, dtype: torch.float32
2026-08-10T12:05:18.214193 - [INFO] VAE load device: cuda:0, offload device: cpu, dtype: torch.float16
2026-08-10T12:05:18.222302 - [ERROR] !!! Exception during processing !!! buffer length (394547245 bytes) after offset (0 bytes) must be a multiple of element size (2)
2026-08-10T12:05:18.228330 - [ERROR] Traceback (most recent call last):
File "D:\ComfyUI (3)\ComfyUI\execution.py", line 545, in execute
output_data, output_ui, has_subgraph, has_pending_tasks = await get_output_data(prompt_id, unique_id, obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, v3_data=v3_data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI (3)\ComfyUI\execution.py", line 344, in get_output_data
return_values = await _async_map_node_over_list(prompt_id, unique_id, obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, v3_data=v3_data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI (3)\ComfyUI\execution.py", line 318, in _async_map_node_over_list
await process_inputs(input_dict, i)
File "D:\ComfyUI (3)\ComfyUI\execution.py", line 306, in process_inputs
result = f(**inputs)
File "D:\ComfyUI (3)\ComfyUI\nodes.py", line 1024, in load_clip
clip = comfy.sd.load_clip(ckpt_paths=[clip_path], embedding_directory=folder_paths.get_folder_paths("embeddings"), clip_type=clip_type, model_options=model_options)
File "D:\ComfyUI (3)\ComfyUI\comfy\sd.py", line 1458, in load_clip
sd, metadata = comfy.utils.load_torch_file(p, safe_load=True, return_metadata=True)
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI (3)\ComfyUI\comfy\utils.py", line 149, in load_torch_file
raise e
File "D:\ComfyUI (3)\ComfyUI\comfy\utils.py", line 129, in load_torch_file
sd, metadata = load_safetensors(ckpt)
~~~~~~~~~~~~~~~~^^^^^^
File "D:\ComfyUI (3)\ComfyUI\comfy\utils.py", line 111, in load_safetensors
tensor = torch.frombuffer(mv[start:end], dtype=_TYPES[info["dtype"]]).view(info["shape"])
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: buffer length (394547245 bytes) after offset (0 bytes) must be a multiple of element size (2)

2026-08-10T12:05:18.230614 - [INFO] Prompt executed in 0.37 seconds

## Attached Workflow
Please make sure that workflow does not contain any sensitive information such as API keys or passwords.

Workflow too large. Please manually upload the workflow from local file system.

## Additional Context
(Please add any additional context or steps to reproduce the error here)
```

### Other

.

Contributor guide

Open the contributing guide

Research direction

Start with the reported CLIPLoader failure and trace the loading path through nodes.py:1024, comfy/sd.py:1458, and comfy/utils.py:129–149, especially load_safetensors and torch.frombuffer. Reproduce with the reported model and environment if possible; done means identifying and addressing the cause of the buffer-length ValueError, with a regression test covering the failing load.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.