[PR #8] [MERGED] Add four workflow templates to the GPU regression corpus #8

Closed
opened 2026-10-31 22:06:12 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Comfy-Org/comfyci-runpod-worker/pull/8
Author: @christian-byrne
Created: 10/18/2026
Status: ✅ Merged
Merged: 10/18/2026
Merged by: @marawan206

Base: main ← Head: feat/template-corpus-import


📝 Commits (2)

  • 0f964c7 Add four workflow templates to the GPU regression corpus
  • 93fb917 Honour subgraph instance mode, and key model directories by loader

📊 Changes

11 files changed (+2451 additions, -34 deletions)

View changed files

📝 README.md (+61 -26)
📝 manifest/workflows.json (+145 -6)
➕ manifest/workflows/mage_flow_t2i_int8_api.json (+105 -0)
➕ manifest/workflows/pixeldit_t2i_api.json (+115 -0)
➕ manifest/workflows/qwen_image_2_1_t2i_api.json (+118 -0)
➕ manifest/workflows/qwen_image_2_1_turbo_t2i_api.json (+152 -0)
➕ scripts/import_template.py (+306 -0)
➕ scripts/template_api_export.py (+595 -0)
➕ scripts/tests/test_import_template.py (+222 -0)
📝 scripts/tests/test_manifest_lint.py (+12 -2)
➕ scripts/tests/test_template_api_export.py (+620 -0)

📄 Description

Why

From #eng-general on the stable-release bar: "A template stops working then that is considered a ship blocker", and "We may also need to add recent templates to [the GPU tests] as the corpus has not been supplemented in many months."

Today the corpus runs SDXL, FLUX.1-dev and three staged entries. The templates users actually open are mostly uncovered, so a template breaking is caught by a person noticing during the pre-stable soak, not by CI.

What this adds

Four open-source text-to-image templates — the most-used ones this corpus can run deterministically and that no entry covers yet:

Workflow Template Why Extra download
qwen_image_2_1_t2i image_qwen_image_2_1_t2i 2nd most-used template of any kind 0 GB — all three models are already synced for qwen_image_2_1_edit
qwen_image_2_1_turbo_t2i image_qwen_image_2_1_turbo_t2i newest open-source t2i template +7.3 GB (shares the text encoder and VAE above)
mage_flow_t2i_int8 image_mage_flow_t2i_int8 Mage-Flow on the int8_convrot path +13.4 GB
pixeldit_t2i image_pixeldit_t2i PixelDiT with a pixel-space VAE (no VAE weights at all) +7.8 GB

≈28.5 GB of new weights, all from Comfy-Org Hugging Face repos with published sha256s.

All four land "enabled": false, per the README's process — goldens next, then a follow-up flips them on.

Why there is tooling in here

Templates ship as UI graphs (subgraphs, promoted widgets, switches); a run submits the flat API format. Adding one meant hand-editing exported JSON, which is the reason the corpus went stale.

scripts/import_template.py does that conversion offline from an /object_info dump — flattens subgraphs, applies the instance's promoted widget values, maps widgets_values onto named inputs, resolves a constant switch to the branch it selects (so the unused branch's models never have to be synced), drops preview nodes, normalises the output to a SaveImage PNG named after the workflow id, and fills models from the download links in the template's own note.

It refuses rather than guess. A node whose widget layout lives on the instance raises, instead of emitting a prompt with every value shifted by one — which the server would accept.

Verification

Two independent checks, because a mis-mapped widget produces a valid prompt that quietly renders the wrong image:

  1. Against the frontend's own exports. The templates repo's benchmarks/ directory holds API exports that ComfyUI's Export (API) produced. Of the ten this importer can convert, it reproduces eight byte for byte (including 23- and 31-node graphs); the other two differ only in widget values that were edited after the export was taken — identical node sets, identical link topology.
  2. Against a real server. Each of the four workflows here was POSTed to /prompt on a local ComfyUI with its models present. All four validate clean, which is what proves no node, input name, widget value or link was lost in conversion.

scripts/tests/test_template_api_export.py and test_import_template.py pin each conversion rule individually (37 new tests). python -m pytest scripts/tests -q: 198 passed.

One lint change

