π€ Leon Midjourney API Describe
Reverse-engineer any image into Midjourney prompts β the describe node
- image
- description_1
- description_2
- description_3
- description_4
- task_id
- image_url
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:8080is the standard self-host default.api_key- the proxy's key, used for both themj-api-secretandX-Api-Keyheaders. Defaultsk-midjourneymatches the popular proxy setups.bot_type-MID_JOURNEYorNIJI_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.
Inputs (8)
| 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) |
| bot_type | COMBO | MID_JOURNEY | 2 options: MID_JOURNEY, NIJI_JOURNEY |
| polling_interval_seconds | INT | 51β60 | How often to check task status (seconds) |
| max_polling_attempts | INT | 301β120 | Max attempts to poll for result before timeout |
| imageopt | IMAGE | Input image to describe | |
| image_urlopt | STRING | Optional hosted image URL to describe (use instead of socket input) | |
| account_filter_remarkopt | STRING | Optional: Remark for account filtering (e.g., lzn) |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| description_1 | STRING | β |
| description_2 | STRING | β |
| description_3 | STRING | β |
| description_4 | STRING | β |
| task_id | STRING | β |
| image_url | STRING | β |