Skip to content

Improve ComfyUI workflow integration - #144

Open
starsaintf wants to merge 6 commits into
jbilcke-hf:mainfrom
starsaintf:improve-comfyui-integration-5
Open

Improve ComfyUI workflow integration#144
starsaintf wants to merge 6 commits into
jbilcke-hf:mainfrom
starsaintf:improve-comfyui-integration-5

Conversation

@starsaintf

Copy link
Copy Markdown

Summary

  • Adds local ComfyUI workflow execution through the native /prompt, /history, upload, and /view APIs.
  • Adds Comfy.icu and ComfyDeploy cloud execution paths for API-format ComfyUI workflows.
  • Adds a bundled workflow catalog, URL import/install flow, and graph preview for ComfyUI workflows.
  • Extends ComfyUI workflow handling across image, video, voice/dialogue, sound, and music categories.

Validation

  • bunx tsc --noEmit -p packages/app/tsconfig.json
  • bun run --cwd packages/app test
  • Real local ComfyUI smoke test against http://127.0.0.1:8188 covering upload, /prompt, /history, /view, and data URI output extraction

Closes #5

@MyTH-zyxeon

Copy link
Copy Markdown

Maintainers/author: thanks for tackling #5 — this is a large, multi-surface PR and there are currently several open ComfyUI PRs (#137/#138/#143/#144). To reduce review+merge risk, it may help to treat one as canonical and ask others to close/supersede.

For this PR specifically:

  1. Could you paste the current failing CI output or gh pr checks summary? PR shows mergeStateStatus=UNSTABLE on my side.
  2. Consider splitting into mergeable slices (smallest value-per-merge first):
    • local ComfyUI image/video run end-to-end
    • cloud providers (Comfy.icu / ComfyDeploy)
    • workflow catalog/import UI + graph preview
    • audio/voice/music category support
  3. Please confirm the minimum acceptance criteria the maintainer wants for the bounty payout (Boss) — e.g. local ComfyUI image+video works vs all media types + community browser.
  4. For local ComfyUI: add a short doc snippet in documentation/comfyui-workflows.md showing required settings + an example workflow + expected output type mapping.
  5. For output extraction: please call out how non-image/video assets are detected (audio/files) and add one small test case if possible.

If you want, I can help draft a maintainer-facing checklist that matches a minimal merge plan (and maps cleanly to Boss bounty expectations).

@starsaintf

Copy link
Copy Markdown
Author

Thanks for the triage notes. I pushed a small follow-up commit here: bf03814.

Current PR/check status from my side:

gh pr checks 144 --repo jbilcke-hf/clapper
no checks reported on the 'improve-comfyui-integration-5' branch

gh pr view currently reports:

{"mergeStateStatus":"UNSTABLE","statusCheckRollup":[]}

Local validation I ran on this branch:

  • bunx tsc --noEmit -p packages/app/tsconfig.json
  • bun run --cwd packages/app test
  • focused ComfyUI client test after the follow-up: src/app/api/resolve/providers/comfyui/client.spec.ts now passes 3/3
  • real local ComfyUI smoke test against http://127.0.0.1:8188, covering upload, /prompt, /history, /view, and data URI output extraction

I also addressed the two concrete doc/test asks:

  • Added a documentation/comfyui-workflows.md local smoke workflow section with required settings, a model-free LoadImage -> SaveImage API workflow, and expected output mappings.
  • Extended output extraction to include ComfyUI files outputs in addition to images, videos, gifs, audio, and audios.
  • Added a small non-image/video extraction test for audio plus file-like outputs.

On scope/splitting: I am happy to split this into smaller PRs if maintainers prefer. Suggested order:

  1. local ComfyUI image/video execution path and output extraction
  2. cloud providers: Comfy.icu and ComfyDeploy
  3. workflow catalog/import UI and graph preview
  4. voice/sound/music category support

For bounty acceptance, I implemented the broad interpretation of #5: local execution, cloud execution, catalog/import/apply, graph preview, and media categories. If the maintainer/Boss wants a smaller minimum acceptance target first, I can trim this PR to the canonical slice and move the remaining work into follow-ups.

@MyTH-zyxeon

Copy link
Copy Markdown

Follow-up review-assist for #5 / PR #144 after the latest author update.

Thanks for the concrete validation notes and the follow-up commit. The added details make this PR much easier to evaluate as a possible canonical #5 landing path.

What now looks materially stronger:

  • Local validation is explicit: bunx tsc --noEmit -p packages/app/tsconfig.json, bun run --cwd packages/app test, and focused ComfyUI client tests.
  • The smoke path is concrete: local ComfyUI at http://127.0.0.1:8188, covering upload, /prompt, /history, /view, and data URI output extraction.
  • documentation/comfyui-workflows.md now documents a model-free LoadImage -> SaveImage workflow and expected output mapping.
  • Output extraction now includes file-like outputs in addition to images/videos/gifs/audio.

Remaining merge/bounty-risk items I would keep visible for maintainers:

  1. PR Improve ComfyUI workflow integration #144 is still mergeStateStatus=UNSTABLE with no reported checks on GitHub, so the local validation commands should probably be pasted into the PR body or a maintainer-run checklist before merge.
  2. Since feat: comprehensive ComfyUI integration for all media types #135/feat: comprehensive ComfyUI integration for all media types #137/Improve ComfyUI Integration - Local & Cloud Support, Workflow Preview, Community Browser #138/Support ComfyUI workflows across media providers #143/Improve ComfyUI workflow integration #144 are all open ComfyUI attempts, maintainers should explicitly choose whether Improve ComfyUI workflow integration #144 is the canonical base, a source of cherry-pickable slices, or a follow-up to another PR.
  3. The first mergeable slice could be local ComfyUI image/video execution + output extraction + docs/tests; cloud providers, catalog/import UI, graph preview, and voice/sound/music support can stay in this PR only if maintainers want the broad interpretation of Improve ComfyUI integration #5.
  4. For Boss payout hygiene, it would help to state whether the bounty acceptance threshold is broad issue closure or an agreed partial slice that materially advances Improve ComfyUI integration #5.

Suggested next maintainer decision:

This keeps the queue moving without adding another duplicate implementation.

@starsaintf

Copy link
Copy Markdown
Author

Maintainers: fork CI now passes on the latest PR head commit 1fcf9f8:

https://github.com/starsaintf/clapper/actions/runs/26874115687

Upstream PR #144 still reports mergeStateStatus=UNSTABLE because the upstream pull_request workflows are currently �ction_required rather than failed. Could you please approve/run the upstream CI and E2E & Unit Tests workflows for this PR?

Thanks.

@catcherintheroad-hub

Copy link
Copy Markdown

I re-tested the focused ComfyUI prompt builder coverage while reviewing this PR and found one small blocker on current main: the spec referenced ComfyUIWorkflowApiGraph, the prompt helper functions, and ClapperComfyUiInputIds without importing them, and the app also imports lodash subpaths without declaring lodash as a runtime dependency.

I opened a small support PR for that here:
#148

Validation on the support PR:
PATH=/opt/homebrew/opt/node@22/bin:$PATH bun run --cwd packages/app test:unit:ci -- src/app/api/resolve/providers/comfyui/createPromptBuilder.spec.ts

Result: 11/11 tests pass.

This does not replace #144; it is just a tiny dependency/test hygiene patch that should make the ComfyUI review path easier and remove one unrelated failure while maintainers decide which #5 implementation becomes canonical.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve ComfyUI integration

3 participants