Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐞 Common issues. Please read! #108

Open
cubiq opened this issue Nov 28, 2023 · 140 comments
Open

🐞 Common issues. Please read! #108

cubiq opened this issue Nov 28, 2023 · 140 comments
Labels
documentation Improvements or additions to documentation

Comments

@cubiq
Copy link
Owner

cubiq commented Nov 28, 2023

Before posting a new issue, please check the currently opened and closed issues! Very likely the solution is already there!

The most common causes for issues are:

▶️ Outdated ComfyUI and/or Extension

Always update ComfyUI and the IPAdapter extension to the latest version. If you are on windows you may need to re-download a new portable version or use the update scripts!

After the update always stop ComfyUI and restart it. Then refresh the browser a couple of times to clear the cache. If it doesn't work try to recreate the updated nodes.

All the following errors are caused by an outdated installation:

  • module 'comfy.model_base' has no attribute 'SDXL_instructpix2pix'
  • AttributeError: 'ModelPatcher' object has no attribute 'get_model_object'
  • module 'comfy.model_management' has no attribute 'should_use_bf16'
  • Error occurred when executing KSampler: 'sigmas'
  • CLIPVisionModelWithProjection.forward() got an unexpected keyword argument 'intermediate_output'
  • Error: 'CLIPVisionModelOutput' object has no attribute 'penultimate_hidden_states'
  • AttributeError: 'NoneType' object has no attribute 'encode_image'

▶️ IPAdapter, InstantID, PuLID interoperability

The three technologies are very close together and share some common code. Be sure to upgrade all of them before reporting an issue.

▶️ Delete the old Deprecated IPAdapter extension

You may have already installed the deprecated IPAdapter_ComfyUI extension. That will conflict with this extension and needs to be removed.

▶️ Can't find the IPAdapterApply node anymore

The IPAdapter Apply node is now replaced by IPAdapter Advanced. It's a drop in replacement, remove the old one and reconnect the pipelines to the new one.

▶️ size mismatch for proj_in.weight: copying a param with shape torch.Size([..., ...]) from checkpoint, the shape in current model is torch.Size([..., ...])

Any tensor size mismatch error is caused by the wrong combination of IPAdapter model, image encoder and/or base checkpoint.

All -vit-h models require the SD1.5 image encoder. At the moment only one SDXL model and the vit-G SD1.5 model need the bigger image encoder.

▶️ Insightface is required for FaceID models

If you use any FaceID model you need either use the simple IPAdapter node or the dedicated IPAdapter FaceID node.

▶️ Can't find the saved embeddings

The embeddings are saved into output directory and need to be moved into the input directory to be loaded.

▶️ Mismatched image encoders / Black image / No result at all / 'NoneType' Error

When you download the encoders from huggingface they both have the same name (model.safetensors). Please be sure to rename them correctly (for sd1.5 and sdxl) and use the right one depending on the IPAdapter that you use.

All IPAdapter models use the "SD1.5" image encoder (no matter the target checkpoint) except for one SDXL model and models ending with vit-G.

▶️ Dtype mismatch

If you get errors like:

Expected query, key, and value to have the same dtype, but got query.dtype: struct c10::Half key.dtype: float and value.dtype: float instead.

Run ComfyUI with --force-fp16

@cubiq cubiq added the documentation Improvements or additions to documentation label Nov 28, 2023
@cubiq cubiq pinned this issue Nov 28, 2023
@dustintheweb
Copy link

dustintheweb commented Nov 28, 2023

I'm fully updated and I get 'NoneType' object has no attribute 'encode_image', so that one may not be related to updating... seems to only happen on the sd15 config.

image image
Error occurred when executing IPAdapterApply:

'NoneType' object has no attribute 'encode_image'

File "/Users/dustintheweb/@Projects/Internal/AI/ComfyUI/execution.py", line 153, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/dustintheweb/@Projects/Internal/AI/ComfyUI/execution.py", line 83, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/dustintheweb/@Projects/Internal/AI/ComfyUI/execution.py", line 76, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/dustintheweb/@Projects/Internal/AI/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus/IPAdapterPlus.py", line 408, in apply_ipadapter
clip_embed = clip_vision.encode_image(image)
^^^^^^^^^^^^^^^^^^^^^^^^
image image

