Nodes/Leon's Utility and API Integration Nodes/πŸ€– Leon Midjourney API Describe
ComfyUI Node

πŸ€– Leon Midjourney API Describe

Reverse-engineer any image into Midjourney prompts β€” the describe node

By l3ony2kΒ·Created about a year agoΒ·Updated 2 months agoΒ· 3
πŸ€– Leon Midjourney API Describe
  • image
  • description_1
  • description_2
  • description_3
  • description_4
  • task_id
  • image_url
β—„mj_proxy_endpointhttp://localhost:8080β–Ί
β—„api_keysk-midjourneyβ–Ί
β—„bot_typeMID_JOURNEYβ–Ί
β—„polling_interval_seconds5β–Ί
β—„max_polling_attempts30β–Ί
β—„image_urlβ–Ί
β—„account_filter_remarkβ–Ί

Leon Midjourney API Describe brings Midjourney's /describe - the feature that looks at an image and writes four prompt variants for it - into ComfyUI. Feed it an image, and it returns four description_1 through description_4 strings you can wire into ShowText nodes, copy into a prompt builder, or feed straight into the pack's own Midjourney generate node as a re-roll. It's the "how would Midjourney prompt this?" tool, and it's genuinely handy for studying images you like or bootstrapping a style.

The crucial context: this node does not call Midjourney's official API. It talks to a self-hosted Midjourney proxy server - the same mj_proxy_endpoint (default http://localhost:8080) pattern as the pack's generate and upload nodes. You run the proxy yourself, it brokers with Discord/Midjourney, and this node is the ComfyUI client for it. No proxy, no describe.

How it works

The mechanism is the proxy's submit-then-poll dance. The node POSTs to {endpoint}/mj/submit/describe with your image (base64 tensor or hosted URL), the bot type, and optional account_filter_remark, then polls {endpoint}/mj/task/{task_id}/fetch every polling_interval_seconds (default 5) up to max_polling_attempts (default 30) until the task reaches SUCCESS or FAILURE. On success it parses the returned prompt text into four descriptions and returns them.

The inputs that matter:

  • mj_proxy_endpoint - your proxy's base URL. http://localhost:8080 is the standard self-host default.
  • api_key - the proxy's key, used for both the mj-api-secret and X-Api-Key headers. Default sk-midjourney matches the popular proxy setups.
  • bot_type - MID_JOURNEY or NIJI_JOURNEY.
  • image / image_url - the image to describe. Socket and URL are mutually exclusive; an image is required (the node raises if neither is given).
  • account_filter_remark - optional, for proxy setups that route tasks to a specific Discord account.

Outputs: description_1–description_4 (STRINGS), plus task_id and image_url.

Installing it

Pack-wide install:

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. Then the real install step: stand up a Midjourney proxy server that implements the /mj/submit/describe and /mj/task/{id}/fetch endpoints, and point mj_proxy_endpoint at it.

Where people get burned

The setup is the friction. If the node times out, first check the proxy is reachable and the key matches the proxy's config - the 30-poll default is 150 seconds, which is usually plenty but can be tight on a slow proxy. The account_filter_remark only matters if your proxy manages multiple Discord accounts; leave it empty otherwise. And note the output is four prompt suggestions, not a faithful prompt - Midjourney's describe is loose by design, so treat them as starting points. For turning any image into four MJ-style prompt seeds, it's the missing piece of the pack's Midjourney workflow.

CategoryLeon_API

Inputs (8)

NameTypeDefaultDescription
mj_proxy_endpointSTRINGhttp://localhost:8080Base URL of your Midjourney Proxy (e.g., http://localhost:8080)
api_keySTRINGsk-midjourneyYour API key for the proxy (used for both mj-api-secret and X-Api-Key headers)
bot_typeCOMBOMID_JOURNEY2 options: MID_JOURNEY, NIJI_JOURNEY
polling_interval_secondsINT51–60How often to check task status (seconds)
max_polling_attemptsINT301–120Max attempts to poll for result before timeout
imageoptIMAGEInput image to describe
image_urloptSTRINGOptional hosted image URL to describe (use instead of socket input)
account_filter_remarkoptSTRINGOptional: Remark for account filtering (e.g., lzn)

Outputs (6)

NameTypeDescription
description_1STRINGβ€”
description_2STRINGβ€”
description_3STRINGβ€”
description_4STRINGβ€”
task_idSTRINGβ€”
image_urlSTRINGβ€”