Comfyui
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),generateone image, orgenerate_batchmany (one per seed).generatepicks a bundledtemplate, patches caption/seed/resolution (and chains anylora/loras), POSTs /prompt, polls /history, and fetches the image. Omitseedfor 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.
Global Arguments
| Argument | Type | Description |
|---|---|---|
| baseUrl | string | |
| clientId? | string | |
| workflowPath? | string | |
| outputDir | string | |
| pollIntervalMs | number | |
| timeoutMs | number | |
| anthropicApiKey? | string | |
| captionModel | string | |
| captionMaxTokens | number |
Resources
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_h3template — 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:LoadImagefor stills,LoadVideo→GetVideoComponentsfor video (frames →ref_videos, audio →ref_video_audios). NewrefVideo/refVideos; local paths upload via/upload/image. generate_long— atotalDurationvideo built fromfragmentDuration(default 5s) clips: slice the reference video into per-fragment windows, render each carrying the previous fragment forward, ffmpeg-stitch the result. Everygenerateoption applies per fragment. Newlongresource;generateand each fragment now share onerenderClip().ref2i— clothes/style transfer onto a still: drives the reference graph withstyleImage(garment →<Picture 1>) andtargetImage(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 theUNETLoaderand the sampler; the template declares the registry in recommended order and reads every schema live from/object_info. Applied by default whenspeedis 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'sloras/. Measured: a 5s render in 1m29s against 2m31s.upscale— splices SeedVR2 super-resolution between the decoded frames andCreateVideo(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) andrefImageSize(match|max;maxfeeds references at 2048px for markedly stronger identity/garment adherence, several times slower).
Changed
- Speed injection is node-aware. An explicit
speed/turbonaming a patcher the server lacks now fails with a clear message instead of a raw ComfyUImissing_node_type400, while the default stack skips missing patchers so a churning node set cannot break a plain render. AddsComfyClient.fetchInstalledClasses(). collectFiles()collects outputs under any key, soSaveVideomp4 output is picked up likeSaveImage;waitForResult()keys done/errored off it.
Fixed
generate_longno longer overwrites its own output:nextFreePathtakes the base name when free, else the next_2/_3sibling, 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: 0restores the still). Fragment boundaries also snap to the lowest-motion frame withinseamWindowof 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
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):
generateno longer records a seed it never applied. A newappliedSeed(seed !== undefined && seedNodeId !== undefined ? seed : undefined) is what gets patched into the graph AND what gets recorded — an explicitseedwith no knownseedNodeId/templateis now honestly recorded asnullinstead of misrepresenting the render. - Fix 2 (MED):
ComfyClient.waitForResultnow throwsComfyUI render failed for prompt <id> (status: error)when a history entry reportsstatus_str: "error"AND produced zero images, instead of treatingcompleted: trueas unconditional success. An errored render that still produced at least one image is unaffected and still returns normally. - Fix 3 (LOW):
snapshotServer(backing bothlookupandsync) now checksres.okbeforeres.json(), throwingComfyUI /system_stats failed: <status> <statusText>on a non-2xx response — instead of a raw unmappedSyntaxErroron a non-JSON 500 body, or silently writingcomfyuiVersion: undefinedon a well-formed-but-empty JSON 500 body. - Fix 4 (LOW):
saveImagesnow joinsimg.subfolderinto 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 fourpin:tests (seed-record, errored-render,snapshotServerx2,saveImagessubfolder-collision) to assert the corrected behavior, and corrected the suite header, which previously saidcomfyui.tswas "UNMODIFIED". The multi-image-orphan pin and the apiKey-echo pin are unchanged — they document intentionally unfixed behavior.lib/comfy_client.test.ts: added twowaitForResulttests covering both sides of the newerrored && images.length === 0guard — 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 stringclass_type+ objectinputs, no top-levelnodes/links) plus everyTEMPLATESnode-id/ input-key pin (ideogram98:24/98:18/37,krea30: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,generateover a REAL bundled template (the template-reading path + auto-seed),generate's 400/node_errorssurfacing, andgenerate_caption's missing-apiKeyguard. - Added
extensions/models/comfyui_adversarial_test.ts(adversarial, new) — hostile/malformed ComfyUI responses (invalid JSON, HTML 502, missingprompt_id,/view404 — all resolving immediately; the sole timeout/hung-server case stays lib-level incomfy_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-oatshapes + a high-entropy pattern + a sanity poison test). Also PINNED four found bugs at the time (characterized, not yet fixed — tracked in the LOCALcomfyui-latent-bugsissue-lifecycle model, never filed to the Lab). All four are now FIXED in2026.08.02.1above — 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
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
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.
- 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