Skip to content

Add comfyui-studio plugin: zero-dependency ComfyUI 8188 toolkit (4 Skills + 6 preset workflows) - #15

Open
antianqi wants to merge 5 commits into
MiniMax-AI:mainfrom
antianqi:add-comfyui-studio-plugin
Open

Add comfyui-studio plugin: zero-dependency ComfyUI 8188 toolkit (4 Skills + 6 preset workflows)#15
antianqi wants to merge 5 commits into
MiniMax-AI:mainfrom
antianqi:add-comfyui-studio-plugin

Conversation

@antianqi

@antianqi antianqi commented Aug 22, 2026

Copy link
Copy Markdown

What this PR adds

A zero-dependency toolkit for driving a local ComfyUI 8188 server, packaged as a MiniMax Code
Plugin under plugins/antianqi/comfyui-studio/. Two parts in one Plugin:

  • Part A — Natural-language control: submit any ComfyUI workflow JSON, poll the queue,
    download outputs. Two equivalent entry points (Python CLI + stdio MCP server), both
    zero-dependency.
  • Part B — 6 preset workflows, numbered by the user's trigger scenario:
    1. 生图 (generate) — selfie-text-to-image.json
    2. 模仿 (mimic) — selfie-mimicry.json
    3. 改图 (edit) — flux2-klein-image-edit.json
    4. 融合 (fuse) — flux2-klein-image-edit-dual.json
    5. 首帧 (drama first frame) — drama-first-frame.json
    6. 出片 (image to video) — drama-image-to-video.json

Problem it solves

Driving a local ComfyUI server from an agent requires either hand-rolling HTTP boilerplate per
workflow, or adopting a heavyweight MCP server that pulls in 50+ MB of native dependencies and
runs an install hook on first use. The first is tedious; the second is incompatible with the
hosted-Plugin policy ("no native binaries, no installers").

This Plugin does the first without paying the second cost. The same three primitives
(submit_prompt, check_queue, get_image) are exposed through both a tiny Python CLI and a
~200-line stdio MCP server, so the user picks whichever entry point fits their host agent.

What's included

  • Four Skills for agent-driven automation:
    • comfyui-studio — routing layer, reads the user's intent and picks the right sibling
    • comfyui-workflow — submit any workflow, poll queue, download outputs (the basic transport
      every other Skill uses)
    • comfyui-character — scenarios 1, 2, 3, 4 (selfie + mimicry + Flux.2 Klein edits)
    • comfyui-drama — scenarios 5, 6 + the 7-stage short-drama pipeline around them
  • A dependency-free stdio MCP server (server.mjs, ~200 lines, pure Node stdlib) exposing
    three tools: submit_prompt, check_queue, get_image. Mirrors the Python CLI.
  • A dependency-free Python CLI (submit_workflow.py, stdlib only) for hosts that prefer
    scripts over MCP. Handles __PROMPT__ / __TRIGGER__ / __IMAGE1__ / __IMAGE2__ markers
    so the user does not have to rewrite the workflow JSON for every run.
  • Six preset workflow JSONs (see the numbered table above) wired with the marker
    conventions.
  • Complete documentation: README (Part A vs Part B framing, 6-scenario index, model
    boundary), examples/minimal-run.md (5-minute end-to-end walkthrough), per-scenario recipes
    in each Skill's SKILL.md, docs/security-notes.md, docs/troubleshooting.md, plus a
    BETA.md covering the standalone beta test channel.

Model boundary

The Plugin draws a clean line between public generation models and user-supplied LoRAs:

  • Public generation models (checkpoints, VAE, CLIP, ControlNet, video models, vision LLMs)
    are referenced by the actual filenames on disk in the reference ComfyUI install that built
    this Plugin
    . The intent is "this is the model we ran, this is the field you may want to
    edit." The JSON is the source of truth and the user can edit any loader node to point at
    their own file.
  • LoRAs are referenced by generic placeholders (your_face_lora.safetensors,
    your_style_lora.safetensors, character_a_lora.safetensors, character_b_lora.safetensors,
    any_motion_lora.safetensors). LoRAs are user-trained identity assets; the Plugin does not
    bundle or name anyone's private LoRAs. The user edits the LoraLoader*.lora_name field to
    point at their own file.

