From c55a48a57ecb65e13b3063c12783c49bfe4f7521 Mon Sep 17 00:00:00 2001 From: Towsty Date: Wed, 26 Aug 2026 14:29:15 -0500 Subject: [PATCH] Ship MiniMax v2 identity refs and Qwen sidecar edits. Keep v1 as the default video graph, relay image edits to the Qwen Lightning box, and keep /api/health up if one Comfy host is unset. Co-authored-by: Cursor --- .env.example | 7 + components/ImagePickerModal.vue | 3 +- nuxt.config.ts | 5 + pages/index.vue | 409 ++++++++++++++++- scripts/comfy-host-agent.mjs | 5 +- scripts/install-image-comfy-host.py | 138 ++++++ server/api/edit.post.ts | 201 ++++++++ server/api/extend.post.ts | 8 +- server/api/generate.post.ts | 46 +- server/api/health.get.ts | 26 +- server/api/interrupt.post.ts | 4 +- server/assets/workflow_minimax_video_v2.json | 456 +++++++++++++++++++ server/assets/workflow_qwen_edit.json | 98 ++++ server/utils/comfy.ts | 6 + server/utils/comfyLifecycle.ts | 20 +- server/utils/imageComfy.ts | 255 +++++++++++ server/utils/imageComfyLifecycle.ts | 218 +++++++++ server/utils/imageWorkflow.ts | 52 +++ server/utils/jobs.ts | 5 + server/utils/library.ts | 15 +- server/utils/watch.ts | 3 +- server/utils/workflow.ts | 156 +++++-- 22 files changed, 2061 insertions(+), 75 deletions(-) create mode 100644 scripts/install-image-comfy-host.py create mode 100644 server/api/edit.post.ts create mode 100644 server/assets/workflow_minimax_video_v2.json create mode 100644 server/assets/workflow_qwen_edit.json create mode 100644 server/utils/imageComfy.ts create mode 100644 server/utils/imageComfyLifecycle.ts create mode 100644 server/utils/imageWorkflow.ts diff --git a/.env.example b/.env.example index 0ed3c34..c1f7bf1 100644 --- a/.env.example +++ b/.env.example @@ -27,3 +27,10 @@ LIBRARY_DIR=/data/library # COMFY_FILENAME_PREFIX=video/xAIGen # Desktop Comfy files are deleted after a successful library save (set false to keep them) # PURGE_COMFY_OUTPUTS=true + +# Second Comfy box (sidecar / Qwen image edit) +IMAGE_COMFY_HOST=http://192.168.77.101:8188 +IMAGE_COMFY_PORT=8188 +# Optional host agent on the sidecar (scripts/comfy-host-agent.mjs) +# IMAGE_COMFY_CONTROL_URL=http://192.168.77.101:8199 +# IMAGE_COMFY_CONTROL_TOKEN= diff --git a/components/ImagePickerModal.vue b/components/ImagePickerModal.vue index dd6bb00..b4e8c42 100644 --- a/components/ImagePickerModal.vue +++ b/components/ImagePickerModal.vue @@ -4,7 +4,7 @@
-

Choose an image

+

{{ heading || 'Choose an image' }}

Pick a still from this folder or upload a new one.

@@ -147,6 +147,7 @@ const props = defineProps<{ stills: PickerStill[] folderId: string hideInputPreview?: boolean + heading?: string }>() const emit = defineEmits<{ diff --git a/nuxt.config.ts b/nuxt.config.ts index 4c10c8b..6d53375 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -29,6 +29,11 @@ export default defineNuxtConfig({ comfyLaunchCmd: process.env.COMFY_LAUNCH_CMD || '', comfyControlUrl: process.env.COMFY_CONTROL_URL || '', comfyControlToken: process.env.COMFY_CONTROL_TOKEN || '', + imageComfyHost: process.env.IMAGE_COMFY_HOST || '', + imageComfyPort: process.env.IMAGE_COMFY_PORT || '', + imageComfyLaunchCmd: process.env.IMAGE_COMFY_LAUNCH_CMD || '', + imageComfyControlUrl: process.env.IMAGE_COMFY_CONTROL_URL || '', + imageComfyControlToken: process.env.IMAGE_COMFY_CONTROL_TOKEN || '', sessionSecret: process.env.NUXT_SESSION_SECRET || '', oidcClientId: process.env.NUXT_OIDC_CLIENT_ID || '', oidcClientSecret: process.env.NUXT_OIDC_CLIENT_SECRET || '', diff --git a/pages/index.vue b/pages/index.vue index b5dcb28..7bd1d2c 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -6,7 +6,7 @@
A

{{ instanceName }}

-

MiniMax H3 · ComfyUI relay

+

MiniMax H3 · Qwen Edit · ComfyUI

@@ -17,6 +17,14 @@ {{ comfyBadge.label }} +

Input

-

Drop a still, describe the motion, then relay the job to the local desktop.

+

{{ studioMode === 'edit' + ? 'Drop a still and describe the edit. This relays to the sidecar Qwen Comfy box once the workflow is mapped.' + : 'Drop a still, describe the motion, then relay the job to the local desktop.' }}

Source still @@ -59,8 +87,8 @@
- -
-

+

Paste a block. Text before the first marker is shot 1. Write shot 2, shot 3, and so on to queue extensions. Every shot uses the duration slider.