Nodes/ComfyUI-MidjourneyHub/Midjourney Upscale/Variation
ComfyUI Node

Midjourney Upscale/Variation

Turn that 2×2 grid into a finished image — U1 to V4, server-side

By jiaqianjing·Created 2 years ago·Updated 4 months ago· 18
Midjourney Upscale/Variation
    • IMAGE
    task_id
    actionU1

    MidjourneyImagineNode gives you a 2×2 grid. This node is what you do with it. Midjourney Upscale/Variation takes a task_id from an Imagine (or Blend) node, picks one of the eight actions MJ offers on a grid - upscale one of the four cells, or generate a variation of it - and returns the resulting image as a normal ComfyUI IMAGE tensor. The heavy lifting happens on the relay's servers; your GPU stays bored.

    How it works

    The trick is that MJ doesn't let you just ask for "cell 3 upscaled." The API needs a customId - an opaque button identifier that only exists once a task finishes. So the node first calls sync_mj_status(task_id) to pull the finished task's button map, looks up the customId for your chosen action, then POSTs it to /mj/submit/action. That spawns a new subtask, which the node polls until it's done, then downloads the image. Two round-trips and a wait, but you never touch the buttons yourself.

    The two inputs

    That's genuinely the whole interface:

    • task_id - the STRING from a MidjourneyImagineNode (or Blend). Without a finished grid task, this node has nothing to act on.
    • action - U1/U2/U3/U4 (upscale one grid cell) or V1/V2/V3/V4 (make a variation of one grid cell). Default is U1.

    One output: IMAGE. Wire it to a preview or save node.

    When to use the batch version instead

    If you're experimenting and want to see all four upscales, the pack's Midjourney Batch Upscale/Variation runs U1–U4 in parallel - nicer, but it costs four jobs and returns four images. This single node is the one you reach for when you've got a clear favorite cell, or when you're chaining: pick U2, then run a V2 variation on that result, then upscale again. Each of those steps is one of these nodes, and the task_id just keeps flowing.

    Installing & setup

    Same pack, same dance: install ComfyUI-MidjourneyHub via ComfyUI Manager, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/jiaqianjing/ComfyUI-MidjourneyHub
    # restart ComfyUI
    

    Then edit config.ini in the pack folder - your key and URL go under [MIDJOURNEY_API]. The repo ships with the author's keys in that file, so swap them for your own before you run anything.

    Where people get burned

    The action only exists while the task exists. If the original task expired or the relay cleaned it up, the node errors out - re-run the Imagine step rather than trying to resurrect a stale task_id. Also worth knowing: because this rides an unofficial MJ relay (the same gray area flagged for the whole pack), uptime and billing are the service's call, and the README warns the api_url can change without notice. When a workflow that worked last week suddenly fails, check that URL before anything else.

    CategoryMidjourneyHub

    Inputs (2)

    NameTypeDefaultDescription
    task_idSTRING
    actionCOMBOU18 options: U1, U2, U3, U4, V1, V2, +2

    Outputs (1)

    NameTypeDescription
    IMAGEIMAGE