This boundary keeps the Plugin shareable while letting users adapt the workflows to their own
environment.

Beta test channel

While this PR is open and waiting for review, the standalone single-plugin beta repo is at
antianqi/comfyui-studio, tagged
v0.2.0-beta.1.
The mcode internal beta group can install from there following BETA.md and report issues
back so we can fix them before the official merge. This fork
(MiniMax-Code-Plugins-1) is only kept alive so this PR can be force-pushed; the install
instructions in BETA.md all point at the standalone repo.

Verified

  • All six preset workflow JSONs POST successfully to a real ComfyUI 8188 server (the two
    selfie + the two Klein presets verified end-to-end on the reference install; the two drama
    presets verified at the JSON / submission layer).
  • npm run check reports OK plugin antianqi/comfyui-studio.
  • All four Skills have valid YAML frontmatter and parse as expected.
  • The Python CLI and the stdio MCP server both work on Node 18+ / Python 3.10+.
  • All six workflow JSONs parse cleanly under strict JSON parsers (ConvertFrom-Json /
    JSON.parse / json.loads all OK).

What the Plugin does not do

  • It does not train LoRAs. Training is its own project; this Plugin only consumes a LoRA the
    user already has.
  • It does not bundle or distribute any LoRA, model, face embedding, voice sample, or any other
    identity asset. Every character and voice is user-supplied.
  • It does not install packages, run post-install hooks, or download native binaries.
  • It does not call any cloud service or third-party API.
  • It does not run TTS, edit spreadsheets, burn subtitles, or assemble audio/video — the
    comfyui-drama Skill documents the full 7-stage pipeline but only ships ComfyUI workflow
    templates for the two image-side stages (scenarios 5 and 6); the other stages are user
    pipeline steps that the Plugin deliberately does not assume.

… generation

A zero-dependency toolkit for driving a local ComfyUI 8188 server.

What's included:
- 3 Skills: comfyui-studio (routing), comfyui-workflow (submit/poll/download),
  comfyui-character (LoRA-based consistency patterns)
- A dependency-free stdio MCP server (server.mjs, ~200 lines, pure Node stdlib)
  exposing 3 tools: submit_prompt, check_queue, get_image
- A dependency-free Python CLI (submit_workflow.py) for the same primitives
- 2 reference workflow JSONs (text-to-image, image-to-image)
- Complete docs: README, security-notes, troubleshooting, examples/minimal-run

What it does NOT include (per repo policy):
- Native binaries, model files, LoRAs, or any other identity assets
- Installers or post-install hooks
- Any network destination other than COMFYUI_URL

Validation:
- npm run check passes for this plugin
- Python CLI probes a real ComfyUI 8188 instance
- MCP server starts cleanly via 'node server.mjs'
Part 2 of the Plugin: the preset-workflow layer. Adds four generic workflow
templates and one new Skill that were missing from the first commit.

New preset workflows (all in workflows/, all generic with __PROMPT__/__TRIGGER__
substitution and no private content):
- selfie-text-to-image.json   portrait + face LoRA + ControlNet
- selfie-mimicry.json         i2i with IP-Adapter face pull + face LoRA
- drama-first-frame.json      first frame for short drama, two LoRA slots
- drama-image-to-video.json   image-to-video, distilled LTX class

New / updated Skills:
- comfyui-character (expanded) now covers both the selfie and mimicry presets,
  with the 4-module prompt structure and per-knob tuning tables
- comfyui-drama (new) describes the 7-stage short drama pipeline and explains
  the boundary between what the Plugin ships (stages 4 and 5) and what the user
  runs in their own environment (TTS, Excel, FFmpeg)
- comfyui-studio routing table updated to point to the new presets

