fofr / cog-comfyui

Run ComfyUI with an API
https://replicate.com/fofr/any-comfyui-workflow
MIT License
544 stars 124 forks source link

IPAdapterUnifiedLoader setup error #165

Closed titlesxyz closed 2 months ago

titlesxyz commented 2 months ago

I've tried to create a forked cog from this repo as well as clone an exact copy of cog-style-transfer and both throw errors during setup and reference IPAdapterUnifiedLoader not being available.

error log from this repo:

Checking inputs
Downloading https://robbreport.com/wp-content/uploads/2022/08/296gt304.jpg?w=1000 to /tmp/inputs/296gt304.jpg?w=1000
✅ /tmp/inputs/296gt304.jpg?w=1000
Downloading https://upload.wikimedia.org/wikipedia/commons/thumb/e/ea/Van_Gogh_-_Starry_Night_-_Google_Art_Project.jpg/1200px-Van_Gogh_-_Starry_Night_-_Google_Art_Project.jpg to /tmp/inputs/1200px-Van_Gogh_-_Starry_Night_-_Google_Art_Project.jpg
✅ /tmp/inputs/1200px-Van_Gogh_-_Starry_Night_-_Google_Art_Project.jpg
====================================
Checking weights
Including weights for IPAdapter preset: PLUS (high strength)
⏳ Downloading CLIP-ViT-H-14-laion2B-s32B-b79K.safetensors to ComfyUI/models/clip_vision
✅ CLIP-ViT-H-14-laion2B-s32B-b79K.safetensors downloaded to ComfyUI/models/clip_vision in 8.19s, size: 2411.24MB
⏳ Downloading sai_xl_depth_256lora.safetensors to ComfyUI/models/controlnet
✅ sai_xl_depth_256lora.safetensors downloaded to ComfyUI/models/controlnet in 3.92s, size: 738.55MB
⏳ Downloading sk_model.pth to ComfyUI/custom_nodes/comfyui_controlnet_aux/ckpts/lllyasviel/Annotators
✅ sk_model.pth downloaded to ComfyUI/custom_nodes/comfyui_controlnet_aux/ckpts/lllyasviel/Annotators in 1.16s, size: 16.38MB
⏳ Downloading sk_model2.pth to ComfyUI/custom_nodes/comfyui_controlnet_aux/ckpts/lllyasviel/Annotators
✅ sk_model2.pth downloaded to ComfyUI/custom_nodes/comfyui_controlnet_aux/ckpts/lllyasviel/Annotators in 0.58s, size: 16.38MB
⏳ Downloading ip-adapter-plus_sd15.safetensors to ComfyUI/models/ipadapter
✅ ip-adapter-plus_sd15.safetensors downloaded to ComfyUI/models/ipadapter in 2.60s, size: 93.63MB
⏳ Downloading depth_anything_vits14.pth to ComfyUI/custom_nodes/comfyui_controlnet_aux/ckpts/LiheYoung/Depth-Anything/checkpoints
✅ depth_anything_vits14.pth downloaded to ComfyUI/custom_nodes/comfyui_controlnet_aux/ckpts/LiheYoung/Depth-Anything/checkpoints in 1.97s, size: 94.62MB
⏳ Downloading depth_anything_vitl14.pth to ComfyUI/custom_nodes/comfyui_controlnet_aux/ckpts/LiheYoung/Depth-Anything/checkpoints
✅ depth_anything_vitl14.pth downloaded to ComfyUI/custom_nodes/comfyui_controlnet_aux/ckpts/LiheYoung/Depth-Anything/checkpoints in 4.62s, size: 1279.26MB
⏳ Downloading t2i-adapter_diffusers_xl_lineart.safetensors to ComfyUI/models/controlnet
✅ t2i-adapter_diffusers_xl_lineart.safetensors downloaded to ComfyUI/models/controlnet in 2.28s, size: 150.74MB
⏳ Downloading sd_xl_base_1.0.safetensors to ComfyUI/models/checkpoints
✅ sd_xl_base_1.0.safetensors downloaded to ComfyUI/models/checkpoints in 41.12s, size: 6616.67MB
⏳ Downloading depth_anything_vitb14.pth to ComfyUI/custom_nodes/comfyui_controlnet_aux/ckpts/LiheYoung/Depth-Anything/checkpoints
✅ depth_anything_vitb14.pth downloaded to ComfyUI/custom_nodes/comfyui_controlnet_aux/ckpts/LiheYoung/Depth-Anything/checkpoints in 30.61s, size: 371.90MB
⏳ Downloading ip-adapter-plus_sdxl_vit-h.safetensors to ComfyUI/models/ipadapter
✅ ip-adapter-plus_sdxl_vit-h.safetensors downloaded to ComfyUI/models/ipadapter in 3.36s, size: 808.26MB
====================================
Randomising seed to 3420119083
Running workflow
got prompt
invalid prompt: {'type': 'invalid_prompt', 'message': 'Cannot execute because node IPAdapterUnifiedLoader does not exist.', 'details': "Node ID '#11'", 'extra_info': {}}
ComfyUI error: 400 Bad Request
Traceback (most recent call last):
File "/root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/cog/server/worker.py", line 354, in _predict
result = predict(**payload)
File "/src/predict.py", line 115, in predict
self.comfyUI.run_workflow(wf)
File "/src/comfyui.py", line 249, in run_workflow
prompt_id = self.queue_prompt(workflow)
File "/src/comfyui.py", line 180, in queue_prompt
raise Exception(
Exception: ComfyUI Error – Your workflow could not be run. This usually happens if you’re trying to use an unsupported node. Check the logs for 'KeyError: ' details, and go to https://github.com/fofr/cog-comfyui to see the list of supported custom nodes.

error log from duplicated cog-style-transfer:


Random seed set to: 2468513688
Checking weights
Including weights for IPAdapter preset: PLUS (high strength)
✅ dreamshaperXL_lightningDPMSDE.safetensors
✅ CLIP-ViT-H-14-laion2B-s32B-b79K.safetensors
✅ ip-adapter-plus_sdxl_vit-h.safetensors
====================================
Running workflow
got prompt
Error handling request
Traceback (most recent call last):
File "/root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 462, in _handle_request
resp = await request_handler(request)
File "/root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/aiohttp/web_app.py", line 537, in _handle
resp = await handler(request)
File "/root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 114, in impl
return await handler(request)
File "/src/ComfyUI/server.py", line 41, in cache_control
response: web.Response = await handler(request)
File "/src/ComfyUI/server.py", line 468, in post_prompt
valid = execution.validate_prompt(prompt)
File "/src/ComfyUI/execution.py", line 625, in validate_prompt
class_ = nodes.NODE_CLASS_MAPPINGS[prompt[x]['class_type']]
KeyError: 'IPAdapterUnifiedLoader'
ComfyUI error: 500 Internal Server Error
Traceback (most recent call last):
File "/root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/cog/server/worker.py", line 354, in _predict
result = predict(**payload)
File "/src/predict.py", line 196, in predict
self.comfyUI.run_workflow(wf)
File "/src/helpers/comfyui.py", line 217, in run_workflow
prompt_id = self.queue_prompt(workflow)
File "/src/helpers/comfyui.py", line 165, in queue_prompt
raise Exception(
Exception: ComfyUI Error – Your workflow could not be run. This usually happens if you’re trying to use an unsupported node. Check the logs for 'KeyError: ' details, and go to https://github.com/fofr/cog-comfyui to see the list of supported custom nodes.```
fofr commented 2 months ago

Did you install the custom nodes before running? ./scripts/install_custom_nodes.py

titlesxyz commented 2 months ago

Yes, thank you!