BUILTIN_FILES in the manifest lint gained "pixel_space". nodes.VAELoader appends it to its combo unconditionally for pixel-space models, and there is no file behind it, so the volume has nothing to sync. The hook was already there for exactly this case.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Comfy-Org/comfyci-runpod-worker/pull/8 **Author:** [@christian-byrne](https://github.com/christian-byrne) **Created:** 10/18/2026 **Status:** ✅ Merged **Merged:** 10/18/2026 **Merged by:** [@marawan206](https://github.com/marawan206) **Base:** `main` ← **Head:** `feat/template-corpus-import` --- ### 📝 Commits (2) - [`0f964c7`](https://github.com/Comfy-Org/comfyci-runpod-worker/commit/0f964c79cb2bcd10084629fa22c9b0a4f6003c3a) Add four workflow templates to the GPU regression corpus - [`93fb917`](https://github.com/Comfy-Org/comfyci-runpod-worker/commit/93fb917fbd8c50f69d5d85ad97ef7bd677b71be4) Honour subgraph instance mode, and key model directories by loader ### 📊 Changes **11 files changed** (+2451 additions, -34 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+61 -26) 📝 `manifest/workflows.json` (+145 -6) ➕ `manifest/workflows/mage_flow_t2i_int8_api.json` (+105 -0) ➕ `manifest/workflows/pixeldit_t2i_api.json` (+115 -0) ➕ `manifest/workflows/qwen_image_2_1_t2i_api.json` (+118 -0) ➕ `manifest/workflows/qwen_image_2_1_turbo_t2i_api.json` (+152 -0) ➕ `scripts/import_template.py` (+306 -0) ➕ `scripts/template_api_export.py` (+595 -0) ➕ `scripts/tests/test_import_template.py` (+222 -0) 📝 `scripts/tests/test_manifest_lint.py` (+12 -2) ➕ `scripts/tests/test_template_api_export.py` (+620 -0) </details> ### 📄 Description ## Why From [#eng-general on the stable-release bar](https://comfy-organization.slack.com/archives/C0AF9QYF59T/p1792186651013369): *"A template stops working then that is considered a ship blocker"*, and *"We may also need to add recent templates to [the GPU tests] as the corpus has not been supplemented in many months."* Today the corpus runs SDXL, FLUX.1-dev and three staged entries. The templates users actually open are mostly uncovered, so a template breaking is caught by a person noticing during the pre-stable soak, not by CI. ## What this adds Four open-source text-to-image templates — the most-used ones this corpus can run deterministically and that no entry covers yet: | Workflow | Template | Why | Extra download | |---|---|---|---| | `qwen_image_2_1_t2i` | `image_qwen_image_2_1_t2i` | 2nd most-used template of any kind | **0 GB** — all three models are already synced for `qwen_image_2_1_edit` | | `qwen_image_2_1_turbo_t2i` | `image_qwen_image_2_1_turbo_t2i` | newest open-source t2i template | +7.3 GB (shares the text encoder and VAE above) | | `mage_flow_t2i_int8` | `image_mage_flow_t2i_int8` | Mage-Flow on the `int8_convrot` path | +13.4 GB | | `pixeldit_t2i` | `image_pixeldit_t2i` | PixelDiT with a pixel-space VAE (no VAE weights at all) | +7.8 GB | ≈28.5 GB of new weights, all from Comfy-Org Hugging Face repos with published sha256s. All four land `"enabled": false`, per the README's process — goldens next, then a follow-up flips them on. ## Why there is tooling in here Templates ship as UI graphs (subgraphs, promoted widgets, switches); a run submits the flat API format. Adding one meant hand-editing exported JSON, which is the reason the corpus went stale. `scripts/import_template.py` does that conversion offline from an `/object_info` dump — flattens subgraphs, applies the instance's promoted widget values, maps `widgets_values` onto named inputs, resolves a constant switch to the branch it selects (so the unused branch's models never have to be synced), drops preview nodes, normalises the output to a `SaveImage` PNG named after the workflow id, and fills `models` from the download links in the template's own note. It refuses rather than guess. A node whose widget layout lives on the instance raises, instead of emitting a prompt with every value shifted by one — which the server would accept. ## Verification Two independent checks, because a mis-mapped widget produces a *valid* prompt that quietly renders the wrong image: 1. **Against the frontend's own exports.** The templates repo's `benchmarks/` directory holds API exports that ComfyUI's Export (API) produced. Of the ten this importer can convert, it reproduces **eight byte for byte** (including 23- and 31-node graphs); the other two differ only in widget values that were edited after the export was taken — identical node sets, identical link topology. 2. **Against a real server.** Each of the four workflows here was POSTed to `/prompt` on a local ComfyUI with its models present. All four validate clean, which is what proves no node, input name, widget value or link was lost in conversion. `scripts/tests/test_template_api_export.py` and `test_import_template.py` pin each conversion rule individually (37 new tests). `python -m pytest scripts/tests -q`: **198 passed**. ## One lint change `BUILTIN_FILES` in the manifest lint gained `"pixel_space"`. `nodes.VAELoader` appends it to its combo unconditionally for pixel-space models, and there is no file behind it, so the volume has nothing to sync. The hook was already there for exactly this case. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 22:06:12 +00:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Comfy-Org/comfyci-runpod-worker#8
No description provided.