3. MJ 动作执行 (U/V/Reroll)
Press the Midjourney buttons your workflow forgot
- report
The step that makes the MJ flow feel like MJ. After MJImagineSubmit produces its four-up grid and MJQueryTasks confirms it's done, real Midjourney users click U1–U4 (upscale a tile), V1–V4 (make a variation), or Reroll. That's what this node does - it replays those buttons against a recent task on the Wujiai channel. If you've ever thought "I just want the MJ app's buttons in my workflow," this is exactly that, minus the Discord tab.
The author even ships a frontend touch: the pack's mj_action_refresh.js and wujiai_universal.js extensions put those U/V/Reroll buttons directly on the node panel, so you can click rather than type. The node then submits the chosen action to the channel. Output is a single report STRING with the result of the action.
The inputs that matter
recent_task(required dropdown) - pick from the channel's recent MJ tasks. It's a dropdown populated from history, with placeholder entries like "--- 请选择近期任务 ---". This is your "which grid am I acting on."action(required dropdown, defaultU1) - the actual button:U1–U4,V1–V4, or🔄 Reroll.variation_mode(optional, default 默认) -默认,高变化(high variation), or低变化(low variation). Only relevant for V-actions.task_id_override(optional) - the tooltip is the author's own words: "优先使用此ID覆盖上方选择" (use this ID to override the selection above). When you need to act on a task that isn't in the recent list, paste its ID here.api_key(optional) - falls back to the channel's Wujiai key.
How it fits
The action kicks off another Wujiai job - an upscale or variation is itself a render. So after MJActionSubmit, you loop back through MJQueryTasks and MJGetResult to fetch the new output. The whole loop is: Imagine → Query → Action → Query → Result, and this node is the "act" step. If you've been fighting a single-node MJ pack that hides the button layer, this separation is the feature.
Install & prerequisites
Standard pack install:
cd ComfyUI/custom_nodes
git clone https://github.com/jieg9341-lab/ComfyUI-nkxx
restart (or ComfyUI Manager, "ComfyUI-nkxx"). Auto-installs requests, pandas, openpyxl, yt-dlp, opencv-python, aiohttp on first launch; no models to download. Needs a Wujiai key from wujiai.org, and actions are metered - an upscale or variation is another billed render, so don't spam V-actions while tuning.
Common issues
- "Recent task" list is empty: no completed MJ task on this key's history yet, or you're on a different key than the one that submitted the Imagine. Same-key discipline again.
- Acting on the wrong grid: check
recent_taskbefore running; usetask_id_overrideif you have a specific task ID in mind. - Buttons missing on the panel: the clickable U/V/Reroll UI is a frontend extension - reload the page once; if they're still gone, check that the pack's
web/directory loaded (a stale extension cache is the usual cause). - Trust note: the Wujiai-side node files ship obfuscated. Behavior-only verification, same as the rest of the MJ quartet.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| recent_task | COMBO | 2 options: --- 请选择近期任务 ---, 暂无包含按钮的历史任务 | |
| action | COMBO | U1 | 9 options: U1, U2, U3, U4, V1, V2, +3 |
| variation_modeopt | COMBO | 默认 | 3 options: 默认, 高变化, 低变化 |
| task_id_overrideopt | STRING | 优先使用此ID覆盖上方选择 | |
| api_keyopt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| report | STRING | — |