[feature] ComfyUI-on-Modal manga character pipeline for visual novel assets#67
[feature] ComfyUI-on-Modal manga character pipeline for visual novel assets#67lf1up wants to merge 2 commits into
Conversation
Standalone imagegen/ root directory generating consistent 2D manga characters for the visual novel features: Animagine XL 4.0 full-body master sprite (BiRefNet alpha cut-out) plus identity-preserving face/expression/body-part shots via Qwen-Image-Edit-2509 with the Lightning 4-step LoRA. - modal_app/app.py: pinned comfy-cli/ComfyUI image build, HF model downloads into a Modal Volume, interactive ComfyUI dev server, and a proxy-auth JSON API executing API-format workflows headlessly - workflows/: character_base.json and character_edit.json (validated against ComfyUI v0.27.0 node schemas) - scripts/generate_character.py: character spec -> full asset bundle (base + expressions + shots) with reproducibility manifest - RESEARCH.md: model/licensing research and design rationale Co-authored-by: Pavel Vdovenko <lf1up@outlook.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #67 +/- ##
=======================================
Coverage 72.09% 72.09%
=======================================
Files 60 60
Lines 4254 4254
Branches 662 662
=======================================
Hits 3067 3067
Misses 978 978
Partials 209 209
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
…F metadata) Co-authored-by: Pavel Vdovenko <lf1up@outlook.com>
Summary
New standalone
imagegen/root directory: a ComfyUI deployment on modal.com that generates consistent 2D manga characters for the visual-novel features — one full-body master sprite per character plus identity-preserving derived shots of the same character (face close-ups with different expressions, upper-body, hands, profile…), "interactive manga adventure" style.Approach (hybrid, per plan)
--no-lightning.What's included
imagegen/modal_app/app.py— Modal app: pinned image build (comfy-cli 1.12.0 / ComfyUI 0.27.0 /comfyui_birefnet_ll@1.1.4), ~38 GB of HF weights cached in a Modal Volume and symlinked into ComfyUI, interactive ComfyUI dev server (modal serve), headless JSON API (proxy-auth protected) on an L40S with scale-to-zero, and amodal runsmoke test.imagegen/workflows/— API-format graphs:character_base.json(txt2img + alpha branch) andcharacter_edit.json(Qwen edit + alpha branch).imagegen/scripts/generate_character.py— CLI turning a character spec (flags or JSON file) into a full bundle:base.png,base_raw.png,face_<expression>.png,shot_<name>.png,manifest.jsonwith seeds for reproducibility. 8 built-in expressions, 4 built-in shots, custom instructions supported.imagegen/RESEARCH.md— research findings: Modal ComfyUI pattern, model licensing comparison, consistency approaches considered (crop-and-refine, VNCCS, per-character LoRA), future work (persona wiring, poses, memory snapshots).imagegen/README.md— setup, deploy, usage, costs (~$0.05–0.15 per bundle on L40S).Validation
Ran against a live local ComfyUI 0.27.0 installed with the exact pinned commands from the Modal image (CPU flavor):
comfy --skip-prompt install --fast-deps --version 0.27.0andcomfy node install --fast-deps comfyui_birefnet_ll@1.1.4install cleanly with comfy-cli 1.12.0./promptendpoint: graph/schema validation passes; the only reported errors are the missing model files themselves (expected locally — they live in the Modal Volume).infer()serving path exercised end-to-end with realcomfy run --waitexecutions: input-image write → execution → output collection by unique prefix → RGBA correctness proven (withInvertMaskthe foreground stays opaque; the counterfactual without it produces a fully transparent foreground, confirming theJoinImageWithAlphainversion semantics).fastapi_endpoint(requires_proxy_auth=...),modal.experimental.stop_fetching_inputs,App.cls(scaledown_window=...)); app imports and registersui+ComfyUI.Not yet run: live
modal deploy+ GPU sample bundle — blocked on Modal credentials (no~/.modal.toml/MODAL_TOKEN_IDin the agent environment). Once credentials are available (Cursor Dashboard → Cloud Agents → Secrets, ormodal setuplocally):Out of scope (documented in RESEARCH.md)
Wiring into
agent/persona data, generating the 9 existing personas, per-character LoRA training, pose ControlNet.