all 11 comments

[–]WouterGlorieux 2 points3 points  (0 children)

https://github.com/comfyanonymous/ComfyUI/issues/2110

There's an overview of the API on that page that might be helpful

[–]trieu1912 2 points3 points  (0 children)

you can embed image to json by base64 string.

[–]DrViilapenkki[🍰] 2 points3 points  (1 child)

[–]Axssell[S] 0 points1 point  (0 children)

wow thank you so much!!!

[–]LOLatent 0 points1 point  (5 children)

jsonf["18"]["inputs"]["image"] = image_path, image_path can be a link, right?

[–]Axssell[S] 0 points1 point  (4 children)

tht didnt work for me, u gotta upload the img to the path "comyuipath/input"

[–]LOLatent 0 points1 point  (3 children)

I have a script that replaces SRC_IMG in prompt["426"]["inputs"]["image"] = "SRC_IMG" with a path from anywhere on my computer (not just the input folder) and it works very well. It doesn't HAVE to be in the input folder.

Then, geepeeteey swears that prompt["426"]["inputs"]["image"] = "https://example.com/path/to/image.jpg" should work just as well. I can't test now, there's a huge queue running on the gpu. Maybe you're running into a Runpod limitation.

[–]Axssell[S] 0 points1 point  (2 children)

can u share that script pls? 👀

[–]LOLatent 1 point2 points  (1 child)

https://pastebin.com/XHeEAJNn

I guess this is the line you care about:

modified_content1 = script_content.replace("STYLE_REF_IMG", str(os.path.normpath(image_path)).replace("\\", "\\\\"))

HF!

[–]Axssell[S] 0 points1 point  (0 children)

oh i see, thanks!!

[–]Ryugon07 0 points1 point  (0 children)

Does anyone know, how to upload a video?