@cubiq
Copy link
Owner Author

cubiq commented Nov 28, 2023

@dustintheweb on what commit number are you on with ComfyUI? I see you are on linux (or Mac?), use git pull to update, not the manager. Then stop comfy and restart. Your installation is not up to date, even if the Manager says it is.

@dustintheweb
Copy link

Yes I am MacOS and currently on ComfyUI commit 1754 (which is the latest as of an hour ago) and still get the same error.
image

git pull says up to date:
image

I was on 1751 earlier today, when I first posted, which was the latest for that time.

@cubiq
Copy link
Owner Author

cubiq commented Nov 28, 2023

@dustintheweb can you please post line 41 of your local file comfy/clip_vision.py

@dustintheweb
Copy link

def encode_image(self, image):

image

@cubiq
Copy link
Owner Author

cubiq commented Nov 28, 2023

have you stopped comfy and restarted?

@dustintheweb
Copy link

have you stopped comfy and restarted?

Yep, all the things 🤷

@cubiq
Copy link
Owner Author

cubiq commented Nov 29, 2023

Yep, all the things 🤷

I don't know if it's a Mac thing, I have no way to check unless you give me SSH access to your PC. The only other thing I can suggest is to start over with a clean installation

@binbinuper
Copy link

[Load CLIP Vision ] is wrong
The author has already written
use this ↓
https://huggingface.co/h94/IP-Adapter/resolve/main/models/image_encoder/model.safetensors
https://huggingface.co/h94/IP-Adapter/resolve/main/sdxl_models/image_encoder/model.safetensors

@cubiq
Copy link
Owner Author

cubiq commented Nov 29, 2023

ah right that's another possibility

@dustintheweb
Copy link

[Load CLIP Vision ] is wrong The author has already written use this ↓ https://huggingface.co/h94/IP-Adapter/resolve/main/models/image_encoder/model.safetensors https://huggingface.co/h94/IP-Adapter/resolve/main/sdxl_models/image_encoder/model.safetensors

downloaded these from huggingface & updated the CLIP vision file as the only change, now have his error at Load Checkpoint:

Error occurred when executing CheckpointLoaderSimple:

'NoneType' object has no attribute 'lower'