Validated:
- npm run check passes for this plugin
- All four new workflow JSONs were POSTed to a real ComfyUI 8188 instance and
  accepted (errors at validation stage are expected: the user must install
  custom nodes such as IPAdapterModelLoader and the specific models; this PR
  ships the structure, not the assets)
@antianqi
antianqi force-pushed the add-comfyui-studio-plugin branch 4 times, most recently from 48b1efb to 81d3b8d Compare August 22, 2026 02:57
… by 6 trigger scenarios

- selfie-text-to-image.json + selfie-mimicry.json: replace real LoRA filenames (goudan_zimage_c1-st8000, MysticXXX-ZIB-v1) with generic placeholders (your_face_lora.safetensors, your_style_lora.safetensors) so the Plugin stays shareable across installs

- drama-image-to-video.json: fix invalid JSON booleans (True/False -> true/false) accidentally introduced in the previous commit; strict JSON parsers now parse it cleanly

- README.md + 3 SKILL.md: restructure the feature surface around 6 numbered trigger scenarios -- 1=生图 (selfie), 2=模仿 (mimicry), 3=改图 (edit), 4=融合 (fuse), 5=首帧 (drama first frame), 6=出片 (image-to-video). Plugin now reads cleanly as Part A (natural-language control) + Part B (6 preset workflows), with a model-boundary section that states the actual rule: models = real filenames on disk, LoRAs = generic placeholders
@antianqi
antianqi force-pushed the add-comfyui-studio-plugin branch from 81d3b8d to 7ddfbe1 Compare August 22, 2026 03:09
@antianqi antianqi changed the title Add comfyui-studio plugin: zero-dependency ComfyUI 8188 toolkit Add comfyui-studio plugin: zero-dependency ComfyUI 8188 toolkit (4 Skills + 6 preset workflows) Aug 22, 2026
- plugin.json: bump version 0.1.0 -> 0.2.0-beta.1; expand description to mention 4 Skills + 6 scenarios

- BETA.md: new file. Documents 3 install options (git clone the fork / download release tarball / browse the plugin folder), 6-scenario test matrix, 3 feedback channels (GitHub issues / Feishu mcode group / PR comments), known-issues section, and versioning policy

- README.md: add a top-of-file beta test banner pointing to BETA.md and the upstream PR, so anyone landing on the plugin via the fork's plugin folder can find the test install instructions
…dio repo

The beta test channel is now a dedicated single-plugin repo at github.com/antianqi/comfyui-studio, not this monorepo fork. Update all install / feedback / version references to point there. The BETA.md keeps a note that this fork exists only so the upstream PR can be force-pushed.

@hetaoBackend hetaoBackend left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review result: do not approve / do not merge yet.

The repository check passes (27 tests), but the runtime and bundled workflows have blocking defects:

  • MCP image corruption: server.mjs:86-90 decodes every response as UTF-8 text, then server.mjs:152-161 reconstructs it as binary. A local mock returned different base64 for bytes containing values >= 0x80. Use a Buffer-preserving HTTP path.
  • Python auth redirect leak: submit_workflow.py:41-78 uses urllib.request.urlopen, which follows redirects while retaining the bearer header. A redirected endpoint can receive COMFYUI_API_TOKEN, contradicting docs/security-notes.md:18-23. Disable redirects or enforce same-origin and never forward Authorization across origins.
  • The docs promise __TRIGGER__, __IMAGE1__, __IMAGE2__ and --trigger, --filename, --filename2 substitutions (README.md:77-84, skills/comfyui-character/SKILL.md:118-129), but the CLI only implements exact __PROMPT__ replacement (submit_workflow.py:81-103,219-227).
  • Scenario 3 puts its image marker on an unused node while the connected loader is blank; scenario 4 has connected blank loaders and no image markers (workflows/flux2-klein-image-edit*.json).
  • Output paths are not constrained: submit_workflow.py:138-145,195-205 joins server/user filenames directly, so absolute or ../ names can escape --output-dir.

Please fix binary handling, redirect/token handling, marker/flag implementation and workflow wiring, and enforce output-directory containment before requesting another review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants