Spaces:
Running on Zero
Running on Zero
Dropdowns for Canvas/LoRA/Steps via port choices (gradio 6.23.1)
Browse filesgr.Workflow 6.23.1 renders a dropdown widget for ports carrying a
choices list: the Canvas reference offers all 16 canvas labels, LoRA
offers larry/lightx/lightx8/realism/joyfox/off, Steps offers 4/6/8/28;
the operator input ports carry the same choices for rewires. The
forgiving server-side resolvers stay as a backstop for API callers.
- README.md +1 -1
- app.py +35 -6
- requirements.txt +1 -1
- workflow.json +415 -59
README.md
CHANGED
|
@@ -4,7 +4,7 @@ emoji: 🎬
|
|
| 4 |
colorFrom: purple
|
| 5 |
colorTo: indigo
|
| 6 |
sdk: gradio
|
| 7 |
-
sdk_version: 6.
|
| 8 |
app_file: app.py
|
| 9 |
pinned: true
|
| 10 |
hf_oauth: true
|
|
|
|
| 4 |
colorFrom: purple
|
| 5 |
colorTo: indigo
|
| 6 |
sdk: gradio
|
| 7 |
+
sdk_version: 6.23.1
|
| 8 |
app_file: app.py
|
| 9 |
pinned: true
|
| 10 |
hf_oauth: true
|
app.py
CHANGED
|
@@ -325,11 +325,39 @@ def _fit_keyframe(image_path, current_canvas):
|
|
| 325 |
return image_path, label
|
| 326 |
|
| 327 |
|
| 328 |
-
|
| 329 |
-
|
| 330 |
-
|
| 331 |
-
|
| 332 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 333 |
|
| 334 |
|
| 335 |
def generate(prompt, image_path=None, last_image_path=None, canvas=DEFAULT_CANVAS, duration=5, steps=6, seed=42, upsample=False, use_lora=True, lora="", ip_token=None):
|
|
@@ -346,6 +374,7 @@ def generate(prompt, image_path=None, last_image_path=None, canvas=DEFAULT_CANVA
|
|
| 346 |
from diffusers.utils import encode_video
|
| 347 |
|
| 348 |
lora = _resolve_lora(lora, use_lora)
|
|
|
|
| 349 |
|
| 350 |
# Keyframes arrive as FileData-style dicts (workflow canvas), plain paths, or URLs; the cover-crop /
|
| 351 |
# canvas-fit runs here so every caller gets the same treatment.
|
|
@@ -439,7 +468,7 @@ def generate_video(prompt: str, first_frame=None, last_frame=None, canvas: str =
|
|
| 439 |
if not prompt or not str(prompt).strip():
|
| 440 |
raise gr.Error("MiniMax-H3 always takes a prompt, keyframes or not.")
|
| 441 |
try:
|
| 442 |
-
return generate(str(prompt), first_frame, last_frame,
|
| 443 |
bool(upsample), lora=str(lora or "larry"), ip_token=_caller_ip_token())
|
| 444 |
except gr.Error:
|
| 445 |
raise
|
|
|
|
| 325 |
return image_path, label
|
| 326 |
|
| 327 |
|
| 328 |
+
LORA_NAMES = ("larry", "lightx", "lightx8", "realism", "joyfox", "off")
|
| 329 |
+
|
| 330 |
+
|
| 331 |
+
def _resolve_lora(lora, use_lora=True) -> str:
|
| 332 |
+
"""Forgiving LoRA resolution for a free-text canvas field: case-insensitive, unambiguous prefixes allowed."""
|
| 333 |
+
if not isinstance(lora, str) or not lora.strip():
|
| 334 |
+
return "larry" if use_lora else "off"
|
| 335 |
+
value = lora.strip().lower()
|
| 336 |
+
if value in LORA_NAMES:
|
| 337 |
+
return value
|
| 338 |
+
matches = [name for name in LORA_NAMES if name.startswith(value)]
|
| 339 |
+
if len(matches) == 1:
|
| 340 |
+
return matches[0]
|
| 341 |
+
raise gr.Error(f"Unknown LoRA `{lora}`. Pick one of: {', '.join(LORA_NAMES)}.")
|
| 342 |
+
|
| 343 |
+
|
| 344 |
+
def _resolve_canvas(canvas) -> str:
|
| 345 |
+
"""Forgiving canvas resolution: the exact label, a `WxH` pair, or an unambiguous label substring (`16:9 fast`)."""
|
| 346 |
+
if not isinstance(canvas, str) or not canvas.strip():
|
| 347 |
+
return DEFAULT_CANVAS
|
| 348 |
+
value = canvas.strip()
|
| 349 |
+
if value in CANVASES:
|
| 350 |
+
return value
|
| 351 |
+
lowered = value.lower()
|
| 352 |
+
for label in CANVASES:
|
| 353 |
+
if label.lower() == lowered:
|
| 354 |
+
return label
|
| 355 |
+
matches = [label for label, (h, w) in CANVASES.items() if f"{w}x{h}" == lowered or lowered in label.lower()]
|
| 356 |
+
if len(matches) == 1:
|
| 357 |
+
return matches[0]
|
| 358 |
+
if matches:
|
| 359 |
+
raise gr.Error(f"`{canvas}` is ambiguous: {', '.join(matches)}. Give the full label or a WxH pair.")
|
| 360 |
+
raise gr.Error(f"Unknown canvas `{canvas}`. Pick one of: {', '.join(CANVASES)}.")
|
| 361 |
|
| 362 |
|
| 363 |
def generate(prompt, image_path=None, last_image_path=None, canvas=DEFAULT_CANVAS, duration=5, steps=6, seed=42, upsample=False, use_lora=True, lora="", ip_token=None):
|
|
|
|
| 374 |
from diffusers.utils import encode_video
|
| 375 |
|
| 376 |
lora = _resolve_lora(lora, use_lora)
|
| 377 |
+
canvas = _resolve_canvas(canvas)
|
| 378 |
|
| 379 |
# Keyframes arrive as FileData-style dicts (workflow canvas), plain paths, or URLs; the cover-crop /
|
| 380 |
# canvas-fit runs here so every caller gets the same treatment.
|
|
|
|
| 468 |
if not prompt or not str(prompt).strip():
|
| 469 |
raise gr.Error("MiniMax-H3 always takes a prompt, keyframes or not.")
|
| 470 |
try:
|
| 471 |
+
return generate(str(prompt), first_frame, last_frame, canvas, float(duration), int(steps), float(seed),
|
| 472 |
bool(upsample), lora=str(lora or "larry"), ip_token=_caller_ip_token())
|
| 473 |
except gr.Error:
|
| 474 |
raise
|
requirements.txt
CHANGED
|
@@ -14,7 +14,7 @@ transformers==5.8.0
|
|
| 14 |
accelerate==1.14.0
|
| 15 |
# diffusers pins <2.
|
| 16 |
huggingface-hub==1.24.0
|
| 17 |
-
gradio==6.
|
| 18 |
spaces==0.51.1
|
| 19 |
# No `kernels` pin on purpose: the Hub attention backends want `kernels>=0.12.3`, and that version breaks
|
| 20 |
# transformers 5.8.0 at import.
|
|
|
|
| 14 |
accelerate==1.14.0
|
| 15 |
# diffusers pins <2.
|
| 16 |
huggingface-hub==1.24.0
|
| 17 |
+
gradio==6.23.1
|
| 18 |
spaces==0.51.1
|
| 19 |
# No `kernels` pin on purpose: the Hub attention backends want `kernels>=0.12.3`, and that version breaks
|
| 20 |
# transformers 5.8.0 at import.
|
workflow.json
CHANGED
|
@@ -2,29 +2,59 @@
|
|
| 2 |
"schema_version": "2",
|
| 3 |
"name": "MiniMax-H3 Studio",
|
| 4 |
"description": "Joint video + synchronized soundtrack from MiniMax-H3 (unquantized bf16, split deployment) with switchable turbo LoRAs, driven by a gr.Workflow fn-bound @spaces.GPU function.",
|
| 5 |
-
"runtime": {
|
| 6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
"references": [
|
| 8 |
{
|
| 9 |
"id": "ref_prompt",
|
| 10 |
"label": "Prompt",
|
| 11 |
"role": "reference",
|
| 12 |
"asset_type": "text",
|
| 13 |
-
"inputs": [
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
"x": 40,
|
| 16 |
"y": 60,
|
| 17 |
"width": 280,
|
| 18 |
"height": 140,
|
| 19 |
-
"data": {
|
|
|
|
|
|
|
| 20 |
},
|
| 21 |
{
|
| 22 |
"id": "ref_first",
|
| 23 |
"label": "First Frame (optional)",
|
| 24 |
"role": "reference",
|
| 25 |
"asset_type": "image",
|
| 26 |
-
"inputs": [
|
| 27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
"x": 40,
|
| 29 |
"y": 230,
|
| 30 |
"width": 220,
|
|
@@ -36,8 +66,20 @@
|
|
| 36 |
"label": "Last Frame (optional)",
|
| 37 |
"role": "reference",
|
| 38 |
"asset_type": "image",
|
| 39 |
-
"inputs": [
|
| 40 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
"x": 40,
|
| 42 |
"y": 370,
|
| 43 |
"width": 220,
|
|
@@ -49,78 +91,194 @@
|
|
| 49 |
"label": "Canvas",
|
| 50 |
"role": "reference",
|
| 51 |
"asset_type": "text",
|
| 52 |
-
"inputs": [
|
| 53 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
"x": 40,
|
| 55 |
"y": 520,
|
| 56 |
"width": 220,
|
| 57 |
"height": 90,
|
| 58 |
-
"data": {
|
|
|
|
|
|
|
| 59 |
},
|
| 60 |
{
|
| 61 |
"id": "ref_duration",
|
| 62 |
"label": "Duration (s)",
|
| 63 |
"role": "reference",
|
| 64 |
"asset_type": "number",
|
| 65 |
-
"inputs": [
|
| 66 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
"x": 40,
|
| 68 |
"y": 630,
|
| 69 |
"width": 200,
|
| 70 |
"height": 90,
|
| 71 |
-
"data": {
|
|
|
|
|
|
|
| 72 |
},
|
| 73 |
{
|
| 74 |
"id": "ref_steps",
|
| 75 |
"label": "Steps",
|
| 76 |
"role": "reference",
|
| 77 |
"asset_type": "number",
|
| 78 |
-
"inputs": [
|
| 79 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 80 |
"x": 40,
|
| 81 |
"y": 740,
|
| 82 |
"width": 200,
|
| 83 |
"height": 90,
|
| 84 |
-
"data": {
|
|
|
|
|
|
|
| 85 |
},
|
| 86 |
{
|
| 87 |
"id": "ref_seed",
|
| 88 |
"label": "Seed",
|
| 89 |
"role": "reference",
|
| 90 |
"asset_type": "number",
|
| 91 |
-
"inputs": [
|
| 92 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 93 |
"x": 40,
|
| 94 |
"y": 850,
|
| 95 |
"width": 200,
|
| 96 |
"height": 90,
|
| 97 |
-
"data": {
|
|
|
|
|
|
|
| 98 |
},
|
| 99 |
{
|
| 100 |
"id": "ref_upsample",
|
| 101 |
"label": "Upsample Prompt",
|
| 102 |
"role": "reference",
|
| 103 |
"asset_type": "boolean",
|
| 104 |
-
"inputs": [
|
| 105 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 106 |
"x": 40,
|
| 107 |
"y": 960,
|
| 108 |
"width": 200,
|
| 109 |
"height": 90,
|
| 110 |
-
"data": {
|
|
|
|
|
|
|
| 111 |
},
|
| 112 |
{
|
| 113 |
"id": "ref_lora",
|
| 114 |
-
"label": "LoRA
|
| 115 |
"role": "reference",
|
| 116 |
"asset_type": "text",
|
| 117 |
-
"inputs": [
|
| 118 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 119 |
"x": 40,
|
| 120 |
"y": 1070,
|
| 121 |
"width": 260,
|
| 122 |
"height": 90,
|
| 123 |
-
"data": {
|
|
|
|
|
|
|
| 124 |
}
|
| 125 |
],
|
| 126 |
"operators": [
|
|
@@ -132,20 +290,98 @@
|
|
| 132 |
"source": "fn",
|
| 133 |
"fn": "generate_video",
|
| 134 |
"inputs": [
|
| 135 |
-
{
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
{
|
| 142 |
-
|
| 143 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 144 |
],
|
| 145 |
"outputs": [
|
| 146 |
-
{
|
| 147 |
-
|
| 148 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 149 |
],
|
| 150 |
"x": 460,
|
| 151 |
"y": 420,
|
|
@@ -160,8 +396,20 @@
|
|
| 160 |
"label": "Output Video",
|
| 161 |
"role": "subject",
|
| 162 |
"asset_type": "video",
|
| 163 |
-
"inputs": [
|
| 164 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 165 |
"x": 880,
|
| 166 |
"y": 380,
|
| 167 |
"width": 280,
|
|
@@ -173,8 +421,20 @@
|
|
| 173 |
"label": "Report",
|
| 174 |
"role": "subject",
|
| 175 |
"asset_type": "text",
|
| 176 |
-
"inputs": [
|
| 177 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 178 |
"x": 880,
|
| 179 |
"y": 580,
|
| 180 |
"width": 280,
|
|
@@ -186,8 +446,20 @@
|
|
| 186 |
"label": "Refined Prompt",
|
| 187 |
"role": "subject",
|
| 188 |
"asset_type": "text",
|
| 189 |
-
"inputs": [
|
| 190 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 191 |
"x": 880,
|
| 192 |
"y": 720,
|
| 193 |
"width": 280,
|
|
@@ -196,17 +468,101 @@
|
|
| 196 |
}
|
| 197 |
],
|
| 198 |
"edges": [
|
| 199 |
-
{
|
| 200 |
-
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
{
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 211 |
]
|
| 212 |
-
}
|
|
|
|
| 2 |
"schema_version": "2",
|
| 3 |
"name": "MiniMax-H3 Studio",
|
| 4 |
"description": "Joint video + synchronized soundtrack from MiniMax-H3 (unquantized bf16, split deployment) with switchable turbo LoRAs, driven by a gr.Workflow fn-bound @spaces.GPU function.",
|
| 5 |
+
"runtime": {
|
| 6 |
+
"default": "client"
|
| 7 |
+
},
|
| 8 |
+
"view": {
|
| 9 |
+
"default": "canvas"
|
| 10 |
+
},
|
| 11 |
"references": [
|
| 12 |
{
|
| 13 |
"id": "ref_prompt",
|
| 14 |
"label": "Prompt",
|
| 15 |
"role": "reference",
|
| 16 |
"asset_type": "text",
|
| 17 |
+
"inputs": [
|
| 18 |
+
{
|
| 19 |
+
"id": "in",
|
| 20 |
+
"label": "Prompt",
|
| 21 |
+
"type": "text"
|
| 22 |
+
}
|
| 23 |
+
],
|
| 24 |
+
"outputs": [
|
| 25 |
+
{
|
| 26 |
+
"id": "out",
|
| 27 |
+
"label": "Prompt",
|
| 28 |
+
"type": "text"
|
| 29 |
+
}
|
| 30 |
+
],
|
| 31 |
"x": 40,
|
| 32 |
"y": 60,
|
| 33 |
"width": 280,
|
| 34 |
"height": 140,
|
| 35 |
+
"data": {
|
| 36 |
+
"out": "A corgi in a chef hat flipping a pancake in a sunlit kitchen, sizzling sounds and a cheerful bark, cinematic"
|
| 37 |
+
}
|
| 38 |
},
|
| 39 |
{
|
| 40 |
"id": "ref_first",
|
| 41 |
"label": "First Frame (optional)",
|
| 42 |
"role": "reference",
|
| 43 |
"asset_type": "image",
|
| 44 |
+
"inputs": [
|
| 45 |
+
{
|
| 46 |
+
"id": "in",
|
| 47 |
+
"label": "Image",
|
| 48 |
+
"type": "image"
|
| 49 |
+
}
|
| 50 |
+
],
|
| 51 |
+
"outputs": [
|
| 52 |
+
{
|
| 53 |
+
"id": "out",
|
| 54 |
+
"label": "Image",
|
| 55 |
+
"type": "image"
|
| 56 |
+
}
|
| 57 |
+
],
|
| 58 |
"x": 40,
|
| 59 |
"y": 230,
|
| 60 |
"width": 220,
|
|
|
|
| 66 |
"label": "Last Frame (optional)",
|
| 67 |
"role": "reference",
|
| 68 |
"asset_type": "image",
|
| 69 |
+
"inputs": [
|
| 70 |
+
{
|
| 71 |
+
"id": "in",
|
| 72 |
+
"label": "Image",
|
| 73 |
+
"type": "image"
|
| 74 |
+
}
|
| 75 |
+
],
|
| 76 |
+
"outputs": [
|
| 77 |
+
{
|
| 78 |
+
"id": "out",
|
| 79 |
+
"label": "Image",
|
| 80 |
+
"type": "image"
|
| 81 |
+
}
|
| 82 |
+
],
|
| 83 |
"x": 40,
|
| 84 |
"y": 370,
|
| 85 |
"width": 220,
|
|
|
|
| 91 |
"label": "Canvas",
|
| 92 |
"role": "reference",
|
| 93 |
"asset_type": "text",
|
| 94 |
+
"inputs": [
|
| 95 |
+
{
|
| 96 |
+
"id": "in",
|
| 97 |
+
"label": "Canvas label",
|
| 98 |
+
"type": "text"
|
| 99 |
+
}
|
| 100 |
+
],
|
| 101 |
+
"outputs": [
|
| 102 |
+
{
|
| 103 |
+
"id": "out",
|
| 104 |
+
"label": "Canvas",
|
| 105 |
+
"type": "text",
|
| 106 |
+
"choices": [
|
| 107 |
+
"960x544 · 16:9 fast",
|
| 108 |
+
"1024x576 · 16:9 fast",
|
| 109 |
+
"1152x640 · 16:9",
|
| 110 |
+
"1280x704 · 16:9",
|
| 111 |
+
"1344x768 · 16:9 full",
|
| 112 |
+
"544x960 · 9:16 fast",
|
| 113 |
+
"640x1152 · 9:16",
|
| 114 |
+
"768x1344 · 9:16 full",
|
| 115 |
+
"544x544 · 1:1 fast",
|
| 116 |
+
"768x768 · 1:1 full",
|
| 117 |
+
"768x576 · 4:3 fast",
|
| 118 |
+
"1024x768 · 4:3 full",
|
| 119 |
+
"576x768 · 3:4 fast",
|
| 120 |
+
"768x1024 · 3:4 full",
|
| 121 |
+
"1152x512 · 21:9 fast",
|
| 122 |
+
"1536x672 · 21:9 full"
|
| 123 |
+
]
|
| 124 |
+
}
|
| 125 |
+
],
|
| 126 |
"x": 40,
|
| 127 |
"y": 520,
|
| 128 |
"width": 220,
|
| 129 |
"height": 90,
|
| 130 |
+
"data": {
|
| 131 |
+
"out": "960x544 · 16:9 fast"
|
| 132 |
+
}
|
| 133 |
},
|
| 134 |
{
|
| 135 |
"id": "ref_duration",
|
| 136 |
"label": "Duration (s)",
|
| 137 |
"role": "reference",
|
| 138 |
"asset_type": "number",
|
| 139 |
+
"inputs": [
|
| 140 |
+
{
|
| 141 |
+
"id": "in",
|
| 142 |
+
"label": "Seconds",
|
| 143 |
+
"type": "number"
|
| 144 |
+
}
|
| 145 |
+
],
|
| 146 |
+
"outputs": [
|
| 147 |
+
{
|
| 148 |
+
"id": "out",
|
| 149 |
+
"label": "Duration",
|
| 150 |
+
"type": "number"
|
| 151 |
+
}
|
| 152 |
+
],
|
| 153 |
"x": 40,
|
| 154 |
"y": 630,
|
| 155 |
"width": 200,
|
| 156 |
"height": 90,
|
| 157 |
+
"data": {
|
| 158 |
+
"out": 5
|
| 159 |
+
}
|
| 160 |
},
|
| 161 |
{
|
| 162 |
"id": "ref_steps",
|
| 163 |
"label": "Steps",
|
| 164 |
"role": "reference",
|
| 165 |
"asset_type": "number",
|
| 166 |
+
"inputs": [
|
| 167 |
+
{
|
| 168 |
+
"id": "in",
|
| 169 |
+
"label": "Steps",
|
| 170 |
+
"type": "number"
|
| 171 |
+
}
|
| 172 |
+
],
|
| 173 |
+
"outputs": [
|
| 174 |
+
{
|
| 175 |
+
"id": "out",
|
| 176 |
+
"label": "Steps",
|
| 177 |
+
"type": "number",
|
| 178 |
+
"choices": [
|
| 179 |
+
4,
|
| 180 |
+
6,
|
| 181 |
+
8,
|
| 182 |
+
28
|
| 183 |
+
]
|
| 184 |
+
}
|
| 185 |
+
],
|
| 186 |
"x": 40,
|
| 187 |
"y": 740,
|
| 188 |
"width": 200,
|
| 189 |
"height": 90,
|
| 190 |
+
"data": {
|
| 191 |
+
"out": 6
|
| 192 |
+
}
|
| 193 |
},
|
| 194 |
{
|
| 195 |
"id": "ref_seed",
|
| 196 |
"label": "Seed",
|
| 197 |
"role": "reference",
|
| 198 |
"asset_type": "number",
|
| 199 |
+
"inputs": [
|
| 200 |
+
{
|
| 201 |
+
"id": "in",
|
| 202 |
+
"label": "Seed",
|
| 203 |
+
"type": "number"
|
| 204 |
+
}
|
| 205 |
+
],
|
| 206 |
+
"outputs": [
|
| 207 |
+
{
|
| 208 |
+
"id": "out",
|
| 209 |
+
"label": "Seed",
|
| 210 |
+
"type": "number"
|
| 211 |
+
}
|
| 212 |
+
],
|
| 213 |
"x": 40,
|
| 214 |
"y": 850,
|
| 215 |
"width": 200,
|
| 216 |
"height": 90,
|
| 217 |
+
"data": {
|
| 218 |
+
"out": 42
|
| 219 |
+
}
|
| 220 |
},
|
| 221 |
{
|
| 222 |
"id": "ref_upsample",
|
| 223 |
"label": "Upsample Prompt",
|
| 224 |
"role": "reference",
|
| 225 |
"asset_type": "boolean",
|
| 226 |
+
"inputs": [
|
| 227 |
+
{
|
| 228 |
+
"id": "in",
|
| 229 |
+
"label": "Upsample",
|
| 230 |
+
"type": "boolean"
|
| 231 |
+
}
|
| 232 |
+
],
|
| 233 |
+
"outputs": [
|
| 234 |
+
{
|
| 235 |
+
"id": "out",
|
| 236 |
+
"label": "Upsample",
|
| 237 |
+
"type": "boolean"
|
| 238 |
+
}
|
| 239 |
+
],
|
| 240 |
"x": 40,
|
| 241 |
"y": 960,
|
| 242 |
"width": 200,
|
| 243 |
"height": 90,
|
| 244 |
+
"data": {
|
| 245 |
+
"out": false
|
| 246 |
+
}
|
| 247 |
},
|
| 248 |
{
|
| 249 |
"id": "ref_lora",
|
| 250 |
+
"label": "LoRA",
|
| 251 |
"role": "reference",
|
| 252 |
"asset_type": "text",
|
| 253 |
+
"inputs": [
|
| 254 |
+
{
|
| 255 |
+
"id": "in",
|
| 256 |
+
"label": "LoRA",
|
| 257 |
+
"type": "text"
|
| 258 |
+
}
|
| 259 |
+
],
|
| 260 |
+
"outputs": [
|
| 261 |
+
{
|
| 262 |
+
"id": "out",
|
| 263 |
+
"label": "LoRA",
|
| 264 |
+
"type": "text",
|
| 265 |
+
"choices": [
|
| 266 |
+
"larry",
|
| 267 |
+
"lightx",
|
| 268 |
+
"lightx8",
|
| 269 |
+
"realism",
|
| 270 |
+
"joyfox",
|
| 271 |
+
"off"
|
| 272 |
+
]
|
| 273 |
+
}
|
| 274 |
+
],
|
| 275 |
"x": 40,
|
| 276 |
"y": 1070,
|
| 277 |
"width": 260,
|
| 278 |
"height": 90,
|
| 279 |
+
"data": {
|
| 280 |
+
"out": "larry"
|
| 281 |
+
}
|
| 282 |
}
|
| 283 |
],
|
| 284 |
"operators": [
|
|
|
|
| 290 |
"source": "fn",
|
| 291 |
"fn": "generate_video",
|
| 292 |
"inputs": [
|
| 293 |
+
{
|
| 294 |
+
"id": "in_0",
|
| 295 |
+
"label": "prompt",
|
| 296 |
+
"type": "text",
|
| 297 |
+
"required": true
|
| 298 |
+
},
|
| 299 |
+
{
|
| 300 |
+
"id": "in_1",
|
| 301 |
+
"label": "first_frame",
|
| 302 |
+
"type": "image"
|
| 303 |
+
},
|
| 304 |
+
{
|
| 305 |
+
"id": "in_2",
|
| 306 |
+
"label": "last_frame",
|
| 307 |
+
"type": "image"
|
| 308 |
+
},
|
| 309 |
+
{
|
| 310 |
+
"id": "in_3",
|
| 311 |
+
"label": "canvas",
|
| 312 |
+
"type": "text",
|
| 313 |
+
"choices": [
|
| 314 |
+
"960x544 · 16:9 fast",
|
| 315 |
+
"1024x576 · 16:9 fast",
|
| 316 |
+
"1152x640 · 16:9",
|
| 317 |
+
"1280x704 · 16:9",
|
| 318 |
+
"1344x768 · 16:9 full",
|
| 319 |
+
"544x960 · 9:16 fast",
|
| 320 |
+
"640x1152 · 9:16",
|
| 321 |
+
"768x1344 · 9:16 full",
|
| 322 |
+
"544x544 · 1:1 fast",
|
| 323 |
+
"768x768 · 1:1 full",
|
| 324 |
+
"768x576 · 4:3 fast",
|
| 325 |
+
"1024x768 · 4:3 full",
|
| 326 |
+
"576x768 · 3:4 fast",
|
| 327 |
+
"768x1024 · 3:4 full",
|
| 328 |
+
"1152x512 · 21:9 fast",
|
| 329 |
+
"1536x672 · 21:9 full"
|
| 330 |
+
]
|
| 331 |
+
},
|
| 332 |
+
{
|
| 333 |
+
"id": "in_4",
|
| 334 |
+
"label": "duration",
|
| 335 |
+
"type": "number"
|
| 336 |
+
},
|
| 337 |
+
{
|
| 338 |
+
"id": "in_5",
|
| 339 |
+
"label": "steps",
|
| 340 |
+
"type": "number"
|
| 341 |
+
},
|
| 342 |
+
{
|
| 343 |
+
"id": "in_6",
|
| 344 |
+
"label": "seed",
|
| 345 |
+
"type": "number"
|
| 346 |
+
},
|
| 347 |
+
{
|
| 348 |
+
"id": "in_7",
|
| 349 |
+
"label": "upsample",
|
| 350 |
+
"type": "boolean"
|
| 351 |
+
},
|
| 352 |
+
{
|
| 353 |
+
"id": "in_8",
|
| 354 |
+
"label": "lora",
|
| 355 |
+
"type": "text",
|
| 356 |
+
"choices": [
|
| 357 |
+
"larry",
|
| 358 |
+
"lightx",
|
| 359 |
+
"lightx8",
|
| 360 |
+
"realism",
|
| 361 |
+
"joyfox",
|
| 362 |
+
"off"
|
| 363 |
+
]
|
| 364 |
+
}
|
| 365 |
],
|
| 366 |
"outputs": [
|
| 367 |
+
{
|
| 368 |
+
"id": "out_0",
|
| 369 |
+
"label": "video",
|
| 370 |
+
"type": "video",
|
| 371 |
+
"output_index": 0
|
| 372 |
+
},
|
| 373 |
+
{
|
| 374 |
+
"id": "out_1",
|
| 375 |
+
"label": "report",
|
| 376 |
+
"type": "text",
|
| 377 |
+
"output_index": 1
|
| 378 |
+
},
|
| 379 |
+
{
|
| 380 |
+
"id": "out_2",
|
| 381 |
+
"label": "refined_prompt",
|
| 382 |
+
"type": "text",
|
| 383 |
+
"output_index": 2
|
| 384 |
+
}
|
| 385 |
],
|
| 386 |
"x": 460,
|
| 387 |
"y": 420,
|
|
|
|
| 396 |
"label": "Output Video",
|
| 397 |
"role": "subject",
|
| 398 |
"asset_type": "video",
|
| 399 |
+
"inputs": [
|
| 400 |
+
{
|
| 401 |
+
"id": "in",
|
| 402 |
+
"label": "Video",
|
| 403 |
+
"type": "video"
|
| 404 |
+
}
|
| 405 |
+
],
|
| 406 |
+
"outputs": [
|
| 407 |
+
{
|
| 408 |
+
"id": "out",
|
| 409 |
+
"label": "Video",
|
| 410 |
+
"type": "video"
|
| 411 |
+
}
|
| 412 |
+
],
|
| 413 |
"x": 880,
|
| 414 |
"y": 380,
|
| 415 |
"width": 280,
|
|
|
|
| 421 |
"label": "Report",
|
| 422 |
"role": "subject",
|
| 423 |
"asset_type": "text",
|
| 424 |
+
"inputs": [
|
| 425 |
+
{
|
| 426 |
+
"id": "in",
|
| 427 |
+
"label": "Report",
|
| 428 |
+
"type": "text"
|
| 429 |
+
}
|
| 430 |
+
],
|
| 431 |
+
"outputs": [
|
| 432 |
+
{
|
| 433 |
+
"id": "out",
|
| 434 |
+
"label": "Report",
|
| 435 |
+
"type": "text"
|
| 436 |
+
}
|
| 437 |
+
],
|
| 438 |
"x": 880,
|
| 439 |
"y": 580,
|
| 440 |
"width": 280,
|
|
|
|
| 446 |
"label": "Refined Prompt",
|
| 447 |
"role": "subject",
|
| 448 |
"asset_type": "text",
|
| 449 |
+
"inputs": [
|
| 450 |
+
{
|
| 451 |
+
"id": "in",
|
| 452 |
+
"label": "Refined prompt",
|
| 453 |
+
"type": "text"
|
| 454 |
+
}
|
| 455 |
+
],
|
| 456 |
+
"outputs": [
|
| 457 |
+
{
|
| 458 |
+
"id": "out",
|
| 459 |
+
"label": "Refined prompt",
|
| 460 |
+
"type": "text"
|
| 461 |
+
}
|
| 462 |
+
],
|
| 463 |
"x": 880,
|
| 464 |
"y": 720,
|
| 465 |
"width": 280,
|
|
|
|
| 468 |
}
|
| 469 |
],
|
| 470 |
"edges": [
|
| 471 |
+
{
|
| 472 |
+
"id": "e_prompt",
|
| 473 |
+
"from_node_id": "ref_prompt",
|
| 474 |
+
"from_port_id": "out",
|
| 475 |
+
"to_node_id": "op_generate",
|
| 476 |
+
"to_port_id": "in_0",
|
| 477 |
+
"type": "text"
|
| 478 |
+
},
|
| 479 |
+
{
|
| 480 |
+
"id": "e_first",
|
| 481 |
+
"from_node_id": "ref_first",
|
| 482 |
+
"from_port_id": "out",
|
| 483 |
+
"to_node_id": "op_generate",
|
| 484 |
+
"to_port_id": "in_1",
|
| 485 |
+
"type": "image"
|
| 486 |
+
},
|
| 487 |
+
{
|
| 488 |
+
"id": "e_last",
|
| 489 |
+
"from_node_id": "ref_last",
|
| 490 |
+
"from_port_id": "out",
|
| 491 |
+
"to_node_id": "op_generate",
|
| 492 |
+
"to_port_id": "in_2",
|
| 493 |
+
"type": "image"
|
| 494 |
+
},
|
| 495 |
+
{
|
| 496 |
+
"id": "e_canvas",
|
| 497 |
+
"from_node_id": "ref_canvas",
|
| 498 |
+
"from_port_id": "out",
|
| 499 |
+
"to_node_id": "op_generate",
|
| 500 |
+
"to_port_id": "in_3",
|
| 501 |
+
"type": "text"
|
| 502 |
+
},
|
| 503 |
+
{
|
| 504 |
+
"id": "e_duration",
|
| 505 |
+
"from_node_id": "ref_duration",
|
| 506 |
+
"from_port_id": "out",
|
| 507 |
+
"to_node_id": "op_generate",
|
| 508 |
+
"to_port_id": "in_4",
|
| 509 |
+
"type": "number"
|
| 510 |
+
},
|
| 511 |
+
{
|
| 512 |
+
"id": "e_steps",
|
| 513 |
+
"from_node_id": "ref_steps",
|
| 514 |
+
"from_port_id": "out",
|
| 515 |
+
"to_node_id": "op_generate",
|
| 516 |
+
"to_port_id": "in_5",
|
| 517 |
+
"type": "number"
|
| 518 |
+
},
|
| 519 |
+
{
|
| 520 |
+
"id": "e_seed",
|
| 521 |
+
"from_node_id": "ref_seed",
|
| 522 |
+
"from_port_id": "out",
|
| 523 |
+
"to_node_id": "op_generate",
|
| 524 |
+
"to_port_id": "in_6",
|
| 525 |
+
"type": "number"
|
| 526 |
+
},
|
| 527 |
+
{
|
| 528 |
+
"id": "e_upsample",
|
| 529 |
+
"from_node_id": "ref_upsample",
|
| 530 |
+
"from_port_id": "out",
|
| 531 |
+
"to_node_id": "op_generate",
|
| 532 |
+
"to_port_id": "in_7",
|
| 533 |
+
"type": "boolean"
|
| 534 |
+
},
|
| 535 |
+
{
|
| 536 |
+
"id": "e_lora",
|
| 537 |
+
"from_node_id": "ref_lora",
|
| 538 |
+
"from_port_id": "out",
|
| 539 |
+
"to_node_id": "op_generate",
|
| 540 |
+
"to_port_id": "in_8",
|
| 541 |
+
"type": "text"
|
| 542 |
+
},
|
| 543 |
+
{
|
| 544 |
+
"id": "e_video_out",
|
| 545 |
+
"from_node_id": "op_generate",
|
| 546 |
+
"from_port_id": "out_0",
|
| 547 |
+
"to_node_id": "sub_video",
|
| 548 |
+
"to_port_id": "in",
|
| 549 |
+
"type": "video"
|
| 550 |
+
},
|
| 551 |
+
{
|
| 552 |
+
"id": "e_report_out",
|
| 553 |
+
"from_node_id": "op_generate",
|
| 554 |
+
"from_port_id": "out_1",
|
| 555 |
+
"to_node_id": "sub_report",
|
| 556 |
+
"to_port_id": "in",
|
| 557 |
+
"type": "text"
|
| 558 |
+
},
|
| 559 |
+
{
|
| 560 |
+
"id": "e_refined_out",
|
| 561 |
+
"from_node_id": "op_generate",
|
| 562 |
+
"from_port_id": "out_2",
|
| 563 |
+
"to_node_id": "sub_refined",
|
| 564 |
+
"to_port_id": "in",
|
| 565 |
+
"type": "text"
|
| 566 |
+
}
|
| 567 |
]
|
| 568 |
+
}
|