Skip to main content

Comfyui

@magistr/comfyuiv2026.08.19.1· 3d agoMODELS
01README

Drive a ComfyUI server over its HTTP API from swamp. Ships three bundled API-format workflow templates — ideogram (Ideogram 4.0, whose prompt is a STRUCTURED JSON CAPTION with per-object bounding boxes [y1,x1,y2,x2] normalized 0-1000), krea (FLUX Krea turbo, plain-text prompt with stackable style LoRAs), and minimax_h3 (MiniMax H3 reference-to-video: a plain-text prompt plus image and/or video references, produces an mp4, with an opt-in speed patcher chain — ModelAttentionBackend/sage/sol-attn/chunk-FF/spectrum) — so you generate without hand-wiring node ids.

One model:

  • instance — connect to a ComfyUI server (default http://127.0.0.1:8188), snapshot it (lookup/sync), inspect a node class (node_info), turn a plain idea into a validated bboxed caption with Claude (generate_caption) or assemble one from explicit boxes (build_caption), generate one image, or generate_batch many (one per seed). generate picks a bundled template, patches caption/seed/resolution (and chains any lora/loras), POSTs /prompt, polls /history, and fetches the image. Omit seed for a random one (recorded in the result).

generate_caption calls the Anthropic Messages API (same request contract as @keeb/anthropic) with the Ideogram-4 magic prompt, and accepts either an Anthropic API key or a Claude Code OAuth token.

02Models1
extensions/models/comfyui.tsv2026.08.19.1

Global Arguments

ArgumentTypeDescription
baseUrlstring
clientId?string
workflowPath?string
outputDirstring
pollIntervalMsnumber
timeoutMsnumber
anthropicApiKey?string
captionModelstring
captionMaxTokensnumber
fn lookup()
Snapshot the ComfyUI server (system_stats) as a `server` resource.
fn sync()
Refresh the ComfyUI server snapshot (identical to lookup).
fn node_info()
Fetch a node class
fn build_caption()
Build and serialize an Ideogram caption, stored as a `caption` resource.
fn generate_caption()
Turn a natural-language idea into a validated Ideogram-4 JSON caption via Claude
fn generate()
Patch a workflow, queue it, fetch the output (image or video), and
fn generate_batch()
Queue a batch of images that share one prompt/LoRA/resolution but vary
fn generate_long()
Build a long video (`totalDuration` s) from `fragmentDuration`-second
fn ref2i()
Style/clothes transfer to a STILL image (minimax_h3): drive the H3

Resources

server— ComfyUI server snapshot (system_stats).
caption— A validated Ideogram-4 structured JSON caption.
node_info— A node class
generation— A completed render: prompt id, image refs, saved paths.
batch— A batch of renders sharing a prompt, one per seed.
long— A long video assembled by continuation: fragment paths + the stitched result.
03Previous Versions5
2026.08.12.13

2026.08.12.13

Adds a MiniMax H3 reference-to-video pipeline as a third bundled template, then builds it out to long-form video, clothes/style transfer and a node-aware speed stack. This ships the work developed as 2026.08.11.1 through 2026.08.12.13; those intermediate versions were never published, so this is one registry release covering the whole arc.

manifest.yaml had been left at 2026.08.12.8 while the model's own version and its upgrades[] chain had moved on to 2026.08.12.13 — the last five bumps never reached the manifest. The manifest now matches the model, which is the source of truth for what the code actually is.

Added

  • minimax_h3 template — plain-text prompt plus one or two references to an mp4, from a bundled API-format graph (workflows/minimax_h3_r2v.api.json) whose node classes the contract suite pins.
  • Video references. buildReferences() injects one loader per reference: LoadImage for stills, LoadVideoGetVideoComponents for video (frames → ref_videos, audio → ref_video_audios). New refVideo/refVideos; local paths upload via /upload/image.
  • generate_long — a totalDuration video built from fragmentDuration (default 5s) clips: slice the reference video into per-fragment windows, render each carrying the previous fragment forward, ffmpeg-stitch the result. Every generate option applies per fragment. New long resource; generate and each fragment now share one renderClip().
  • ref2i — clothes/style transfer onto a still: drives the reference graph with styleImage (garment → <Picture 1>) and targetImage (person → <Picture 2>), renders the shortest clip and saves frame 0 as a PNG. The default caption keeps face, pose and background and replaces only the outfit.
  • Speed patcher chain. chainModelPatchers() splices MODEL→MODEL patchers between the UNETLoader and the sampler; the template declares the registry in recommended order and reads every schema live from /object_info. Applied by default when speed is omitted (measured ~43% faster); speed: [] disables it, an explicit list picks a subset.
  • turbo — the 4-step distillation-LoRA fast path (turboLora + firstBlockCache + sage + sigmaShift at 8 sampler steps rather than 20). Requires the turbo LoRA present in the server's loras/. Measured: a 5s render in 1m29s against 2m31s.
  • upscale — splices SeedVR2 super-resolution between the decoded frames and CreateVideo (upscaleResolution, default 1080; upscaleModel). Errors when the SeedVR2 node is absent.
  • keepRefAudio — carries the reference video's own audio instead of the generated track. Throws when there is no reference video.
  • megapixels (ResolutionSelector output size), unetModel (swap the diffusion checkpoint on generate/generate_long/ref2i) and refImageSize (match|max; max feeds references at 2048px for markedly stronger identity/garment adherence, several times slower).

Changed

  • Speed injection is node-aware. An explicit speed/turbo naming a patcher the server lacks now fails with a clear message instead of a raw ComfyUI missing_node_type 400, while the default stack skips missing patchers so a churning node set cannot break a plain render. Adds ComfyClient.fetchInstalledClasses().
  • collectFiles() collects outputs under any key, so SaveVideo mp4 output is picked up like SaveImage; waitForResult() keys done/errored off it.

Fixed

  • generate_long no longer overwrites its own output: nextFreePath takes the base name when free, else the next _2/_3 sibling, so runs accumulate.
  • Seam jump-cuts between fragments. The continuation carries the previous fragment's last ~0.5s forward as a reference VIDEO rather than a frozen still, so the model sees subject velocity and camera trajectory at the cut (continuationSeconds: 0 restores the still). Fragment boundaries also snap to the lowest-motion frame within seamWindow of nominal, so cuts land on held poses instead of mid-turn, and the continuation caption binds head/face/gaze orientation to <Video 2>.

Added 1, removed 1 models. Removed 1 skills. updated labels

2026.08.02.1

2026.08.02.1

Real-fixes the four latent bugs the adversarial suite characterized in the prior test-backfill release, bumps the model version 2026.07.21.1 -> 2026.08.02.1 with an identity upgrades[] entry (no globalArguments or resource-schema change), and flips the four bug pins in comfyui_adversarial_test.ts from asserting the buggy output to asserting the corrected output.

  • Fix 1 (MED): generate no longer records a seed it never applied. A new appliedSeed (seed !== undefined && seedNodeId !== undefined ? seed : undefined) is what gets patched into the graph AND what gets recorded — an explicit seed with no known seedNodeId/template is now honestly recorded as null instead of misrepresenting the render.
  • Fix 2 (MED): ComfyClient.waitForResult now throws ComfyUI render failed for prompt <id> (status: error) when a history entry reports status_str: "error" AND produced zero images, instead of treating completed: true as unconditional success. An errored render that still produced at least one image is unaffected and still returns normally.
  • Fix 3 (LOW): snapshotServer (backing both lookup and sync) now checks res.ok before res.json(), throwing ComfyUI /system_stats failed: <status> <statusText> on a non-2xx response — instead of a raw unmapped SyntaxError on a non-JSON 500 body, or silently writing comfyuiVersion: undefined on a well-formed-but-empty JSON 500 body.
  • Fix 4 (LOW): saveImages now joins img.subfolder into the saved path (${outputDir}/${subfolder}/${filename}, creating the subfolder directory as needed) instead of dropping it — two images that share a filename but live in different ComfyUI subfolders no longer collide on disk.
  • comfyui_adversarial_test.ts: flipped the four pin: tests (seed-record, errored-render, snapshotServer x2, saveImages subfolder-collision) to assert the corrected behavior, and corrected the suite header, which previously said comfyui.ts was "UNMODIFIED". The multi-image-orphan pin and the apiKey-echo pin are unchanged — they document intentionally unfixed behavior.
  • lib/comfy_client.test.ts: added two waitForResult tests covering both sides of the new errored && images.length === 0 guard — an errored+ imageless render rejects, an errored render with at least one image still resolves.

Prior test-backfill (originally shipped as Unreleased)

Test backfill to the STANDARD.md five-suite quality bar (wave 2c gap-check child of the extension-quality backfill program, ext-quality-test-backfill). No behavior change to this prior release — comfyui.ts, its libs, and the bundled workflow JSON were byte-frozen at the time; the model version stayed 2026.07.21.1.

  • Gap-checked the 8 pre-existing test files by ROLE (not filename) and mapped them into the STANDARD.md suites: methods = base.test.ts + comfyui.test.ts; contract-fixture = lib/comfy_client.test.ts, lib/anthropic.test.ts, lib/caption.test.ts, lib/caption_generated.test.ts, lib/ideogram_prompt.test.ts, lib/workflow_patch.test.ts.
  • Added extensions/models/comfyui_contract_test.ts (contract-fixture gap) — pins the two bundled workflow assets structurally (the UI-vs-API-format gotcha: every node is an object with a string class_type + object inputs, no top-level nodes/links) plus every TEMPLATES node-id/ input-key pin (ideogram 98:24/98:18/37, krea 30:6/30:3/49/30:15/30:22/30:23), plus decode-pins of the six synthetic wire fixtures.
  • Added extensions/models/comfyui_methods_test.ts (methods gap) — sync, node_info, generate over a REAL bundled template (the template-reading path + auto-seed), generate's 400/node_errors surfacing, and generate_caption's missing-apiKey guard.
  • Added extensions/models/comfyui_adversarial_test.ts (adversarial, new) — hostile/malformed ComfyUI responses (invalid JSON, HTML 502, missing prompt_id, /view 404 — all resolving immediately; the sole timeout/hung-server case stays lib-level in comfy_client.test.ts), malformed caption/bbox input, credential-leak assertions across both the standard API-key and Claude Code OAuth-token auth shapes, and a fixtures-secret-scan (sk-ant-api/sk-ant-oat shapes + a high-entropy pattern + a sanity poison test). Also PINNED four found bugs at the time (characterized, not yet fixed — tracked in the LOCAL comfyui-latent-bugs issue-lifecycle model, never filed to the Lab). All four are now FIXED in 2026.08.02.1 above — the pins

Notes trimmed at a line boundary to fit the registry's 4900-byte per-version cap. Full section: https://github.com/umag/swamp-workspace/blob/d850d8e8372d4c0008c9245959a090b37095de7a/comfyui/CHANGELOG.md

2026.07.21.1

Merge pull request #51 from umag/feat/comfyui-krea-loras-batch

feat(comfyui): krea template, style LoRAs, batch, random seed

Modified 1 models. updated labels

2026.07.16.2

Release 2026.07.16.2 — align model versions with manifests

Maintenance release across the @magistr extensions. For most packages this carries no functional change: the only edit is the model's version: field, brought back in line with its manifest version so the published model type version and the package version no longer drift.

Functional changes in this release are limited to:

  • anime-cron: normalizeTitle now strips a ": subtitle" suffix and a trailing parenthesized year before comparison, fixing dedup false-misses where the torrent title carries a subtitle or year that the AniList romaji does not.

  • arckit: first publish. Standalone ArcKit port — a 12-phase architecture governance state machine with 65 bundled templates, driven by a bundled skill.

Also tracks three extensions (kaiten, observability-agent, music-library) that previously existed only as untracked working-tree directories, recovered from stashes.

2026.06.15.1
04Stats
A
100 / 100
Downloads
1
Archive size
114.5 KB
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types (deprecated)1/1earned
  • Dependencies pass trust audit2/2earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License declared1/1earned
  • Verified public repository2/2earned
05Platforms
06Labels