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

Custom validation failed for node: image - Invalid image file #120

Closed
swapnil281095 opened this issue Jul 12, 2024 · 4 comments
Closed

Custom validation failed for node: image - Invalid image file #120

swapnil281095 opened this issue Jul 12, 2024 · 4 comments

Comments

@swapnil281095
Copy link

swapnil281095 commented Jul 12, 2024

Hello,

I am working on image generation task using Replicate's elixir code for API call. Since I cannot send locally stored image as a request to Replicate API. I have updated the comfyUI workflow json and replaced local image path with hosted image's path url and below is the error I am getting:

I am new with the comfyUI and may be I have used an incorrect node.

Checking inputs
Downloading https://replicate.delivery/pbxt/KFkSv1oX0v3e7GnOrmzULGqCA8222pC6FI2EKcfuCZWxvHN3/newton_0.jpg to /tmp/inputs/newton_0.jpg
✅ /tmp/inputs/newton_0.jpg

Checking weights
Including weights for IPAdapter preset: STANDARD (medium 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 1.82s, size: 2411.24MB
⏳ Downloading ProteusV0.4.safetensors to ComfyUI/models/checkpoints
✅ ProteusV0.4.safetensors downloaded to ComfyUI/models/checkpoints in 4.87s, size: 6617.77MB
⏳ Downloading ip-adapter_sd15.safetensors to ComfyUI/models/ipadapter
✅ ip-adapter_sd15.safetensors downloaded to ComfyUI/models/ipadapter in 0.22s, size: 42.57MB
⏳ Downloading ip-adapter_sdxl_vit-h.safetensors to ComfyUI/models/ipadapter
✅ ip-adapter_sdxl_vit-h.safetensors downloaded to ComfyUI/models/ipadapter in 0.69s, size: 666.04MB

Randomising seed to 34061991
Running workflow
got prompt
Failed to validate prompt for output 9:

  • LoadImage 16:
  • Custom validation failed for node: image - Invalid image file: https://replicate.delivery/pbxt/KFkSv1oX0v3e7GnOrmzULGqCA8222pC6FI2EKcfuCZWxvHN3/newton_0.jpg
    Output will be ignored
    invalid prompt: {'type': 'prompt_outputs_failed_validation', 'message': 'Prompt outputs failed validation', 'details': '', 'extra_info': {}}
    ComfyUI error: 400 Bad Request
    Traceback (most recent call last):
    File "/root/.pyenv/versions/3.10.6/lib/python3.10/site-packages/cog/server/worker.py", line 221, in _predict
    result = predict(**payload)
    File "/src/predict.py", line 115, in predict
    self.comfyUI.run_workflow(wf)
    File "/src/comfyui.py", line 240, in run_workflow
    prompt_id = self.queue_prompt(workflow)
    File "/src/comfyui.py", line 178, 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
Copy link
Owner

fofr commented Jul 15, 2024

Please can you share a link to your prediction so I can debug

@swapnil281095
Copy link
Author

swapnil281095 commented Jul 15, 2024

@fofr
Copy link
Owner

fofr commented Jul 16, 2024

Thank you, I've found the bug.

Partial fix here, but I'm going to do a more airtight one shortly:
b1547d4

@swapnil281095
Copy link
Author

@fofr , Thank you for the efforts. I now understood the issue, earlier code didn't supported workflow with duplicate urls. When I tried executing with different urls, it worked and moving forward it can also support duplicate urls.

@fofr fofr closed this as completed Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants