ltdrdata / ComfyUI-extension-tutorials

535 stars 33 forks source link

example regional-ipadapter workflow error #37

Open j2l opened 5 months ago

j2l commented 5 months ago

Thank you for your nodes and examples. I downloaded regional-ipadapter.png and since it's also a workflow, I try to run it locally. I only added photos, changed prompt and model to SD1.5:

Error occurred when executing ApplyRegionalIPAdapters //Inspire:

'NoneType' object has no attribute 'patcher'

  File "/mnt/phil/ComfyUI/execution.py", line 152, in recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
  File "/mnt/phil/ComfyUI/execution.py", line 82, in get_output_data
    return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
  File "/mnt/phil/ComfyUI/execution.py", line 75, in map_node_over_list
    results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
  File "/mnt/phil/ComfyUI/custom_nodes/ComfyUI-Inspire-Pack/inspire/regional_nodes.py", line 383, in doit
    model = v.doit(ipadapter_pipe)
  File "/mnt/phil/ComfyUI/custom_nodes/ComfyUI-Inspire-Pack/inspire/regional_nodes.py", line 235, in doit
    model = obj().apply_ipadapter(ipadapter, model, self.weight, clip_vision=clip_vision, image=self.image,
  File "/mnt/phil/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus/IPAdapterPlus.py", line 751, in apply_ipadapter
    clip_embed = encode_image_masked(clip_vision, image, clip_vision_mask)
  File "/mnt/phil/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus/IPAdapterPlus.py", line 270, in encode_image_masked
    comfy.model_management.load_model_gpu(clip_vision.patcher)

If I try with SDXL (JuggernautXL), I get another error:

Error occurred when executing ApplyRegionalIPAdapters //Inspire:

'NoneType' object is not subscriptable

  File "/mnt/phil/ComfyUI/execution.py", line 152, in recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
  File "/mnt/phil/ComfyUI/execution.py", line 82, in get_output_data
    return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
  File "/mnt/phil/ComfyUI/execution.py", line 75, in map_node_over_list
    results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
  File "/mnt/phil/ComfyUI/custom_nodes/ComfyUI-Inspire-Pack/inspire/regional_nodes.py", line 383, in doit
    model = v.doit(ipadapter_pipe)
  File "/mnt/phil/ComfyUI/custom_nodes/ComfyUI-Inspire-Pack/inspire/regional_nodes.py", line 235, in doit
    model = obj().apply_ipadapter(ipadapter, model, self.weight, clip_vision=clip_vision, image=self.image,
  File "/mnt/phil/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus/IPAdapterPlus.py", line 688, in apply_ipadapter
    self.is_full = "proj.3.weight" in ipadapter["image_proj"]

Screenshot from 2024-03-27 14-06-38

Any idea what am I doing wrong?

ltdrdata commented 5 months ago

image

Make sure model helper preset. And make sure IPAdapter Plus and Inspire Pack both up to date.

j2l commented 5 months ago

Thank you @ltdrdata Redoing from scratch:

Here's the workflow (using sdxl base & example.png): workflow.json

I'm using Ubuntu 22.04, Driver Version: 550.54.14, CUDA Version: 12.4, RTX 3060 12GB

ltdrdata commented 5 months ago

Thank you @ltdrdata Redoing from scratch:

  • Updating IPAdapter Plus and Inspire
    • Restart, re-import original workflow: image image
  • Staying on SDXL, new error argument of type 'NoneType' is not iterable: image

Here's the workflow (using sdxl base & example.png): workflow.json

I'm using Ubuntu 22.04, Driver Version: 550.54.14, CUDA Version: 12.4, RTX 3060 12GB

You need to download missing model filed. https://youtu.be/FeeIHjt64SY?feature=shared

j2l commented 5 months ago

OK @ltdrdata I downloaded IPadapter and CLIPVision models (many). No more error, but crappy result (all images are 512x512): image checkpoint is a XL, but not SDXL base.

ltdrdata commented 5 months ago

See the mask preview; it's not being generated correctly. This indicates that the image passed through color_mask is not composed of accurate RGB values.

j2l commented 5 months ago

@ltdrdata thank you. When resizing it was saved as jpg, Red and Blue were #FE, not #FF anymore and a lot of compression artifacts were messing around. It works: image

j2l commented 5 months ago

BTW, the checkpoint + IPAdapter + CLIPVision models are heavy on my 3060 (12GB) and I had to reboot multiple times because it freezes the PC. Do you know which combo of models is enough to make it work?