cubiq / ComfyUI_IPAdapter_plus

GNU General Public License v3.0
3.12k stars 235 forks source link

Error occurred when executing IPAdapterUnifiedLoader: #602

Closed joneschunghk closed 1 week ago

joneschunghk commented 1 week ago

I've created a simple ipadapter workflow, but caused an error: Screenshot 2024-06-19 181222

I've re-installed the latest comfyui and embeded python several times, and re-downloaded the latest models. I've update the files using "update_comfyui.bat" and updated from comfyui manager.

Here is my start log:

## ComfyUI-Manager: installing dependencies done.
[2024-06-19 19:08] ** ComfyUI startup time: 2024-06-19 19:08:08.750957
[2024-06-19 19:08] ** Platform: Windows
[2024-06-19 19:08] ** Python version: 3.11.8 (tags/v3.11.8:db85d51, Feb  6 2024, 22:03:32) [MSC v.1937 64 bit (AMD64)]
[2024-06-19 19:08] ** Python executable: D:\AI\Stable Diffusion\ComfyUI_windows_portable\python_embeded\python.exe
[2024-06-19 19:08] ** Log path: D:\AI\Stable Diffusion\ComfyUI_windows_portable\comfyui.log
[2024-06-19 19:08] 
Prestartup times for custom nodes:
[2024-06-19 19:08]    0.8 seconds: D:\AI\Stable Diffusion\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Manager
[2024-06-19 19:08] 
Total VRAM 8192 MB, total RAM 32628 MB
[2024-06-19 19:08] pytorch version: 2.3.1+cu121
[2024-06-19 19:08] Set vram state to: NORMAL_VRAM
[2024-06-19 19:08] Device: cuda:0 NVIDIA GeForce RTX 3060 : cudaMallocAsync
[2024-06-19 19:08] Using pytorch cross attention
[2024-06-19 19:08] ### Loading: ComfyUI-Manager (V2.38.2)
[2024-06-19 19:08] ### ComfyUI Revision: 2265 [55f0dc12] | Released on '2024-06-18'
[2024-06-19 19:08] 
Import times for custom nodes:
[2024-06-19 19:08]    0.0 seconds: D:\AI\Stable Diffusion\ComfyUI_windows_portable\ComfyUI\custom_nodes\websocket_image_save.py
[2024-06-19 19:08]    0.0 seconds: D:\AI\Stable Diffusion\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_IPAdapter_plus
[2024-06-19 19:08]    0.3 seconds: D:\AI\Stable Diffusion\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Manager
[2024-06-19 19:08] 
[2024-06-19 19:08] Starting server

[2024-06-19 19:08] To see the GUI go to: http://127.0.0.1:8188
[2024-06-19 19:08] [ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/model-list.json
[2024-06-19 19:08] [ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/alter-list.json
[2024-06-19 19:08] [ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/github-stats.json
[2024-06-19 19:08] [ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/extension-node-map.json
[2024-06-19 19:08] [ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/custom-node-list.json
[2024-06-19 19:08] FETCH DATA from: D:\AI\Stable Diffusion\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Manager\extension-node-map.json [DONE]
[2024-06-19 19:08] got prompt
[2024-06-19 19:08] model_type EPS
[2024-06-19 19:08] Using pytorch attention in VAE
[2024-06-19 19:08] Using pytorch attention in VAE
[2024-06-19 19:08] !!! Exception during processing!!! Error while deserializing header: MetadataIncompleteBuffer
[2024-06-19 19:08] Traceback (most recent call last):
  File "D:\AI\Stable Diffusion\ComfyUI_windows_portable\ComfyUI\execution.py", line 151, in recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\AI\Stable Diffusion\ComfyUI_windows_portable\ComfyUI\execution.py", line 81, in get_output_data
    return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\AI\Stable Diffusion\ComfyUI_windows_portable\ComfyUI\execution.py", line 74, in map_node_over_list
    results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\AI\Stable Diffusion\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_IPAdapter_plus\IPAdapterPlus.py", line 506, in load_models
    self.clipvision['model'] = load_clip_vision(clipvision_file)
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\AI\Stable Diffusion\ComfyUI_windows_portable\ComfyUI\comfy\clip_vision.py", line 113, in load
    sd = load_torch_file(ckpt_path)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\AI\Stable Diffusion\ComfyUI_windows_portable\ComfyUI\comfy\utils.py", line 14, in load_torch_file
    sd = safetensors.torch.load_file(ckpt, device=device.type)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\AI\Stable Diffusion\ComfyUI_windows_portable\python_embeded\Lib\site-packages\safetensors\torch.py", line 311, in load_file
    with safe_open(filename, framework="pt", device=device) as f:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
safetensors_rust.SafetensorError: Error while deserializing header: MetadataIncompleteBuffer

[2024-06-19 19:08] Prompt executed in 3.04 seconds
cokimax2 commented 1 week ago

I have the exactly same issue.

cubiq commented 1 week ago

this feels like an error with the model file itself. try to redownload it

joneschunghk commented 1 week ago

this feels like an error with the model file itself. try to redownload it

I've deleted all the old models and ComfyUI. I've Reinstalled the ComfyUI and all the ipadapter model files are new download from this page. I've tried all the presets of IPAdapter Unified Loader. Some of them error on IPAdapter Unified Loader, some of them error on IPAdapter. I've tried both SD1.5 and SDXL. I've even tried cpu and gpu and --force-fp16 Screenshot 2024-06-20 030438

joneschunghk commented 1 week ago

I think I have solved the errors. Because of this message:

  File "D:\AI\Stable Diffusion\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_IPAdapter_plus\IPAdapterPlus.py", line 506, in load_models
    self.clipvision['model'] = load_clip_vision(clipvision_file)
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

I redownload CLIP-ViT-H-14-laion2B-s32B-b79K.safetensors and CLIP-ViT-bigG-14-laion2B-39B-b160k.safetensors, although they were new download. Now it has passed all tests on sd15 and sdxl.