comfyui-export
Export an AI-Video-Producer pipeline to ComfyUI workflow JSON — produce a workflow the user can load in ComfyUI to reproduce (or approximate) a hosted-API pipeline locally. Best-effort: maps fal/replicate model calls to equivalent ComfyUI checkpoints/LoRAs/samplers and flags stages that have no native ComfyUI equivalent. Use when the user wants to take a pipeline that's been working via APIs and bring it onto local hardware (cost reduction, offline work, fine-grained control).
- License 许可
- MIT
- 最近更新
- 2026-11-10
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- comfyui-export
- description
- Export an AI-Video-Producer pipeline to ComfyUI workflow JSON — produce a workflow the user can load in ComfyUI to reproduce (or approximate) a hosted-API pipeline locally. Best-effort: maps fal/replicate model calls to equivalent ComfyUI checkpoints/LoRAs/samplers and flags stages that have no native ComfyUI equivalent. Use when the user wants to take a pipeline that's been working via APIs and bring it onto local hardware (cost reduction, offline work, fine-grained control).
03 SKILL.md 正文
Pipeline → ComfyUI export
Inputs
- A pipeline directory
pipelines/<name>/with a completeSPEC.mdand stage files. - Target ComfyUI version assumption (default: current — flag if user hasn't updated recently).
- Optional: a checkpoint catalogue (
pipelines/_shared/checkpoints.mdor similar) so you can pick from models the user already has locally.
Mapping
| Pipeline stage | ComfyUI nodes |
|---|---|
| Text-to-image (Flux) | UNETLoader (flux), DualCLIPLoader, CLIPTextEncode ×2, KSampler, VAEDecode, SaveImage |
| Text-to-image (SDXL) | CheckpointLoaderSimple, CLIPTextEncode ×2, KSampler, VAEDecode, SaveImage |
| Image-to-video (SVD) | ImageOnlyCheckpointLoader, SVD_img2vid_Conditioning, KSampler, VAEDecode, VHS_VideoCombine |
| Image-to-video (Wan / Hunyuan) | corresponding loader + sampler + VHS combine |
| Upscale (Real-ESRGAN, 4x-UltraSharp) | UpscaleModelLoader, ImageUpscaleWithModel |
| Frame interpolation (RIFE / FILM) | RIFE VFI from ComfyUI-Frame-Interpolation |
| ControlNet | ControlNetLoader, ControlNetApply |
| LoRA | LoraLoader chained before sampler |
For stages that have no native equivalent (most lip-sync APIs, Runway Gen-3, Kling, Hailuo, Sora, Veo, ElevenLabs) — emit a placeholder Note node with the original API call documented, and tell the user this stage will still need to run via API even after the local move.
Steps
- Read
SPEC.mdand eachstages/NN-*.md. - For each stage, look up the mapping. Use the local checkpoint catalogue if provided to pin specific filenames; otherwise emit
<choose checkpoint>placeholders the user must fill. - Build the workflow as API-format JSON (flat
{node_id: {class_type, inputs}}). Sequential numeric IDs starting from1. Wireinputsreferences as[source_id, output_index]pairs. - Set sampler params from the stage definitions (steps, cfg, sampler_name, scheduler, seed). API format has no "random" seed:
seedmust be an integer from 0 to 2^64−1, and-1fails validation. If the stage gives no seed, generate one (e.g.python3 -c 'import secrets; print(secrets.randbelow(2**32))'), write it into the workflow and record it inmanifest-export.mdso the run can be reproduced. Randomise-per-run is the UI'scontrol_after_generatewidget, which API format doesn't carry. - Write outputs:
pipelines/<name>/comfy/workflow-export.json— the API-format workflow.pipelines/<name>/comfy/manifest-export.md— checkpoints, LoRAs, custom nodes the user needs (withComfyUI-Managerinstall names where possible).- Update
SPEC.mdwith a "Local execution" section pointing at the export.
Discipline
- Be honest about gaps. If three of five stages map cleanly and two are API-only, say so on the first line of
manifest-export.md. Don't pretend a full local equivalent exists. - Don't invent ComfyUI nodes that don't exist. Verify class names against ComfyUI core + the relevant custom-node packs.
- Where a hosted model's quality is hard to match locally (Sora, Veo, Kling), explicitly say "no comparable local model — closest approximation is X but quality drop is significant".
- Keep the workflow JSON minimal — only the nodes that are part of the pipeline. No stray reroute nodes or notes (other than the gap-flag note for API-only stages).
04 同仓库更多 Skills
no-description
暂无简介
good-skill
Fixture skill that satisfies every rule.
broken-link
Links to a reference file that does not exist.
Bad_Name
Name violates the kebab-case rule and does not match the directory.
skill-authoring
Write, review, and validate portable agent skills in SKILL.md format. Use when creating a new skill, editing an existing one, or asked whether a skill follows the Agent Skills spec.
weigh-bags
Record scale readings for each bag — empty (tare), outbound, current, final — and reconcile them against the itemised inventory to find unaccounted weight. Use when the user gives a bag weight, says how heavy something is, weighs their luggage, or asks how close to the limit they are. Appends to bags.yaml and runs scripts/reconcile.py.