blueprints/ is a hand-maintained duplicate of Comfy-Org/workflow_templates with no sync or drift detection
- Dominant language
- Python
- Stars
- 133k
- Forks
- 15.7k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 158
Description
## Summary
`blueprints/Image to Layers(Qwen-Image-Layered).json` — and every other file in this repo's `blueprints/` directory — exists as an independent, hand-maintained duplicate of the same file in `Comfy-Org/workflow_templates`. Nothing keeps the two copies in sync, and nothing detects when they diverge.
I hit this while fixing a real bug in that blueprint (https://github.com/Comfy-Org/ComfyUI/pull/15364 and https://github.com/Comfy-Org/workflow_templates/pull/1092). The fix had to be applied twice, in two repos, with no mechanism to guarantee both landed.
## The three copies
All three are currently byte-identical (`md5 74c6b496306fcc8156116095d8b26e84`), which hides the problem:
1. `Comfy-Org/ComfyUI` → `blueprints/Image to Layers(Qwen-Image-Layered).json`
2. `Comfy-Org/workflow_templates` → `blueprints/image_to_layers_qwen_image_layered.json`
3. `Comfy-Org/workflow_templates` → `packages/blueprints/src/comfyui_subgraph_blueprints/blueprints/image_to_layers_qwen_image_layered.json`
Copies 2 and 3 are fine — 3 is generated by `scripts/sync/sync_blueprints.py` and hard-gated by the `validate` job in `workflow_templates`' `.github/workflows/validate-blueprints.yml:65-73`, which re-runs the script and fails on any diff. They genuinely cannot drift.
Copy 1 is the problem.
## Why it can silently diverge
- **No automation.** There is no workflow, bot, script or CI check in either repo that compares them. `grep -rn "subgraph_blueprints" .` across this repo returns zero hits. `workflow_templates`' `scripts/blueprints/import_blueprints.py --source` copies from an arbitrary local directory — it has no knowledge of this repo, no git remote, no clone — and is manual and opt-in.
- **No CODEOWNERS entry** for `blueprints/` here, and `pyproject.toml` does not package the directory.
- **Human sync only.** `git log --oneline -- blueprints/` shows 16 commits, all ordinary hand-authored feature PRs. `workflow_templates` had this blueprint first (2026-01-27); this repo got its copy ~3 months later (2026-04-26) via a hand-made "Add new ComfyUI blueprints" PR. They have stayed identical because the same person has been driving both sides, not because anything enforces it.
## Why the pip package is not the bridge
This is the part I found genuinely surprising, and it is why "just rely on the package" is not an available answer:
- At runtime this repo loads blueprints **only** from its own git-tracked directory. `app/subgraph_manager.py:98` globs `/blueprints/*.json` — no `importlib.resources`, no `folder_paths` indirection, no site-packages lookup, no fallback. `get_all_subgraphs` merges just custom-node subgraphs and that directory.
- `requirements.txt:2` pins `comfyui-workflow-templates==0.11.31`, but that meta package's dependency list does **not** include `comfyui-subgraph-blueprints`. Blueprints ship in that separate distribution (`packages/blueprints/pyproject.toml`, currently `0.0.10`), which nothing here depends on.
- So `pip install -r requirements.txt` installs the blueprint *manifest metadata* (`blueprints_manifest.json`, which does list the blueprint) but **not one blueprint JSON asset**. `packages/core/.../loader.py:32-34` maps the `"blueprints"` bundle to a package that is not importable in a stock ComfyUI install.
Net effect: fixing a blueprint in `workflow_templates` has **zero** effect on a running ComfyUI, and fixing it here has zero effect on PyPI/cloud consumers. Both must be patched every time, forever, by hand.
## Suggested resolutions
Roughly in increasing order of effort:
1. **Detect divergence.** A scheduled or PR-triggered CI job that diffs this repo's `blueprints/` against `workflow_templates`' `blueprints/` (accounting for the filename transform — `Image to Layers(Qwen-Image-Layered).json` → `image_to_layers_qwen_image_layered.json`) and fails or opens an issue. Cheapest thing that converts a silent failure into a loud one.
2. **Declare one authoritative and automate the copy.** Nominate `workflow_templates/blueprints/` as the source of record and have a bot open a sync PR here whenever it changes — the same shape as the existing `comfyui-workflow-templates` version bumps, which are also hand-edited today.
3. **Actually consume the package.** Add `comfyui-subgraph-blueprints` to the `comfyui-workflow-templates` meta package (or directly to `requirements.txt`) and teach `app/subgraph_manager.py` to read from it, keeping the git-tracked directory as an override. This deletes the duplication rather than policing it, but it is the largest change and affects packaging.
Happy to implement whichever direction is preferred.
Contributor guide
Research direction
Start by reading app/subgraph_manager.py:98 and the referenced blueprints paths to understand the runtime source, then inspect workflow_templates' scripts/sync/sync_blueprints.py and .github/workflows/validate-blueprints.yml:65-73. Compare the three suggested resolutions and confirm which one maintainers choose; done means the selected approach prevents or exposes divergence without relying on manual updates.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, python
- Domain
- build-system, ci-cd, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100