Nodes/Comfyui-zhenzhen/Zhenzhen_upload
ComfyUI Node

Zhenzhen_upload

Getting a Local Image Onto Midjourney's Servers

By T8mars·Created 12 months ago·Updated 4 days ago· 724
Zhenzhen_upload
  • image
  • url
api_key
skip_errorfalse

Midjourney is a weird beast: it's arguably the benchmark for artistic image quality, and it runs entirely off hosted URLs. It cannot look at a tensor sitting in your ComfyUI graph. So when you want MJ to reference your image - for a style, a character, an object - something has to shove that image onto MJ's servers and hand back a link. That something is this node.

Comfly_upload is the least glamorous node in the whole Comfly pack and one of the most essential in the Midjourney workflow. You feed it an image, it uploads it through the proxy's /mj/submit/upload-discord-images endpoint, and it returns a URL string. That URL is what you paste (well, wire) into Comfly_Mj's sref, cref, or oref inputs to do style/character/object reference generation. Without this step, a whole family of MJ workflows simply doesn't exist in ComfyUI.

The mechanism

The node takes your IMAGE tensor, converts it to a base64-encoded PNG, and POSTs it to Midjourney's image-upload endpoint via the Comfly proxy (using the same "speed mode" routing as the other MJ nodes). On success you get a hosted URL back. That's the whole trick - one input in, one string out.

Inputs and output

  • image (required) - any IMAGE tensor: load one, or wire in the output of a previous generation.
  • api_key (required input on the node) - your Comfly key. Empty means it falls back to the key stored in Comflyapi.json in the pack folder.
  • url (output) - the hosted link, a STRING. Feed it into Comfly_Mj's sref / cref / oref inputs, or store it for reuse.

Install

Same as the rest of the pack:

cd ComfyUI/custom_nodes
git clone https://github.com/ainewsto/Comfyui_Comfly

...then restart ComfyUI. Or use ComfyUI Manager and search Comfyui_Comfly. Nothing extra to download - the heavy lifting happens on the proxy's servers. Grab an API key from ai.comfly.chat and put it in Comflyapi.json or the node's api_key field.

Where people get burned

The returned URL lives on the proxy's (effectively Discord's) infrastructure, and hosted links expire. If you reference an uploaded image hours later in a fresh run and MJ silently ignores it or errors, re-upload - don't reuse a stale link. And since uploads can consume small token/credit amounts, don't spam the node in a loop just to test; upload once, wire the URL everywhere you need it. It's dull, it's hidden, but skip it and your MJ reference workflow dies at the first wire.

Categoryzhenzhen/Midjourney

Inputs (3)

NameTypeDefaultDescription
imageIMAGE
api_keySTRING
skip_errorBOOLEANfalse开启后,节点失败时不报错、按旧行为返回默认空结果;关闭时(默认)失败直接抛出错误。

Outputs (1)

NameTypeDescription
urlSTRING