π€ Leon Midjourney API Upload
Push a ComfyUI image into Midjourney's Discord β the upload node
- image
- image_url
Leon Midjourney API Upload is the plumbing that makes the pack's Midjourney workflow self-contained. Midjourney's image prompting works by reference - you point it at an image URL, often a Discord-hosted one - and this node gets your ComfyUI image to exactly that place: it uploads an image through your Midjourney proxy, which stores it in Discord and returns a Discord URL you can then use as an image prompt. Feed it a tensor, get back a usable image_url string.
Like its Midjourney siblings, this node is only as real as your proxy. There's no official Midjourney API here - this is the self-hosted proxy pattern (default mj_proxy_endpoint of http://localhost:8080), the same one the pack's generate and describe nodes use. If you've got the proxy running for generation, you already have everything this node needs.
How it works
This one is a single submit, no polling. The node POSTs to {endpoint}/mj/submit/upload-discord-images with your image in a base64Array and the standard mj-api-secret / X-Api-Key headers, expects a success code, and takes the first URL from the proxy's result array as its output. It's fast - the upload is done in one round trip.
The inputs that matter:
mj_proxy_endpoint/api_key- same proxy config as the generate and describe nodes.image/image_url- what to upload. A tensor is converted to a JPEG base64 string; a hosted URL is passed through. They're mutually exclusive (providing both raises an error), and at least one is required.account_filter_remark- optional. Note the detail: on this node it's sent in the payload asfilter, notaccountFilterlike the generate node - so if your proxy is strict about account routing, match the field to what your proxy version expects.
Single output: image_url (STRING) - the Discord URL you can wire into the generate node's base64_array_json or use wherever you need a Midjourney-addressable image.
Installing it
The ComfyUI side is trivial:
cd ComfyUI/custom_nodes
git clone https://github.com/l3ony2k/comfyui-leon-nodes
pip install -r requirements.txt
Restart ComfyUI or install "ComfyUI Leon Nodes" via ComfyUI Manager. The real prerequisite - a running Midjourney proxy - is the same one the other MJ nodes need.
Where people get burned
This node inherits the proxy's rules, so the failure modes are mostly upstream: a proxy that can't reach its Discord account, or an account_filter_remark that doesn't match a configured account. The single-upload design means no retry/poll logic - if the submit returns a non-success code, the node raises immediately with the proxy's description, which is actually the helpful kind of failure. And remember the output is a Discord-hosted URL, which is exactly what Midjourney wants but not something you should treat as permanent external hosting. It's a small node with a narrow job, and it does it cleanly.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| mj_proxy_endpoint | STRING | http://localhost:8080 | Base URL of your Midjourney Proxy (e.g., http://localhost:8080) |
| api_key | STRING | sk-midjourney | Your API key for the proxy (used for both mj-api-secret and X-Api-Key headers) |
| imageopt | IMAGE | Input image to upload to Discord | |
| image_urlopt | STRING | Optional hosted image URL to upload (use instead of socket input) | |
| account_filter_remarkopt | STRING | Optional: Remark for account filtering (e.g., lzn) |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image_url | STRING | β |