File "/Users/dustintheweb/@Projects/AI/ComfyUI/execution.py", line 153, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/dustintheweb/@Projects/AI/ComfyUI/execution.py", line 83, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/dustintheweb/@Projects/AI/ComfyUI/execution.py", line 76, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/dustintheweb/@Projects/AI/ComfyUI/nodes.py", line 476, in load_checkpoint
out = comfy.sd.load_checkpoint_guess_config(ckpt_path, output_vae=True, output_clip=True, embedding_directory=folder_paths.get_folder_paths("embeddings"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/dustintheweb/@Projects/AI/ComfyUI/comfy/sd.py", line 424, in load_checkpoint_guess_config
sd = comfy.utils.load_torch_file(ckpt_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/dustintheweb/@Projects/AI/ComfyUI/comfy/utils.py", line 12, in load_torch_file
if ckpt.lower().endswith(".safetensors"):
^^^^^^^^^^
image

@cubiq
Copy link
Owner Author

cubiq commented Nov 29, 2023

I would try to recreate the environment from scratch

@dustintheweb
Copy link

I would try to recreate the environment from scratch

yeah it seems like something broke in general from an update this morning. I will nuke all and rebuild from scratch today / tomorrow and follow up. ty

@dustintheweb
Copy link

Nuked / rebuilt my environment and got ipadapter sd15 working. The issue was that I was symlinking checkpoints, vae's and other resources from a common folder instead of using extra_model_paths.yaml. It did not like that for some reason. All is good now, thx again.

image

@rslosch
Copy link

rslosch commented Dec 2, 2023

Nuked / rebuilt my environment and got ipadapter sd15 working. The issue was that I was symlinking checkpoints, vae's and other resources from a common folder instead of using extra_model_paths.yaml. It did not like that for some reason. All is good now, thx again.

image

Are you running on CPU? I'm unable to run it otherwise on my Mac m2pro without getting RuntimeError: User specified an unsupported autocast device_type 'mps'

@cubiq
Copy link
Owner Author

cubiq commented Dec 2, 2023

Are you running on CPU? I'm unable to run it otherwise on my Mac m2pro without getting RuntimeError: User specified an unsupported autocast device_type 'mps'

can you try to force fp32?

@cubiq
Copy link
Owner Author

cubiq commented Dec 2, 2023

mps should be fixed now

@Amirox17
Copy link

Amirox17 commented Dec 2, 2023

Appreciate the support, @cubiq. Despite updating the code, I encountered a snag related to the dtype specification:

torch/amp/autocast_mode.py", line 329, in __enter__
    torch.set_autocast_cpu_dtype(self.fast_dtype)  # type: ignore[arg-type]
RuntimeError: Currently, AutocastCPU only support Bfloat16 as the autocast_cpu_dtype

To tackle this, I explicitly set the dtype in the init() to torch.bfloat16, seems to be working since, dunno if it's the correct fix for all tho.

@cubiq
Copy link
Owner Author

cubiq commented Dec 2, 2023

To tackle this, I explicitly set the dtype in the init() to torch.bfloat16, seems to be working since, dunno if it's the correct fix for all tho.

can you try the latest commit? if it doesn't work please open a new issue

@JellyBeanMaster
Copy link

Hi there..for 1 week,I've living this problem in Comfyui colab.What can I do?
err

@WarrenGonsalves
Copy link

WarrenGonsalves commented Dec 9, 2023

[Load CLIP Vision ] is wrong The author has already written use this ↓ https://huggingface.co/h94/IP-Adapter/resolve/main/models/image_encoder/model.safetensors https://huggingface.co/h94/IP-Adapter/resolve/main/sdxl_models/image_encoder/model.safetensors

this fixed the 'NoneType' object has no attribute 'encode_image' issue for me thanks!

@cubiq cubiq changed the title Common issues. Please read! 🐞 Common issues. Please read! Dec 10, 2023
@chlowden
Copy link

Hello .. Anyone have an idea how to resolve this error please?
`Error occurred when executing IPAdapterApply:

Error(s) in loading state_dict for Resampler:
size mismatch for proj_in.weight: copying a param with shape torch.Size([768, 1280]) from checkpoint, the shape in current model is torch.Size([768, 1664]).

File "/home/admin/ComfyUI/execution.py", line 153, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "/home/admin/ComfyUI/execution.py", line 83, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
File "/home/admin/ComfyUI/execution.py", line 76, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "/home/admin/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus/IPAdapterPlus.py", line 463, in apply_ipadapter
self.ipadapter = IPAdapter(
File "/home/admin/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus/IPAdapterPlus.py", line 176, in init
self.image_proj_model.load_state_dict(ipadapter_model["image_proj"])
File "/home/admin/.local/lib/python3.9/site-packages/torch/nn/modules/module.py", line 2041, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
`

@chlowden
Copy link

`Error occurred when executing IPAdapterApply:

Error(s) in loading state_dict for Resampler: size mismatch for proj_in.weight: copying a param with shape torch.Size([768, 1280]) from checkpoint, the shape in current model is torch.Size([768, 1664]).`

This afternoon's comfyui update (ComfyUI: 1805340177 Manager: V1.11.1)

plus following the advice above to install into separate 2 folders in the /ComfyUI/models/clipvision of the safetensors below (both files have the same name hence why I created SD & SDXL folders to hold each)

https://huggingface.co/h94/IP-Adapter/resolve/main/models/image_encoder/model.safetensors
https://huggingface.co/h94/IP-Adapter/resolve/main/sdxl_models/image_encoder/model.safetensors

I can select either model.safetensors in the Load CLIP VISION node ...
SDXL version gave the error and the SD version works for my needs.

Thanks to you for all this amazing work. It opens a whole new world to me

@laksjdjf laksjdjf unpinned this issue Dec 12, 2023
@laksjdjf laksjdjf pinned this issue Dec 12, 2023
@UrwLee
Copy link

UrwLee commented Dec 12, 2023

[Load CLIP Vision ] is wrong The author has already written use this ↓ https://huggingface.co/h94/IP-Adapter/resolve/main/models/image_encoder/model.safetensors https://huggingface.co/h94/IP-Adapter/resolve/main/sdxl_models/image_encoder/model.safetensors

downloaded these from huggingface & updated the CLIP vision file as the only change, now have his error at Load Checkpoint:

Error occurred when executing CheckpointLoaderSimple:

'NoneType' object has no attribute 'lower'

File "/Users/dustintheweb/@Projects/AI/ComfyUI/execution.py", line 153, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/dustintheweb/@Projects/AI/ComfyUI/execution.py", line 83, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/dustintheweb/@Projects/AI/ComfyUI/execution.py", line 76, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/dustintheweb/@Projects/AI/ComfyUI/nodes.py", line 476, in load_checkpoint
out = comfy.sd.load_checkpoint_guess_config(ckpt_path, output_vae=True, output_clip=True, embedding_directory=folder_paths.get_folder_paths("embeddings"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/dustintheweb/@Projects/AI/ComfyUI/comfy/sd.py", line 424, in load_checkpoint_guess_config
sd = comfy.utils.load_torch_file(ckpt_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/dustintheweb/@Projects/AI/ComfyUI/comfy/utils.py", line 12, in load_torch_file
if ckpt.lower().endswith(".safetensors"):
^^^^^^^^^^
image

just download the missing model in the link https://huggingface.co/webui/ControlNet-modules-safetensors/tree/main

@shaoq
Copy link

shaoq commented May 26, 2024

IPAdapter Model Not Found

I have tried all the solutions suggested in #123 and #313, but I still cannot get it to work. Snipaste_2024-05-19_06-48-46
Attempts made:

  1. Created an "ipadapter" folder under \ComfyUI_windows_portable\ComfyUI\models and placed the required models inside (as shown in the image).
    Snipaste_2024-05-19_06-47-35
    Snipaste_2024-05-19_06-47-47
    Snipaste_2024-05-19_06-47-58
  2. Moved all models to \ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_IPAdapter_plus\models and executed.
  3. Modified the path contents in\ComfyUI\extra_model_paths.yaml(as shown in the image).
    Snipaste_2024-05-19_06-46-27
  4. Added code to \ComfyUI\folder_paths.py(as shown in the image).
    Snipaste_2024-05-19_06-46-57

Are there any other solutions? I would greatly appreciate any help!

U can use " ipadapter model load " to instand of "unified load", and Can you find model files in " ipadapter model load "? if u can, it prove the model path is ok

Thank you for your suggestion! I tried using "ipadapter model load" instead of "unified model" (as shown in the image). The installed model is visible in "ipadapter model load," but I encountered another error: Missing CLIPVision model (as shown in the image). What adjustments should I make?

image image

it seems u should import " load clip vision" node, and connect to you ipadatper
截屏2024-05-26 16 36 31

@jaydenjian
Copy link

IPAdapter Model Not Found

I have tried all the solutions suggested in #123 and #313, but I still cannot get it to work. Snipaste_2024-05-19_06-48-46
Attempts made:

  1. Created an "ipadapter" folder under \ComfyUI_windows_portable\ComfyUI\models and placed the required models inside (as shown in the image).
    Snipaste_2024-05-19_06-47-35
    Snipaste_2024-05-19_06-47-47
    Snipaste_2024-05-19_06-47-58
  2. Moved all models to \ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_IPAdapter_plus\models and executed.
  3. Modified the path contents in\ComfyUI\extra_model_paths.yaml(as shown in the image).
    Snipaste_2024-05-19_06-46-27
  4. Added code to \ComfyUI\folder_paths.py(as shown in the image).
    Snipaste_2024-05-19_06-46-57

Are there any other solutions? I would greatly appreciate any help!

U can use " ipadapter model load " to instand of "unified load", and Can you find model files in " ipadapter model load "? if u can, it prove the model path is ok

Thank you for your suggestion! I tried using "ipadapter model load" instead of "unified model" (as shown in the image). The installed model is visible in "ipadapter model load," but I encountered another error: Missing CLIPVision model (as shown in the image). What adjustments should I make?
image image

it seems u should import " load clip vision" node, and connect to you ipadatper 截屏2024-05-26 16 36 31

Thank you for your response. I actually managed to solve the issue myself later on and forgot to update the thread. I ended up using the Load CLIP Vision and IPAdapter Model Loader methods as you suggested, and everything worked perfectly! Thanks again for your help!

image

@JioJe
Copy link

JioJe commented Jun 1, 2024

dd53bcbd078b933e329fd4464d5d16b
b9e246fc1b3514c647487088576a87c
This may be a new problem

@egaryw2011
Copy link

Wondering if anyone has a suggestion, I dont see an answer in the thread. I have just installed Comfyui via Stability Matrix so all packages should be up to date. Runs okay so far. I just installed IPAdapter and Comfyui does not see IPAdaptor model, I get the error below" I have also installed all the files into the IpAdapter directory, clip vision and lora directories.
image

@egaryw2011
Copy link

Just an update to my post, I found the issue, the path was not set properly pointing to the models.
I added this line
folder_names_and_paths["ipadapter"] = ([os.path.join(models_dir, "ipadapter")], supported_pt_extensions)
into folder_paths.py
image

@o0OooO
Copy link

o0OooO commented Jul 12, 2024

Error occurred when executing IPAdapterAdvanced:

local variable 'face_image' referenced before assignment

File "/container/workflows/default/ComfyUI/execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "/container/workflows/default/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 "/container/workflows/default/ComfyUI/execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "/container/workflows/default/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus/IPAdapterPlus.py", line 783, in apply_ipadapter
return (work_model, face_image, )

@diaoandying
Copy link

20240715104848
222
333
444
Please tell me how this happened. Has anyone encountered this error like me? Please help~I'm about to collapse. The ipadapter plug-in was downloaded through the manager. I have also tried deleting it and re-downloading it manually. The checpoints’ model has also been changed to SD15 SD3 SDXL.... Various versions are not working. The plug-in model and download path are also based on this webpage https://github.com/cubiq /ComfyUI_IPAdapter_plus

@JunpeakChen
Copy link

Error occurred when executing AnyLineArtPreprocessor_aux:

An error happened while trying to locate the file on the Hub and we cannot find the requested files in the local cache. Please check your connection and try again or make sure your Internet connection is on.

File "E:\Comfy UI\ComfyUI-aki-v1.3\execution.py", line 152, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "E:\Comfy UI\ComfyUI-aki-v1.3\execution.py", line 82, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
File "E:\Comfy UI\ComfyUI-aki-v1.3\execution.py", line 75, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "E:\Comfy UI\ComfyUI-aki-v1.3\custom_nodes\comfyui_controlnet_aux\node_wrappers\anyline.py", line 53, in get_anyline
mteed_model = TEDDetector.from_pretrained("TheMistoAI/MistoLine", "MTEED.pth", subfolder="Anyline").to(self.device)
File "E:\Comfy UI\ComfyUI-aki-v1.3\custom_nodes\comfyui_controlnet_aux\src\controlnet_aux\teed_init_.py", line 25, in from_pretrained
model_path = custom_hf_download(pretrained_model_or_path, filename, subfolder=subfolder)
File "E:\Comfy UI\ComfyUI-aki-v1.3\custom_nodes\comfyui_controlnet_aux\src\controlnet_aux\util.py", line 333, in custom_hf_download
model_path = hf_hub_download(repo_id=pretrained_model_or_path,
File "", line 52, in hf_hub_download_wrapper_inner
File "E:\Comfy UI\ComfyUI-aki-v1.3\python\lib\site-packages\huggingface_hub\utils_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
File "E:\Comfy UI\ComfyUI-aki-v1.3\python\lib\site-packages\huggingface_hub\file_download.py", line 1202, in hf_hub_download
return _hf_hub_download_to_local_dir(
File "E:\Comfy UI\ComfyUI-aki-v1.3\python\lib\site-packages\huggingface_hub\file_download.py", line 1440, in _hf_hub_download_to_local_dir
_raise_on_head_call_error(head_call_error, force_download, local_files_only)
File "E:\Comfy UI\ComfyUI-aki-v1.3\python\lib\site-packages\huggingface_hub\file_download.py", line 1826, in _raise_on_head_call_error
raise LocalEntryNotFoundError(

求解,谢谢

@wandoudada
Copy link

Error occurred when executing IPAdapterFaceID:

IPAdapterAdvanced.apply_ipadapter() missing 1 required positional argument: 'model'

File "G:\ComfyUI-aki-v1.3\execution.py", line 152, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "G:\ComfyUI-aki-v1.3\execution.py", line 82, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
File "G:\ComfyUI-aki-v1.3\execution.py", line 75, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))

what should i do,thk

@traithanhnam90
Copy link

I have fixed the error: Error occurred when executing IPAdapterUnifiedLoader: ClipVision model not found

#677

rename the files in the clip_vision folder as follows
CLIP-ViT-bigG-14-laion2B-39B-b160k --------> CLIP-ViT-bigG-14-laion2B-39B.b160k
CLIP- ViT-H -14-laion2B-s32B-b79K --------> CLIP-ViT-H-14-laion2B-s32B.b79K

image

@traithanhnam90
Copy link

rename the files in the clip_vision folder as follows
CLIP-ViT-bigG-14-laion2B-39B-b160k --------> CLIP-ViT-bigG-14-laion2B-39B.b160k
CLIP- ViT-H -14-laion2B-s32B-b79K --------> CLIP-ViT-H-14-laion2B-s32B.b79K

@liuningning123
Copy link

dd53bcbd078b933e329fd4464d5d16b b9e246fc1b3514c647487088576a87c 这可能是一个新问题

How can this problem be solved, and is there an answer

@curious-george-is-available

I'm getting this error on deploying a comfy workflow on Baseten -
Cannot import /app/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus module for custom nodes: No module named 'node_helpers'

@cubiq
Copy link
Owner Author

cubiq commented Sep 6, 2024

old version of comfyui I'm guessing

@hirschferkel
Copy link

hirschferkel commented Sep 7, 2024

IPAdapterUnifiedLoader IPAdapter model not found.
It works with Ipadapter model load but does not with ipadapter unified loader. Does anyone have an idea how to resolve this issue?

Screenshot 2024-09-07 024516

# ComfyUI Error Report
## Error Details
- **Node Type:** IPAdapterUnifiedLoader
- **Exception Type:** Exception
- **Exception Message:** IPAdapter model not found.
## Stack Trace

  File "C:\Users\user\Eigene Programme\ComfyUI_windows_portable_nvidia_cu121_or_cpu\ComfyUI_windows_portable\ComfyUI\execution.py", line 317, 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:\Users\user\Eigene Programme\ComfyUI_windows_portable_nvidia_cu121_or_cpu\ComfyUI_windows_portable\ComfyUI\execution.py", line 192, 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:\Users\user\Eigene Programme\ComfyUI_windows_portable_nvidia_cu121_or_cpu\ComfyUI_windows_portable\ComfyUI\execution.py", line 169, in _map_node_over_list
    process_inputs(input_dict, i)

  File "C:\Users\user\Eigene Programme\ComfyUI_windows_portable_nvidia_cu121_or_cpu\ComfyUI_windows_portable\ComfyUI\execution.py", line 158, in process_inputs
    results.append(getattr(obj, func)(**inputs))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "C:\Users\user\Eigene Programme\ComfyUI_windows_portable_nvidia_cu121_or_cpu\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_IPAdapter_plus\IPAdapterPlus.py", line 573, in load_models
    raise Exception("IPAdapter model not found.")

@curious-george-is-available

IPAdapterUnifiedLoader IPAdapter model not found.
It works with Ipadapter model load but does not with ipadapter unified loader. Does anyone have an idea how to resolve this issue?

Screenshot 2024-09-07 024516

# ComfyUI Error Report
## Error Details
- **Node Type:** IPAdapterUnifiedLoader
- **Exception Type:** Exception
- **Exception Message:** IPAdapter model not found.
## Stack Trace

  File "C:\Users\user\Eigene Programme\ComfyUI_windows_portable_nvidia_cu121_or_cpu\ComfyUI_windows_portable\ComfyUI\execution.py", line 317, 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:\Users\user\Eigene Programme\ComfyUI_windows_portable_nvidia_cu121_or_cpu\ComfyUI_windows_portable\ComfyUI\execution.py", line 192, 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:\Users\user\Eigene Programme\ComfyUI_windows_portable_nvidia_cu121_or_cpu\ComfyUI_windows_portable\ComfyUI\execution.py", line 169, in _map_node_over_list
    process_inputs(input_dict, i)

  File "C:\Users\user\Eigene Programme\ComfyUI_windows_portable_nvidia_cu121_or_cpu\ComfyUI_windows_portable\ComfyUI\execution.py", line 158, in process_inputs
    results.append(getattr(obj, func)(**inputs))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "C:\Users\user\Eigene Programme\ComfyUI_windows_portable_nvidia_cu121_or_cpu\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_IPAdapter_plus\IPAdapterPlus.py", line 573, in load_models
    raise Exception("IPAdapter model not found.")

I'm no expert but Checkout the instructions on the repo (https://github.com › cubiqcubiq/ComfyUI_IPAdapter_plus). Create the directory and download the models there. It might work.! Screenshot_20240907-104350.png

@hirschferkel
Copy link

@curious-george-is-available as you can see, the models are in the right directory, that's why the IpAdapter model loader offers the list on the rigth.
The error message on the left belongs to the IpAdapterUnifiedLoader.
I cannot see why IpAdapterUnifiedLoader does not recognize the same directory.

@hirschferkel
Copy link

O.k. I got closer to the issue.
I happens only, when I use juggernautXL as checkpoint. Any idea, why it does not work with juggernaut.safetensors?

@hirschferkel
Copy link

hirschferkel commented Sep 7, 2024

Finally I found the issue: It was an old adapter used in former workflows, but it was not visible that it is old! After I created a new Adapter everything works ... what a mess.

@soulyeah
Copy link

raise ValueError(
ValueError: Argument interpolation should be an InterpolationMode or a corresponding Pillow integer constant, but got InterpolationMode.BICUBIC.
Uploading 1726905323393.jpg…

@honamkts
Copy link

honamkts commented Oct 9, 2024

Hi All,
I am a new user of the ComfyUI, I used the IPAdapter Advannced node.
I do not know how can I fix it.

Please help.

Thansk all.

Error

@hirschferkel
Copy link

@honamkts You have to read the error message carefully: Your checkpoint output size image does not match the ratio yof your image. You have to rezise it before you use it with the IPAdapter.

@honamkts
Copy link

@honamkts You have to read the error message carefully: Your checkpoint output size image does not match the ratio yof your image. You have to rezise it before you use it with the IPAdapter.

Thank you,
But I resize the image so small however the error still there :(
PLease help me to fix

error1

@hirschferkel
Copy link

hirschferkel commented Oct 11, 2024

@honmaks, sorry, I guess my advice was wrong. It looks like a mismatch among the checkpoint/IPadapter/Clip vision.

Using the wrong Clip vision maybe the reason for this issue. Make sure you have the right version of the IPAdapter models downloaded and installed as well. (can check it here:https://huggingface.co/h94/IP-Adapter)

@juliabeaugerard
Copy link

Hello guys I have an error here

Background is everything is updated to the core, stuck in here still though, can anyone help me?

'Attn2Replace' object has no attribute 'set_new_condition'

Last log:

Traceback (most recent call last):
  File "C:\pinokio\api\comfy.git\app\execution.py", line 323, in execute
    output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=exec
ution_block_cb, pre_execute_cb=pre_execute_cb)
  File "C:\pinokio\api\comfy.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, execut
ion_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
  File "C:\pinokio\api\comfy.git\app\execution.py", line 169, in _map_node_over_list
    process_inputs(input_dict, i)
  File "C:\pinokio\api\comfy.git\app\execution.py", line 158, in process_inputs
    results.append(getattr(obj, func)(**inputs))
  File "C:\pinokio\api\comfy.git\app\custom_nodes\ComfyUI_IPAdapter_plus-4e898fe0c842259fb8eccbd9db1e2d
533539cf9d\IPAdapterPlus.py", line 692, in apply_ipadapter
    set_model_patch_replace(work_model, patch_kwargs, ("input", id, index))
  File "C:\pinokio\api\comfy.git\app\custom_nodes\ComfyUI_IPAdapter_plus-4e898fe0c842259fb8eccbd9db1e2d
533539cf9d\IPAdapterPlus.py", line 168, in set_model_patch_replace
    to["patches_replace"]["attn2"][key].set_new_condition(**patch_kwargs)
AttributeError: 'Attn2Replace' object has no attribute 'set_new_condition'

@honamkts
Copy link

@honmaks, sorry, I guess my advice was wrong. It looks like a mismatch among the checkpoint/IPadapter/Clip vision.

Using the wrong Clip vision maybe the reason for this issue. Make sure you have the right version of the IPAdapter models downloaded and installed as well. (can check it here:https://huggingface.co/h94/IP-Adapter)

Thank All.
I can resolvo this issues. I do not know the reason but I can use the IPAdapter when I remove all and re-install the ConfyUI

Thanks all.

@Hasasasa
Copy link

微信图片_20241027191707 help!!!please help me look this error

@ggarra13
Copy link

ggarra13 commented Nov 20, 2024

Latest ComfyUI and IPAdapter_plus. I am using IPAdapter Advanced, IPAdapter Unified Loader, IPAdapter Embeds like shown in the picture and getting:
image

IPAdapter chokes with:

size mismatch for proj_in.weight: copying a param with shape torch.Size([1280, 1280]) from checkpoint, the shape in current model is torch.Size([1280, 1668])

I've checked the current clip_vision model size and and it is indeed 1280, 1664:

json_config= ComfyUI\comfy\clip_vision_config_g.json
Loading json_config= ComfyUI\comfy\clip_vision_config_g.json
CLIPVision embed_dim= 1664
CLIPVisionEmbeddings embed_dim= 1664
INFO: Clip Vision model loaded from ComfyUI\models\clip_vision\CLIP-ViT-H-14-laion2B-s32B-b79K.safetensors
INFO: IPAdapter model loaded from models\ipadapter\ip-adapter-plus_sdxl_vit-h.safetensors
ipadapter has clip_vision {'image_size': 224, 'load_device': device(type='cuda', index=0), 'dtype': torch.float16, 'model': CLIPVisionModelProjection(
(vision_model): CLIPVision(
(embeddings): CLIPVisionEmbeddings(
(patch_embedding): Conv2d(3, 1664, kernel_size=(14, 14), stride=(14, 14), bias=False)
(position_embedding): Embedding(257, 1664)
)
(pre_layrnorm): LayerNorm((1664,), eps=1e-05, elementwise_affine=True)
(encoder): CLIPEncoder(
(layers): ModuleList(
(0-47): 48 x CLIPLayer(
(layer_norm1): LayerNorm((1664,), eps=1e-05, elementwise_affine=True)
(self_attn): CLIPAttention(
(q_proj): Linear(in_features=1664, out_features=1664, bias=True)
(k_proj): Linear(in_features=1664, out_features=1664, bias=True)
(v_proj): Linear(in_features=1664, out_features=1664, bias=True)
(out_proj): Linear(in_features=1664, out_features=1664, bias=True)
)
(layer_norm2): LayerNorm((1664,), eps=1e-05, elementwise_affine=True)
(mlp): CLIPMLP(
(fc1): Linear(in_features=1664, out_features=8192, bias=True)
(fc2): Linear(in_features=8192, out_features=1664, bias=True)
)
)
)
)
(post_layernorm): LayerNorm((1664,), eps=1e-05, elementwise_affine=True)
)
(visual_projection): Linear(in_features=1664, out_features=1280, bias=False)
), 'patcher': <comfy.model_patcher.ModelPatcher object at 0x0000018BDB749BE0>}
INFO: the IPAdapter reference image is not a square, CLIPImageProcessor will resize and crop it at the center. If the main focus of the picture is not in the middle the result might not be what you are expecting.
embedding_dim 1664
dim 1280
output_dim 2048

I've also checked all the safetensor files and they are named correctly and have the right checksum, Any clues?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests