runpod-comfyui-models
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseRepair a ComfyUI workflow for RunpodDirect
修复适用于RunpodDirect的ComfyUI工作流
Return a new UI workflow JSON containing trustworthy records that
ComfyUI-RunpodDirect can consume — never substitute a plausible model merely to make the
graph queue. Never edit, replace, or overwrite the supplied JSON or PNG. For every
recoverable UI workflow, hand off exactly one new — even
when resolution is incomplete, ambiguous, gated, or interrupted.
properties.models<workflow-stem>.repaired.json返回包含可靠记录的新UI工作流JSON文件,供ComfyUI-RunpodDirect使用——切勿仅为了让图队列运行而替换看似合理的模型。绝不编辑、替换或覆盖提供的JSON或PNG文件。对于每个可恢复的UI工作流,仅交付一个新的文件——即使解析不完整、存在歧义、受权限限制或被中断,也需如此。
properties.models<workflow-stem>.repaired.jsonTerms — workflow vs prompt vs metadata record
术语定义——工作流、提示词与元数据记录
| Term | What it is | Role here |
|---|---|---|
| UI workflow JSON | The graph the ComfyUI frontend exports/imports: nodes, links, widget values, | the only JSON this skill annotates |
API | The execution format POSTed to | inventory evidence only — never annotate it |
| A loader node's model metadata entry ( | what a repair adds or fixes |
Annotation targets the UI format only; the API prompt has no portable model-metadata
contract.
| 术语 | 定义 | 在此处的作用 |
|---|---|---|
| UI工作流JSON | ComfyUI前端导出/导入的图谱:节点、链接、组件值、 | 此技能仅标注该格式的JSON |
API | 提交至 | 仅作为清点依据——绝不标注该格式 |
| 加载器节点的模型元数据条目( | 修复时需要添加或修正的内容 |
仅针对UI格式进行标注;API提示词不存在可移植的模型元数据约定。
Intake
接收流程
- No artifact yet → ask exactly once: “Please attach the workflow JSON or the original ComfyUI output PNG.” (Screenshots and re-encoded images usually lose the workflow.)
- Artifact present → no further intake questions: extract when needed, inventory, resolve, write the repaired copy, return it.
- No recoverable UI workflow (API-only JSON, stripped PNG) → that is the single blocker; request the original UI workflow or PNG.
- 未提交工件→仅询问一次:“请附上工作流JSON文件或原始ComfyUI输出PNG文件。”(截图和重新编码的图片通常会丢失工作流信息。)
- 已提交工件→无需进一步询问:按需提取、清点、解析、生成修复后的副本并返回。
- 无可恢复的UI工作流(仅API格式JSON、已剥离工作流的PNG)→这是唯一的障碍;请用户提供原始UI工作流或PNG文件。
Decide the path
选择处理路径
| Observed state | Action |
|---|---|
| Every model requirement has complete metadata with no reported issues | Preserve its content unchanged, write the one new final JSON, and report that no records were added. Verify or harden only when explicitly requested or when a live failure provides evidence of a problem. |
| Exact filename but no trustworthy URL | Inventory node context, then resolve candidates from original template sources, ComfyUI-Manager, Hugging Face, or Civitai. |
| Generic filename or several credible matches | Do not apply ambiguous metadata or download. Publish the partial workflow, report its path, then show the candidates and ask the user to choose. |
| Gated or license-restricted artifact | Publish the partial workflow first, then stop before authentication/download until access and license acceptance are confirmed. |
| RunpodDirect routes unavailable | Produce the repaired workflow; keep its working manifest temporary and recommend or diagnose RunpodDirect only when the environment warrants it. |
| 观测状态 | 操作 |
|---|---|
| 所有模型需求均包含完整元数据且无问题反馈 | 保持内容不变,生成一个新的最终JSON文件,并告知未添加任何记录。仅在明确要求或实际运行失败提供问题证据时,才进行验证或强化处理。 |
| 文件名准确但无可靠URL | 清点节点上下文,然后从原始模板源、ComfyUI-Manager、Hugging Face或Civitai中匹配候选模型。 |
| 文件名通用或存在多个可信匹配项 | 切勿添加歧义元数据或下载模型。先发布部分修复的工作流,说明处理进度,然后展示候选模型并请用户选择。 |
| 工件受权限或许可证限制 | 先发布部分修复的工作流,然后在确认用户获得访问权限并接受许可证之前,停止认证/下载操作。 |
| RunpodDirect路由不可用 | 生成修复后的工作流;临时保留可用清单,仅当环境需要时才推荐或诊断RunpodDirect。 |
The references
参考文档
| Reference | The one question it answers |
|---|---|
| reference/resolution.md | Which exact artifact is this model? Evidence, source order, confidence policy. |
| reference/metadata.md | How is approved metadata written into the workflow? Patch rules, unsafe-URL handling, the exact handoff lines. |
| reference/runpoddirect.md | Is the live extension there, and how is it driven safely? Feature detection, download authorization, URL/redirect/secret safety. |
| 参考文档 | 解答的核心问题 |
|---|---|
| reference/resolution.md | 该模型对应的具体工件是什么?依据、来源优先级、可信度规则。 |
| reference/metadata.md | 如何将已核准的元数据写入工作流?补丁规则、不安全URL处理、交付格式规范。 |
| reference/runpoddirect.md | 实时扩展是否存在,以及如何安全调用?功能检测、下载授权、URL/重定向/密钥安全。 |
Low-friction contract
低摩擦约定
- inspect / check → read-only work.
- find / repair / fix → also write the new repaired copy.
- download / make it work on this Pod → also download verified public unchanged tuples.
- run / test end to end → plus one controlled smoke test.
Never reconfirm a step the opening intent already covered. Ask once, and only for a
material decision: ambiguity, gated access or a license, an install or restart, a
cost/storage choice, or an action beyond the opening request. If no decision remains,
finish the authorized work and report once — an optional next step is not a question.
- inspect / check → 仅执行只读操作。
- find / repair / fix → 同时生成新的修复副本。
- download / make it work on this Pod → 同时下载已验证的公开未修改模型元组。
- run / test end to end → 额外执行一次受控冒烟测试。
无需重新确认初始请求已涵盖的步骤。仅在需要关键决策时询问一次:如存在歧义、受权限或许可证限制、需要安装或重启、涉及成本/存储选择,或操作超出初始请求范围。若无需决策,则完成已授权的工作并仅汇报一次——可选的下一步操作无需询问。
Workflow
工作流步骤
- Extract (PNG input only): pulls the embedded UI
python3 -B extract_png_workflow.pyfrom a ComfyUI output PNG into the task's temporary directory.workflow - Inventory: lists every loader selection, subgraphs included — evidence, never an identity decision.
python3 -B inventory_workflow_models.py - Resolve each identity per reference/resolution.md,
stopping at the first publisher artifact; keep the review manifest temporary.
verified - Apply: writes the new workflow every time, even when nothing could be resolved; patch rules, unsafe-URL handling, and the publish contract live in reference/metadata.md.
python3 -B apply_model_metadata.py --allow-unresolved - Live checks (only within the request's scope): one batched read-only probe of the
pod's RunpodDirect routes — is fine, batched rather than a visible sequence — then downloads only as authorized, per reference/runpoddirect.md.
curl
Consult only after a usage error. Working state (extracted JSON, inventory,
manifest) lives in one task-specific temporary directory, deleted after the repaired
JSON validates; the repaired JSON is the only persistent artifact. Hand off in plain
language — the exact lines are in reference/metadata.md.
--help- 提取(仅针对PNG输入):从ComfyUI输出PNG中提取嵌入的UI
python3 -B extract_png_workflow.py,保存至任务临时目录。workflow - 清点:列出所有加载器选项,包括子图谱——仅作为依据,不做身份判定。
python3 -B inventory_workflow_models.py - 解析每个模型身份,遵循reference/resolution.md,找到第一个发布者工件时停止;临时保留审核清单。
verified - 应用:每次都会生成新的工作流,即使无法解析任何内容;补丁规则、不安全URL处理和发布约定详见reference/metadata.md。
python3 -B apply_model_metadata.py --allow-unresolved - 实时检查(仅在请求范围内):对Pod的RunpodDirect路由执行一次批量只读探测——使用即可,采用批量方式而非可见的序列操作——然后仅在获得授权时进行下载,遵循reference/runpoddirect.md。
curl
仅在出现使用错误时查看。工作状态(提取的JSON、清点结果、清单)存储在特定任务的临时目录中,修复后的JSON验证通过后即删除;修复后的JSON是唯一持久化的工件。使用简洁语言交付——具体表述详见reference/metadata.md。
--helpRouting onward
任务转导
| The task is actually… | Send it to |
|---|---|
| Provision a pod for the workflow | golden path 02 (index: golden paths), then runpod-mcp or runpodctl |
| Model repo and file already known exactly | |
| A template pod won't boot, or models are missing on a template pod | |
| Install or understand RunpodDirect itself | reference/runpoddirect.md |
| 实际任务类型 | 转至 |
|---|---|
| 为工作流配置Pod | golden path 02(索引:golden paths),然后使用runpod-mcp或runpodctl |
| 模型仓库和文件已明确知晓 | |
| 模板Pod无法启动,或模板Pod上缺失模型 | |
| 安装或了解RunpodDirect本身 | reference/runpoddirect.md |