mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #3804] Feature: local ComfyUI as a video generation source (WAN 2.2 etc.) #2053
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#2053
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kh0p on GitHub (Jul 19, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3804
Originally assigned to: @SpicyMarinara on GitHub.
Motivation
video_generationcurrently supports only cloud services (Google AI Studio, xAI, OpenRouter, Seedance). Local video models — WAN 2.2 in particular, including its widely-used NSFW-capable community merges — run well through ComfyUI on consumer GPUs, and the engine's scene videos / Game Mode storyboard animations would work fully offline with such a source.Working reference implementation
I have this running locally as a patch and can turn it into a PR if the approach sounds acceptable:
comfyuibranch ingenerateVideoUnqueued()(dispatch onvideoService/videoGenerationSource === "comfyui"or:8188in the base URL), wrapped in the existingwithVideoGenerationDeadline.generateComfyUiVideo()mirrors the image provider's ComfyUI flow: substitute placeholders into an API-format workflow template (%prompt%,%width%,%height%,%seed%,%length%= frame count derived fromdurationSeconds× 16 fps,%reference_image_name%→ uploadsrequest.referenceImagevia/upload/imagefor i2v graphs), queue via/prompt, poll/history, download the mp4 from thegifs/imagesoutput of e.g. the coreSaveVideonode.9:16swaps dimensions;480p→ 832×480, otherwise 1280×720.Open design questions where maintainer preference matters:
MARINARA_COMFYUI_VIDEO_WORKFLOW), but reusing the connection's existingcomfyuiWorkflowcolumn (already in the schema and connection import format) seems cleaner — it just needs threading throughVideoGenerationRequestor the video runtime resolution.comfyuientry inVIDEO_GENERATION_SOURCESso the connection UI offers it (connection import already accepts arbitrary source strings).VIDEO_GEN_TIMEOUT_MSon mid-range GPUs; docs should probably mention raising it for local sources.Happy to open the PR either way — with the env-var approach as-is, or the connection-field approach if that's the preferred design.
🤖 Generated with Claude Code
@SpicyMarinara commented on GitHub (Jul 19, 2026):
We can add it as a Connection source for video generation, yeah.
@SpicyMarinara commented on GitHub (Jul 19, 2026):
Addressed in #3806. Marinara now supports local ComfyUI as a video source through the existing connection workflow field, including API-workflow placeholders, optional reference-image upload, queue/history polling, MP4 validation, and existing video deadlines. Documentation and defaults are included. Local pnpm check, mock ComfyUI protocol integration, and all PR checks pass; all three CodeRabbit findings were applied and the incremental re-review returned no actionable comments.
@SpicyMarinara commented on GitHub (Jul 19, 2026):
If possible, check on staging if all works well. I have no way of testing local stuff.