Skip to content
Python

Cinema Studio video mode, and selects that take several options

neuregex3dc10b70fead
diff --git a/apps/cinema-studio/app.json b/apps/cinema-studio/app.json
index e04b84f..6a8145c 100644
--- a/apps/cinema-studio/app.json
+++ b/apps/cinema-studio/app.json
@@ -6,6 +6,10 @@
"pack": "image-flux3",
"status": "ready",
"higgsfield_feature": "Cinematic Cameras",
+ "modes": [
+ "cinema-studio",
+ "cinema-video"
+ ],
"summary": "Pick genre, era, camera body, lens, focal length, aperture, lighting and color palette; they become part of the prompt.",
"workflow": "workflow.api.json",
"source": {
diff --git a/apps/cinema-video/app.json b/apps/cinema-video/app.json
new file mode 100644
index 0000000..497dc1f
--- /dev/null
+++ b/apps/cinema-video/app.json
@@ -0,0 +1,819 @@
+{
+ "$schema": "../../schema/app.schema.json",
+ "id": "cinema-video",
+ "name": "Cinema Studio Video",
+ "section": "video",
+ "pack": "video-ltx25",
+ "status": "ready",
+ "higgsfield_feature": "Cinema Studio (video)",
+ "modes": [
+ "cinema-studio",
+ "cinema-video"
+ ],
+ "summary": "Cinema Studio in motion: the same film look as the still, then up to three camera moves, a tempo and sound, on LTX-2.5.",
+ "workflow": "workflow.api.json",
+ "source": {
+ "template": "video_ltx2_5_i2v.json",
+ "comfyui": "0.42.0",
+ "notes": "Higgsfield's Cinema Studio 4.0 has an image and a video mode with the same film settings (genre, era, tempo), camera (body, lens, aperture and 33 camera moves, several per shot in order), palette and lighting, read on 26 Oct. Here the video mode is the LTX-2.5 image-to-video template whose first frame is drawn in the same graph by cinema-studio's still (FLUX 3 Image Klein, nodes still:*): the look selects write the still's prompt, which Klein follows closely, and the motion prompt adds the camera moves in order, the tempo and the action. Camera move names from Higgsfield's list; each option writes the movement it describes."
+ },
+ "inputs": [
+ {
+ "id": "prompt",
+ "type": "textarea",
+ "label": "Scene",
+ "required": true,
+ "default": "A detective in a trench coat lights a cigarette under a streetlamp on a rainy night, then looks up as headlights sweep across his face",
+ "help": "What happens in the shot. The first frame is drawn from it with the look below, then the shot moves.",
+ "bind": [
+ {
+ "node": "still:18:17",
+ "field": "value",
+ "template": "A cinematic film still{genre}{era}: {prompt}. The look: {camera}; {lens}; {focal}; {aperture}. Lighting: {lighting}. Color: {palette}. High dynamic range, ultra-detailed"
+ },
+ {
+ "node": "398:376",
+ "field": "value",
+ "template": "{moves}{prompt}.{tempo} The look of a film{genre}{era}: {camera}; {lens}. Lighting: {lighting}. Color: {palette}."
+ }
+ ]
+ },
+ {
+ "id": "moves",
+ "type": "select",
+ "label": "Camera move",
+ "default": [
+ "slowly dollies in toward the subject"
+ ],
+ "multiple": {
+ "max": 3,
+ "join": ", then ",
+ "prefix": "The camera ",
+ "suffix": ". ",
+ "ordered": true
+ },
+ "help": "Up to 3, in order: the shot does them one after the other.",
+ "options": [
+ {
+ "value": "stays locked off on a tripod, perfectly still",
+ "label": "Static shot"
+ },
+ {
+ "value": "slowly dollies in toward the subject",
+ "label": "Dolly in"
+ },
+ {
+ "value": "slowly dollies back away from the subject",
+ "label": "Dolly out"
+ },
+ {
+ "value": "zooms in slowly",
+ "label": "Slow zoom in"
+ },
+ {
+ "value": "zooms out slowly",
+ "label": "Slow zoom out"
+ },
+ {
+ "value": "crash-zooms in fast on the subject",
+ "label": "Crash zoom"
+ },
+ {
+ "value": "dolly-zooms, moving in while zooming out so the background stretches behind the subject",
+ "label": "Dolly zoom"
+ },
+ {
+ "value": "pans left",
+ "label": "Pan left"
+ },
+ {
+ "value": "pans right",
+ "label": "Pan right"
+ },
+ {
+ "value": "whip-pans fast to the side with motion blur",
+ "label": "Whip pan"
+ },
+ {
+ "value": "tilts up",
+ "label": "Tilt up"
+ },
+ {
+ "value": "tilts down",
+ "label": "Tilt down"
+ },
+ {
+ "value": "trucks left, sliding sideways",
+ "label": "Truck left"
+ },
+ {
+ "value": "trucks right, sliding sideways",
+ "label": "Truck right"
+ },
+ {
+ "value": "glides left on a slider, close to the subject",
+ "label": "Slider left"
+ },
+ {
+ "value": "glides right on a slider, close to the subject",
+ "label": "Slider right"
+ },
+ {
+ "value": "arcs left around the subject",
+ "label": "Arc left"
+ },
+ {
+ "value": "arcs right around the subject",
+ "label": "Arc right"
+ },
+ {
+ "value": "rises straight up, staying level",
+ "label": "Pedestal up"
+ },
+ {
+ "value": "lowers straight down, staying level",
+ "label": "Pedestal down"
+ },
+ {
+ "value": "cranes up and back, rising over the scene",
+ "label": "Crane up"
+ },
+ {
+ "value": "cranes down from above toward the subject",
+ "label": "Crane down"
+ },
+ {
+ "value": "tracks behind the subject as they move",
+ "label": "Tracking"
+ },
+ {
+ "value": "tracks alongside the subject, moving sideways with them",
+ "label": "Side tracking"
+ },
+ {
+ "value": "is handheld, with a slight natural shake",
+ "label": "Handheld"
+ },
+ {
+ "value": "shows the character's point of view, moving as their eyes would",
+ "label": "POV"
+ },
+ {
+ "value": "is rigged to the actor's body, so their face stays fixed in the frame while the world sways behind them",
+ "label": "Snorricam"
+ },
+ {
+ "value": "sweeps around the subject in one fast, precise robotic-arm move",
+ "label": "Robot arm"
+ },
+ {
+ "value": "racks focus from the foreground to the background",
+ "label": "Rack focus"
+ },
+ {
+ "value": "orbits the scene from above like a drone",
+ "label": "Drone orbit"
+ },
+ {
+ "value": "pulls back and up into a high aerial view",
+ "label": "Aerial pullback"
+ },
+ {
+ "value": "flies over the scene from high above like a helicopter",
+ "label": "Helicopter shot"
+ },
+ {
+ "value": "circles around a frozen moment in slow motion, bullet-time style",
+ "label": "Bullet time"
+ }
+ ],
+ "bind": []
+ },
+ {
+ "id": "tempo",
+ "type": "select",
+ "label": "Tempo",
+ "default": "",
+ "help": "The editing rhythm. Single shot keeps one take; Dynamic and Chaotic ask for cuts.",
+ "options": [
+ {
+ "value": "",
+ "label": "Auto"
+ },
+ {
+ "value": " Calm pacing: slow, unhurried movement in one long take.",
+ "label": "Calm"
+ },
+ {
+ "value": " Dynamic pacing: brisk movement and a quick cut to a closer angle halfway through.",
+ "label": "Dynamic"
+ },
+ {
+ "value": " Chaotic pacing: frantic energy, fast action and several rapid cuts between angles.",
+ "label": "Chaotic"
+ },
+ {
+ "value": " One continuous shot, no cuts.",
+ "label": "Single shot"
+ }
+ ],
+ "bind": []
+ },
+ {
+ "id": "genre",
+ "type": "select",
+ "label": "Genre",
+ "default": "",
+ "options": [
+ {
+ "value": "",
+ "label": "General"
+ },
+ {
+ "value": " from a drama",
+ "label": "Drama"
+ },
+ {
+ "value": " from a film noir",
+ "label": "Noir"
+ },
+ {
+ "value": " from a comedy",
+ "label": "Comedy"
+ },
+ {
+ "value": " from a horror film",
+ "label": "Horror"
+ },
+ {
+ "value": " from an action film",
+ "label": "Action"
+ },
+ {
+ "value": " from an epic",
+ "label": "Epic"
+ },
+ {
+ "value": " from a science-fiction film",
+ "label": "Sci-fi"
+ },
+ {
+ "value": " from a western",
+ "label": "Western"
+ }
+ ],
+ "bind": [],
+ "help": "The kind of film the still comes from."
+ },
+ {
+ "id": "era",
+ "type": "select",
+ "label": "Era",
+ "default": "",
+ "options": [
+ {
+ "value": "",
+ "label": "Any"
+ },
+ {
+ "value": " set in the 1920s",
+ "label": "1920s"
+ },
+ {
+ "value": " set in the 1950s",
+ "label": "1950s"
+ },
+ {
+ "value": " set in the 1960s",
+ "label": "1960s"
+ },
+ {
+ "value": " set in the 1970s",
+ "label": "1970s"
+ },
+ {
+ "value": " set in the 1980s",
+ "label": "1980s"
+ },
+ {
+ "value": " set in the 1990s",
+ "label": "1990s"
+ },
+ {
+ "value": " set in the 2000s",
+ "label": "2000s"
+ },
+ {
+ "value": " set in the present day",
+ "label": "Present day"
+ },
+ {
+ "value": " set in the near future",
+ "label": "Future"
+ }
+ ],
+ "bind": []
+ },
+ {
+ "id": "camera",
+ "type": "select",
+ "label": "Camera",
+ "default": "the full-frame digital cinema look, natural and smooth",
+ "options": [
+ {
+ "value": "the crisp, clean detail of 8K digital cinema",
+ "label": "Modular 8K Digital"
+ },
+ {
+ "value": "the full-frame digital cinema look, natural and smooth",
+ "label": "Full-Frame Cine Digital"
+ },
+ {
+ "value": "the rich detail and fine grain of large-format 70mm film",
+ "label": "Grand Format 70mm Film"
+ },
+ {
+ "value": "the polished Super 35 digital studio look",
+ "label": "Studio Digital S35"
+ },
+ {
+ "value": "the soft, grainy texture of 16mm film",
+ "label": "Classic 16mm Film"
+ },
+ {
+ "value": "the smooth, wide-latitude large-format digital look",
+ "label": "Premium Large Format Digital"
+ }
+ ]
+ },
+ {
+ "id": "lens",
+ "type": "select",
+ "label": "Lens",
+ "default": "a classic anamorphic widescreen look with oval bokeh and blue streak flares",
+ "options": [
+ {
+ "value": "tilt-shift selective focus",
+ "label": "Creative Tilt Lens"
+ },
+ {
+ "value": "subtle anamorphic oval bokeh and horizontal flares",
+ "label": "Compact Anamorphic"
+ },
+ {
+ "value": "extreme macro detail",
+ "label": "Extreme Macro"
+ },
+ {
+ "value": "the warm, slightly soft rendering of 1970s cinema glass",
+ "label": "70s Cinema Prime"
+ },
+ {
+ "value": "a classic anamorphic widescreen look with oval bokeh and blue streak flares",
+ "label": "Classic Anamorphic"
+ },
+ {
+ "value": "clean, sharp modern rendering",
+ "label": "Premium Modern Prime"
+ },
+ {
+ "value": "warm-toned cinematic rendering",
+ "label": "Warm Cinema Prime"
+ },
+ {
+ "value": "swirling vintage bokeh",
+ "label": "Swirl Bokeh Portrait"
+ },
+ {
+ "value": "soft vintage rendering with gentle flare",
+ "label": "Vintage Prime"
+ },
+ {
+ "value": "a halation glow around the highlights",
+ "label": "Halation Diffusion"
+ },
+ {
+ "value": "ultra-sharp clinical detail",
+ "label": "Clinical Sharp Prime"
+ }
+ ]
+ },
+ {
+ "id": "focal",
+ "type": "select",
+ "label": "Focal length",
+ "default": "a natural 35mm perspective",
+ "options": [
+ {
+ "value": "an ultra-wide 8mm perspective",
+ "label": "8 mm"
+ },
+ {
+ "value": "a wide-angle 14mm perspective",
+ "label": "14 mm"
+ },
+ {
+ "value": "a dynamic wide 24mm perspective",
+ "label": "24 mm"
+ },
+ {
+ "value": "a natural 35mm perspective",
+ "label": "35 mm"
+ },
+ {
+ "value": "a standard 50mm perspective",
+ "label": "50 mm"
+ },
+ {
+ "value": "a classic 85mm portrait perspective",
+ "label": "85 mm"
+ }
+ ]
+ },
+ {
+ "id": "aperture",
+ "type": "select",
+ "label": "Aperture",
+ "default": "aperture f/1.4, shallow depth of field, creamy bokeh",
+ "options": [
+ {
+ "value": "aperture f/1.4, shallow depth of field, creamy bokeh",
+ "label": "f/1.4"
+ },
+ {
+ "value": "aperture f/4, balanced depth of field",
+ "label": "f/4"
+ },
+ {
+ "value": "aperture f/11, deep focus clarity, sharp foreground to background",
+ "label": "f/11"
+ }
+ ]
+ },
+ {
+ "id": "lighting",
+ "type": "select",
+ "label": "Lighting",
+ "default": "cinematic lighting",
+ "options": [
+ {
+ "value": "cinematic lighting",
+ "label": "Auto"
+ },
+ {
+ "value": "the subject in silhouette against a bright background",
+ "label": "Silhouette"
+ },
+ {
+ "value": "lit only by practical lamps visible in the scene",
+ "label": "Practicals"
+ },
+ {
+ "value": "soft daylight from a single window at the side",
+ "label": "Window"
+ },
+ {
+ "value": "a hard light falling from straight above, deep shadows under the brow",
+ "label": "Overhead"
+ },
+ {
+ "value": "a strong light behind the subject, a glowing rim and flare",
+ "label": "Backlight"
+ },
+ {
+ "value": "two soft lights crossing from opposite sides",
+ "label": "Soft cross"
+ },
+ {
+ "value": "low-key lighting, mostly shadow, one small key light",
+ "label": "Low key"
+ },
+ {
+ "value": "colored light from neon signs, magenta and cyan",
+ "label": "Neon"
+ }
+ ],
+ "bind": []
+ },
+ {
+ "id": "palette",
+ "type": "select",
+ "label": "Color palette",
+ "default": "natural color science",
+ "options": [
+ {
+ "value": "natural color science",
+ "label": "Auto"
+ },
+ {
+ "value": "teal shadows and warm orange skin tones",
+ "label": "Teal and orange"
+ },
+ {
+ "value": "desaturated, high-contrast bleach-bypass color",
+ "label": "Bleach bypass"
+ },
+ {
+ "value": "warm amber and brown tones",
+ "label": "Warm amber"
+ },
+ {
+ "value": "cold blue and steel-gray tones",
+ "label": "Cold blue"
+ },
+ {
+ "value": "deep emerald greens with gold highlights",
+ "label": "Emerald and gold"
+ },
+ {
+ "value": "soft pastel colors, low contrast",
+ "label": "Pastel"
+ },
+ {
+ "value": "saturated magenta, cyan and violet",
+ "label": "Neon night"
+ },
+ {
+ "value": "faded film colors with lifted blacks",
+ "label": "Faded film"
+ },
+ {
+ "value": "black and white",
+ "label": "Monochrome"
+ },
+ {
+ "value": "sepia-toned",
+ "label": "Sepia"
+ },
+ {
+ "value": "deep crimson reds against black",
+ "label": "Crimson"
+ },
+ {
+ "value": "earthy ochre, olive and rust tones",
+ "label": "Earth tones"
+ }
+ ],
+ "bind": []
+ },
+ {
+ "id": "aspect",
+ "type": "select",
+ "label": "Aspect ratio",
+ "default": "16:9 (Widescreen)",
+ "options": [
+ {
+ "value": "16:9 (Widescreen)",
+ "label": "16:9",
+ "sets": [
+ {
+ "node": "still:18:6",
+ "field": "width",
+ "value": 1344
+ },
+ {
+ "node": "still:18:6",
+ "field": "height",
+ "value": 768
+ }
+ ]
+ },
+ {
+ "value": "21:9 (Ultrawide)",
+ "label": "21:9",
+ "sets": [
+ {
+ "node": "still:18:6",
+ "field": "width",
+ "value": 1536
+ },
+ {
+ "node": "still:18:6",
+ "field": "height",
+ "value": 640
+ }
+ ]
+ },
+ {
+ "value": "4:3 (Standard)",
+ "label": "4:3",
+ "sets": [
+ {
+ "node": "still:18:6",
+ "field": "width",
+ "value": 1152
+ },
+ {
+ "node": "still:18:6",
+ "field": "height",
+ "value": 864
+ }
+ ]
+ },
+ {
+ "value": "1:1 (Square)",
+ "label": "1:1",
+ "sets": [
+ {
+ "node": "still:18:6",
+ "field": "width",
+ "value": 1024
+ },
+ {
+ "node": "still:18:6",
+ "field": "height",
+ "value": 1024
+ }
+ ]
+ },
+ {
+ "value": "3:4 (Portrait Standard)",
+ "label": "3:4",
+ "sets": [
+ {
+ "node": "still:18:6",
+ "field": "width",
+ "value": 864
+ },
+ {
+ "node": "still:18:6",
+ "field": "height",
+ "value": 1152
+ }
+ ]
+ },
+ {
+ "value": "9:16 (Portrait Widescreen)",
+ "label": "9:16",
+ "sets": [
+ {
+ "node": "still:18:6",
+ "field": "width",
+ "value": 768
+ },
+ {
+ "node": "still:18:6",
+ "field": "height",
+ "value": 1344
+ }
+ ]
+ }
+ ],
+ "bind": [
+ {
+ "node": "403",
+ "field": "aspect_ratio"
+ }
+ ]
+ },
+ {
+ "id": "duration",
+ "type": "slider",
+ "label": "Seconds",
+ "min": 2,
+ "max": 10,
+ "step": 1,
+ "default": 5,
+ "bind": [
+ {
+ "node": "398:362",
+ "field": "value"
+ }
+ ]
+ },
+ {
+ "id": "enhance",
+ "type": "toggle",
+ "label": "Enhance prompt",
+ "default": false,
+ "help": "Rewrites the motion prompt with a small Gemma 4 model first; off, the shot follows the camera moves and tempo word for word",
+ "bind": [
+ {
+ "node": "398:383",
+ "field": "value"
+ }
+ ]
+ },
+ {
+ "id": "seed",
+ "type": "seed",
+ "label": "Seed",
+ "default": -1,
+ "bind": [
+ {
+ "node": "still:18:7",
+ "field": "seed"
+ },
+ {
+ "node": "398:339",
+ "field": "noise_seed"
+ }
+ ]
+ }
+ ],
+ "outputs": [
+ {
+ "node": "75",
+ "type": "video",
+ "label": "Video"
+ },
+ {
+ "node": "still:9",
+ "type": "image",
+ "label": "First frame"
+ }
+ ],
+ "models": [
+ {
+ "repo": "Lightricks/LTX-2.5",
+ "file": "diffusion_models/ltx-2.5-22b-distilled-transformer-comfy-int8-convrot.safetensors",
+ "dir": "diffusion_models",
+ "gb": 21.5,
+ "phase": "denoise",
+ "gated": true,
+ "license": "LTX-2.x Community License"
+ },
+ {
+ "repo": "Lightricks/LTX-2.5",
+ "file": "text_encoders/gemma4-12b-with-proj-ltx-2.5-comfy-int8-convrot.safetensors",
+ "dir": "text_encoders",
+ "gb": 15.37,
+ "phase": "encode",
+ "gated": true,
+ "license": "LTX-2.x Community License"
+ },
+ {
+ "repo": "Lightricks/LTX-2.5",
+ "file": "vae/ltx-2.5-video-vae-bf16.safetensors",
+ "dir": "vae",
+ "gb": 1.47,
+ "phase": "decode",
+ "gated": true,
+ "license": "LTX-2.x Community License"
+ },
+ {
+ "repo": "Lightricks/LTX-2.5",
+ "file": "vae/ltx-2.5-audio-vae-bf16.safetensors",
+ "dir": "vae",
+ "gb": 0.36,
+ "phase": "decode",
+ "gated": true,
+ "license": "LTX-2.x Community License"
+ },
+ {
+ "repo": "Lightricks/LTX-2.5",
+ "file": "latent_upscale_models/ltx-2.5-latent-spatial-upscaler-x2-bf16-1.0.safetensors",
+ "dir": "latent_upscale_models",
+ "gb": 1.0,
+ "phase": "aux",
+ "gated": true,
+ "license": "LTX-2.x Community License"
+ },
+ {
+ "repo": "Comfy-Org/gemma-4",
+ "file": "text_encoders/gemma4_e2b_it_int8_convrot.safetensors",
+ "dir": "text_encoders",
+ "gb": 5.2,
+ "phase": "encode",
+ "license": "Apache-2.0",
+ "optional": true
+ },
+ {
+ "repo": "black-forest-labs/flux-3-image-klein-comfy",
+ "file": "diffusion_models/flux3-image-klein-int8-convrot.safetensors",
+ "dir": "diffusion_models",
+ "gb": 5.83,
+ "phase": "denoise",
+ "gated": true,
+ "license": "FLUX Kommunity License"
+ },
+ {
+ "repo": "black-forest-labs/flux-3-image-klein-comfy",
+ "file": "text_encoders/qwen3vl_4b_int8_convrot.safetensors",
+ "dir": "text_encoders",
+ "gb": 4.86,
+ "phase": "encode",
+ "gated": true,
+ "license": "FLUX Kommunity License"
+ },
+ {
+ "repo": "black-forest-labs/flux-3-image-klein-comfy",
+ "file": "vae/flux2-vae.safetensors",
+ "dir": "vae",
+ "gb": 0.34,
+ "phase": "decode",
+ "gated": true,
+ "license": "FLUX Kommunity License"
+ }
+ ],
+ "credits": [
+ "LTX-2.5 by Lightricks",
+ "FLUX 3 Image Klein by Black Forest Labs",
+ "Workflow adapted from ComfyUI's official LTX-2.5 image-to-video and FLUX 3 Klein templates",
+ "Camera and lens vocabulary from open-higgsfield-ai (MIT)"
+ ],
+ "test": {
+ "prompt": "a lighthouse on a cliff at dusk",
+ "duration": 2
+ }
+}
diff --git a/apps/cinema-video/workflow.api.json b/apps/cinema-video/workflow.api.json
new file mode 100644
index 0000000..d8ef8c3
--- /dev/null
+++ b/apps/cinema-video/workflow.api.json
@@ -0,0 +1,883 @@
+{
+ "75": {
+ "class_type": "SaveVideo",
+ "inputs": {
+ "video": [
+ "398:370",
+ 0
+ ],
+ "filename_prefix": "freefield/cinema-video",
+ "format": "auto",
+ "format.codec": "auto"
+ },
+ "_meta": {
+ "title": "Save Video"
+ }
+ },
+ "398:338": {
+ "class_type": "RandomNoise",
+ "inputs": {
+ "noise_seed": 42
+ },
+ "_meta": {
+ "title": "RandomNoise"
+ }
+ },
+ "398:339": {
+ "class_type": "RandomNoise",
+ "inputs": {
+ "noise_seed": 900359092894726
+ },
+ "_meta": {
+ "title": "RandomNoise"
+ }
+ },
+ "398:340": {
+ "class_type": "LTXVConcatAVLatent",
+ "inputs": {
+ "video_latent": [
+ "398:349",
+ 0
+ ],
+ "audio_latent": [
+ "398:367",
+ 1
+ ]
+ },
+ "_meta": {
+ "title": "Concat AV Latent"
+ }
+ },
+ "398:341": {
+ "class_type": "KSamplerSelect",
+ "inputs": {
+ "sampler_name": "euler_ancestral"
+ },
+ "_meta": {
+ "title": "KSamplerSelect"
+ }
+ },
+ "398:344": {
+ "class_type": "SamplerCustomAdvanced",
+ "inputs": {
+ "noise": [
+ "398:339",
+ 0
+ ],
+ "guider": [
+ "398:388",
+ 0
+ ],
+ "sampler": [
+ "398:352",
+ 0
+ ],
+ "sigmas": [
+ "398:397",
+ 0
+ ],
+ "latent_image": [
+ "398:377",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "SamplerCustomAdvanced"
+ }
+ },
+ "398:348": {
+ "class_type": "LTXVLatentUpsampler",
+ "inputs": {
+ "samples": [
+ "398:367",
+ 0
+ ],
+ "upscale_model": [
+ "398:371",
+ 0
+ ],
+ "vae": [
+ "398:385",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "LTXVLatentUpsampler"
+ }
+ },
+ "398:349": {
+ "class_type": "LTXVImgToVideoInplace",
+ "inputs": {
+ "vae": [
+ "398:385",
+ 0
+ ],
+ "image": [
+ "398:350",
+ 0
+ ],
+ "latent": [
+ "398:348",
+ 0
+ ],
+ "bypass": [
+ "398:363",
+ 0
+ ],
+ "strength": 1
+ },
+ "_meta": {
+ "title": "LTXVImgToVideoInplace"
+ }
+ },
+ "398:350": {
+ "class_type": "LTXVPreprocess",
+ "inputs": {
+ "image": [
+ "398:351",
+ 0
+ ],
+ "img_compression": 18
+ },
+ "_meta": {
+ "title": "LTXV Preprocess"
+ }
+ },
+ "398:351": {
+ "class_type": "ResizeImageMaskNode",
+ "inputs": {
+ "input": [
+ "still:18:8",
+ 0
+ ],
+ "resize_type": "scale longer dimension",
+ "resize_type.longer_size": 1536,
+ "scale_method": "lanczos"
+ },
+ "_meta": {
+ "title": "Resize Image/Mask"
+ }
+ },
+ "398:352": {
+ "class_type": "KSamplerSelect",
+ "inputs": {
+ "sampler_name": "euler_ancestral"
+ },
+ "_meta": {
+ "title": "KSamplerSelect"
+ }
+ },
+ "398:353": {
+ "class_type": "ComfyMathExpression",
+ "inputs": {
+ "values.a": [
+ "398:372",
+ 0
+ ],
+ "expression": "a/2"
+ },
+ "_meta": {
+ "title": "Math Expression"
+ }
+ },
+ "398:355": {
+ "class_type": "ComfyMathExpression",
+ "inputs": {
+ "values.a": [
+ "398:360",
+ 0
+ ],
+ "expression": "a/2"
+ },
+ "_meta": {
+ "title": "Math Expression"
+ }
+ },
+ "398:356": {
+ "class_type": "EmptyLTXVLatentVideo",
+ "inputs": {
+ "width": [
+ "398:353",
+ 1
+ ],
+ "height": [
+ "398:355",
+ 1
+ ],
+ "length": [
+ "398:378",
+ 1
+ ],
+ "batch_size": 1
+ },
+ "_meta": {
+ "title": "Empty LTXV Latent Video"
+ }
+ },
+ "398:357": {
+ "class_type": "LTXVImgToVideoInplace",
+ "inputs": {
+ "vae": [
+ "398:385",
+ 0
+ ],
+ "image": [
+ "398:350",
+ 0
+ ],
+ "latent": [
+ "398:356",
+ 0
+ ],
+ "bypass": [
+ "398:363",
+ 0
+ ],
+ "strength": 0.7
+ },
+ "_meta": {
+ "title": "LTXVImgToVideoInplace"
+ }
+ },
+ "398:358": {
+ "class_type": "LTXVAudioVAEDecode",
+ "inputs": {
+ "samples": [
+ "398:369",
+ 1
+ ],
+ "audio_vae": [
+ "398:386",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "LTXV Audio VAE Decode"
+ }
+ },
+ "398:359": {
+ "class_type": "ComfyMathExpression",
+ "inputs": {
+ "values.a": [
+ "398:361",
+ 0
+ ],
+ "expression": "a"
+ },
+ "_meta": {
+ "title": "Math Expression (fps)"
+ }
+ },
+ "398:360": {
+ "class_type": "PrimitiveInt",
+ "inputs": {
+ "value": [
+ "403",
+ 1
+ ]
+ },
+ "_meta": {
+ "title": "Height"
+ }
+ },
+ "398:361": {
+ "class_type": "PrimitiveInt",
+ "inputs": {
+ "value": 24
+ },
+ "_meta": {
+ "title": "Frame Rate"
+ }
+ },
+ "398:362": {
+ "class_type": "PrimitiveInt",
+ "inputs": {
+ "value": 5
+ },
+ "_meta": {
+ "title": "Duration"
+ }
+ },
+ "398:363": {
+ "class_type": "PrimitiveBoolean",
+ "inputs": {
+ "value": false
+ },
+ "_meta": {
+ "title": "Switch to Text to Video?"
+ }
+ },
+ "398:364": {
+ "class_type": "CLIPTextEncode",
+ "inputs": {
+ "clip": [
+ "398:387",
+ 0
+ ],
+ "text": [
+ "398:382",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "CLIP Text Encode (Prompt)"
+ }
+ },
+ "398:365": {
+ "class_type": "LTXVConditioning",
+ "inputs": {
+ "positive": [
+ "398:364",
+ 0
+ ],
+ "negative": [
+ "398:373",
+ 0
+ ],
+ "frame_rate": [
+ "398:359",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "LTXVConditioning"
+ }
+ },
+ "398:366": {
+ "class_type": "LTXVEmptyLatentAudio",
+ "inputs": {
+ "audio_vae": [
+ "398:386",
+ 0
+ ],
+ "frames_number": [
+ "398:378",
+ 1
+ ],
+ "frame_rate": [
+ "398:359",
+ 1
+ ],
+ "batch_size": 1
+ },
+ "_meta": {
+ "title": "Empty LTXV Latent Audio"
+ }
+ },
+ "398:367": {
+ "class_type": "LTXVSeparateAVLatent",
+ "inputs": {
+ "av_latent": [
+ "398:344",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "Separate AV Latent"
+ }
+ },
+ "398:368": {
+ "class_type": "SamplerCustomAdvanced",
+ "inputs": {
+ "noise": [
+ "398:338",
+ 0
+ ],
+ "guider": [
+ "398:391",
+ 0
+ ],
+ "sampler": [
+ "398:341",
+ 0
+ ],
+ "sigmas": [
+ "398:396",
+ 0
+ ],
+ "latent_image": [
+ "398:340",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "SamplerCustomAdvanced"
+ }
+ },
+ "398:369": {
+ "class_type": "LTXVSeparateAVLatent",
+ "inputs": {
+ "av_latent": [
+ "398:368",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "Separate AV Latent"
+ }
+ },
+ "398:370": {
+ "class_type": "CreateVideo",
+ "inputs": {
+ "images": [
+ "398:374",
+ 0
+ ],
+ "audio": [
+ "398:358",
+ 0
+ ],
+ "fps": [
+ "398:359",
+ 0
+ ],
+ "bit_depth": 8
+ },
+ "_meta": {
+ "title": "Create Video"
+ }
+ },
+ "398:371": {
+ "class_type": "LatentUpscaleModelLoader",
+ "inputs": {
+ "model_name": "ltx-2.5-latent-spatial-upscaler-x2-bf16-1.0.safetensors"
+ },
+ "_meta": {
+ "title": "Load Latent Upscale Model"
+ }
+ },
+ "398:372": {
+ "class_type": "PrimitiveInt",
+ "inputs": {
+ "value": [
+ "403",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "Width"
+ }
+ },
+ "398:373": {
+ "class_type": "CLIPTextEncode",
+ "inputs": {
+ "clip": [
+ "398:387",
+ 0
+ ],
+ "text": "pc game, console game, video game, cartoon, childish, ugly"
+ },
+ "_meta": {
+ "title": "CLIP Text Encode (Prompt)"
+ }
+ },
+ "398:374": {
+ "class_type": "VAEDecodeTiled",
+ "inputs": {
+ "samples": [
+ "398:369",
+ 0
+ ],
+ "vae": [
+ "398:385",
+ 0
+ ],
+ "tile_size": 512,
+ "overlap": 64,
+ "temporal_size": 64,
+ "temporal_overlap": 16
+ },
+ "_meta": {
+ "title": "VAE Decode (Tiled)"
+ }
+ },
+ "398:376": {
+ "class_type": "PrimitiveStringMultiline",
+ "inputs": {
+ "value": "Egyptian royal in blue-and-gold headdress and high collar, white dress with golden embroidery and armbands, desert, robot soldiers in formation left and right. She walks steadily forward, head held level and gaze fixed ahead—no dipping or lowering of the head. The camera performs a single, smooth push-in only: starting in a wider shot of her, the robots, and the desert, it moves steadily forward until she is in a medium or medium-close frame, then holds. She stops, posture and head still upright, and says: “The old gods are silent. I am not.” Robot soldiers shift or march in place; sand and fabric move with the wind. No pull-back; the only camera move is the continuous push-in."
+ },
+ "_meta": {
+ "title": "Prompt"
+ }
+ },
+ "398:377": {
+ "class_type": "LTXVConcatAVLatent",
+ "inputs": {
+ "video_latent": [
+ "398:357",
+ 0
+ ],
+ "audio_latent": [
+ "398:366",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "Concat AV Latent"
+ }
+ },
+ "398:378": {
+ "class_type": "ComfyMathExpression",
+ "inputs": {
+ "values.a": [
+ "398:362",
+ 0
+ ],
+ "values.b": [
+ "398:361",
+ 0
+ ],
+ "expression": "a * b + 1"
+ },
+ "_meta": {
+ "title": "Math Expression (length)"
+ }
+ },
+ "398:380": {
+ "class_type": "TextGenerateLTX2Prompt",
+ "inputs": {
+ "clip": [
+ "398:393",
+ 0
+ ],
+ "image": [
+ "398:350",
+ 0
+ ],
+ "prompt": [
+ "398:376",
+ 0
+ ],
+ "max_length": 600,
+ "sampling_mode": "on",
+ "sampling_mode.temperature": 0.7,
+ "sampling_mode.top_k": 64,
+ "sampling_mode.top_p": 0.95,
+ "sampling_mode.min_p": 0.05,
+ "sampling_mode.repetition_penalty": 1.15,
+ "sampling_mode.seed": 0,
+ "sampling_mode.presence_penalty": 0,
+ "thinking": false,
+ "use_default_template": true
+ },
+ "_meta": {
+ "title": "Generate LTX2 Prompt"
+ }
+ },
+ "398:382": {
+ "class_type": "ComfySwitchNode",
+ "inputs": {
+ "on_false": [
+ "398:376",
+ 0
+ ],
+ "on_true": [
+ "398:380",
+ 0
+ ],
+ "switch": [
+ "398:383",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "If/Else Switch"
+ }
+ },
+ "398:383": {
+ "class_type": "PrimitiveBoolean",
+ "inputs": {
+ "value": true
+ },
+ "_meta": {
+ "title": "Boolean (Enable Prompt Enhance)"
+ }
+ },
+ "398:384": {
+ "class_type": "UNETLoader",
+ "inputs": {
+ "unet_name": "ltx-2.5-22b-distilled-transformer-comfy-int8-convrot.safetensors",
+ "weight_dtype": "default"
+ },
+ "_meta": {
+ "title": "Load Diffusion Model"
+ }
+ },
+ "398:385": {
+ "class_type": "VAELoader",
+ "inputs": {
+ "vae_name": "ltx-2.5-video-vae-bf16.safetensors"
+ },
+ "_meta": {
+ "title": "Load VAE"
+ }
+ },
+ "398:386": {
+ "class_type": "VAELoader",
+ "inputs": {
+ "vae_name": "ltx-2.5-audio-vae-bf16.safetensors"
+ },
+ "_meta": {
+ "title": "Load VAE"
+ }
+ },
+ "398:387": {
+ "class_type": "CLIPLoader",
+ "inputs": {
+ "clip_name": "gemma4-12b-with-proj-ltx-2.5-comfy-int8-convrot.safetensors",
+ "type": "ltxv",
+ "device": "default"
+ },
+ "_meta": {
+ "title": "Load CLIP"
+ }
+ },
+ "398:388": {
+ "class_type": "LTXVDualCFGGuider",
+ "inputs": {
+ "model": [
+ "398:384",
+ 0
+ ],
+ "positive": [
+ "398:365",
+ 0
+ ],
+ "negative": [
+ "398:365",
+ 1
+ ],
+ "video_cfg": 1,
+ "audio_cfg": 1
+ },
+ "_meta": {
+ "title": "LTXV Dual CFG Guider"
+ }
+ },
+ "398:391": {
+ "class_type": "LTXVDualCFGGuider",
+ "inputs": {
+ "model": [
+ "398:384",
+ 0
+ ],
+ "positive": [
+ "398:365",
+ 0
+ ],
+ "negative": [
+ "398:365",
+ 1
+ ],
+ "video_cfg": 1,
+ "audio_cfg": 1
+ },
+ "_meta": {
+ "title": "LTXV Dual CFG Guider"
+ }
+ },
+ "398:393": {
+ "class_type": "CLIPLoader",
+ "inputs": {
+ "clip_name": "gemma4_e2b_it_int8_convrot.safetensors",
+ "type": "ltxv",
+ "device": "default"
+ },
+ "_meta": {
+ "title": "Load CLIP"
+ }
+ },
+ "398:396": {
+ "class_type": "ManualSigmas",
+ "inputs": {
+ "sigmas": "0.85, 0.7250, 0.4219, 0.0"
+ },
+ "_meta": {
+ "title": "ManualSigmas"
+ }
+ },
+ "398:397": {
+ "class_type": "ManualSigmas",
+ "inputs": {
+ "sigmas": "1.0, 0.99375, 0.9875, 0.98125, 0.975, 0.909375, 0.725, 0.421875, 0.0"
+ },
+ "_meta": {
+ "title": "ManualSigmas"
+ }
+ },
+ "403": {
+ "class_type": "ResolutionSelector",
+ "inputs": {
+ "aspect_ratio": "16:9 (Widescreen)",
+ "megapixels": 0.9,
+ "multiple": 32
+ },
+ "_meta": {
+ "title": "Resolution Selector"
+ }
+ },
+ "still:9": {
+ "class_type": "SaveImage",
+ "inputs": {
+ "images": [
+ "still:18:8",
+ 0
+ ],
+ "filename_prefix": "freefield/cinema-video"
+ },
+ "_meta": {
+ "title": "Save Image"
+ }
+ },
+ "still:18:1": {
+ "class_type": "UNETLoader",
+ "inputs": {
+ "unet_name": "flux3-image-klein-int8-convrot.safetensors",
+ "weight_dtype": "default"
+ },
+ "_meta": {
+ "title": "Load Diffusion Model"
+ }
+ },
+ "still:18:2": {
+ "class_type": "CLIPLoader",
+ "inputs": {
+ "clip_name": "qwen3vl_4b_int8_convrot.safetensors",
+ "type": "flux3",
+ "device": "default"
+ },
+ "_meta": {
+ "title": "Load CLIP"
+ }
+ },
+ "still:18:3": {
+ "class_type": "VAELoader",
+ "inputs": {
+ "vae_name": "flux2-vae.safetensors"
+ },
+ "_meta": {
+ "title": "Load VAE"
+ }
+ },
+ "still:18:4": {
+ "class_type": "CLIPTextEncode",
+ "inputs": {
+ "clip": [
+ "still:18:2",
+ 0
+ ],
+ "text": [
+ "still:18:13",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "Positive Prompt"
+ }
+ },
+ "still:18:5": {
+ "class_type": "CLIPTextEncode",
+ "inputs": {
+ "clip": [
+ "still:18:2",
+ 0
+ ],
+ "text": ""
+ },
+ "_meta": {
+ "title": "Negative Prompt (empty = reference default)"
+ }
+ },
+ "still:18:6": {
+ "class_type": "EmptyFlux2LatentImage",
+ "inputs": {
+ "batch_size": 1,
+ "width": 1344,
+ "height": 768
+ },
+ "_meta": {
+ "title": "Empty Flux 2 Latent"
+ }
+ },
+ "still:18:7": {
+ "class_type": "KSampler",
+ "inputs": {
+ "model": [
+ "still:18:1",
+ 0
+ ],
+ "positive": [
+ "still:18:4",
+ 0
+ ],
+ "negative": [
+ "still:18:5",
+ 0
+ ],
+ "latent_image": [
+ "still:ff_res",
+ 0
+ ],
+ "seed": 3,
+ "steps": 15,
+ "cfg": 1,
+ "sampler_name": "er_sde",
+ "scheduler": "simple",
+ "denoise": 1
+ },
+ "_meta": {
+ "title": "KSampler"
+ }
+ },
+ "still:18:8": {
+ "class_type": "VAEDecode",
+ "inputs": {
+ "samples": [
+ "still:18:7",
+ 0
+ ],
+ "vae": [
+ "still:18:3",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "VAE Decode"
+ }
+ },
+ "still:18:13": {
+ "class_type": "PreviewAny",
+ "inputs": {
+ "source": [
+ "still:18:17",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "Preview as Text"
+ }
+ },
+ "still:18:17": {
+ "class_type": "PrimitiveStringMultiline",
+ "inputs": {
+ "value": "A rainy neon street in Mexico City at night, cinematic, 35mm"
+ },
+ "_meta": {
+ "title": "Text (Multiline)"
+ }
+ },
+ "still:ff_res": {
+ "class_type": "LatentUpscaleBy",
+ "inputs": {
+ "samples": [
+ "still:18:6",
+ 0
+ ],
+ "upscale_method": "nearest-exact",
+ "scale_by": 1.0
+ },
+ "_meta": {
+ "title": "Resolution (1K, 1.5K, 2K)"
+ }
+ }
+}
diff --git a/docs/vram-map.json b/docs/vram-map.json
index 95345f3..cc21411 100644
--- a/docs/vram-map.json
+++ b/docs/vram-map.json
@@ -3018,6 +3018,32 @@
"measured_peak_gb": 44.15,
"measured_on": "L40S · 20261024-035222-l40s"
},
+ {
+ "id": "cinema-video",
+ "name": "Cinema Studio Video",
+ "section": "video",
+ "pack": "video-ltx25",
+ "status": "ready",
+ "whole_gb": 50.73,
+ "phases_gb": {
+ "encode": 20.23,
+ "denoise": 27.33,
+ "denoise2": 0.0,
+ "decode": 2.17,
+ "aux": 1.0
+ },
+ "largest_phase": "denoise",
+ "largest_phase_gb": 27.33,
+ "optional_gb": 5.2,
+ "biggest_file": {
+ "name": "ltx-2.5-22b-distilled-transformer-comfy-int8-convrot.safetensors",
+ "gb": 21.5
+ },
+ "verdict_24gb": "needs Modal",
+ "modal_gpu": "L40S (48 GB), by phases",
+ "measured_peak_gb": null,
+ "measured_on": null
+ },
{
"id": "smoke",
"name": "Smoke test",
diff --git a/docs/vram-map.md b/docs/vram-map.md
index b21fc40..89ee340 100644
--- a/docs/vram-map.md
+++ b/docs/vram-map.md
@@ -128,5 +128,6 @@ is not the least the app needs.
| `h3-photo` | ready | 51.5 GB | encode 27.1 GB | qwen3vl_32b_minimax_h3_int8_convrot.safetensors (27.1) | needs Modal | L40S (48 GB), by phases | 49.5 GB (H100) |
| `h3-video` | ready | 51.5 GB | encode 27.1 GB | qwen3vl_32b_minimax_h3_int8_convrot.safetensors (27.1) | needs Modal | L40S (48 GB), by phases | 48.3 GB (H100) |
| `reshoot` | ready | 54.8 GB | encode 27.1 GB | qwen3vl_32b_minimax_h3_int8_convrot.safetensors (27.1) | needs Modal | L40S (48 GB), by phases | 44.1 GB (L40S) |
+| `cinema-video` | ready | 50.7 GB (+5.2 optional) | denoise 27.3 GB | ltx-2.5-22b-distilled-transformer-comfy-int8-convrot.safetensors (21.5) | needs Modal | L40S (48 GB), by phases | not measured |
| `smoke` | ready | 0.0 GB | encode 0.0 GB | — | no models | any | not measured |
| `smoke-invert` | ready | 0.0 GB | encode 0.0 GB | — | no models | any | not measured |
diff --git a/lab/cases.json b/lab/cases.json
index 107f7a6..3c62128 100644
--- a/lab/cases.json
+++ b/lab/cases.json
@@ -569,6 +569,10 @@
{"id": "inpaint-jacket", "showcase": true, "app": "inpaint", "values": {"image": "@case:ref-face-a", "mask": "asset:mask-face-a-jacket.png", "instruction": "a red leather jacket over a white t-shirt"},
"note": "Inpaint: only the painted jacket changes (lab/assets/mask-face-a-jacket.png, drawn over ref-face-a). Face, hair and wall untouched, and no seam at the edge?"},
+ {"id": "cinema-video-detective", "showcase": true, "app": "cinema-video", "values": {"prompt": "A detective in a trench coat lights a cigarette under a streetlamp on a rainy night, then looks up as headlights sweep across his face", "camera": "the rich detail and fine grain of large-format 70mm film", "lens": "the warm, slightly soft rendering of 1970s cinema glass", "moves": ["slowly dollies in toward the subject"], "tempo": " One continuous shot, no cuts.", "duration": 5, "enhance": false}, "note": "Cinema Studio video, the still's showcase look (70mm grain, 1970s glass) as the first frame, one dolly-in, single shot, enhancer off. Check: grain and warm vintage look hold to the last frame, the camera pushes in, no cut, no camera drawn."},
+ {"id": "cinema-video-detective-enh", "app": "cinema-video", "values": {"prompt": "A detective in a trench coat lights a cigarette under a streetlamp on a rainy night, then looks up as headlights sweep across his face", "camera": "the rich detail and fine grain of large-format 70mm film", "lens": "the warm, slightly soft rendering of 1970s cinema glass", "moves": ["slowly dollies in toward the subject"], "tempo": " One continuous shot, no cuts.", "duration": 5, "enhance": true}, "note": "The same with the Gemma enhancer on: does the rewrite keep the dolly-in and the single take? Picks the enhancer's default."},
+ {"id": "cinema-video-western-moves", "app": "cinema-video", "values": {"prompt": "A lone rider stops at the edge of a canyon and looks back", "genre": " from a western", "era": " set in the 1970s", "lighting": "a strong light behind the subject, a glowing rim and flare", "palette": "earthy ochre, olive and rust tones", "aspect": "21:9 (Ultrawide)", "moves": ["cranes down from above toward the subject", "arcs right around the subject"], "tempo": " Calm pacing: slow, unhurried movement in one long take.", "duration": 5, "enhance": false}, "note": "Two camera moves in order (crane down, then arc right), calm tempo, 21:9 with the western look. Check: both moves, in that order."},
+ {"id": "cinema-video-market-dynamic", "app": "cinema-video", "values": {"prompt": "A courier on a bicycle races through a crowded night market, weaving between the stalls", "genre": " from an action film", "lighting": "colored light from neon signs, magenta and cyan", "moves": ["tracks behind the subject as they move", "whip-pans fast to the side with motion blur"], "tempo": " Dynamic pacing: brisk movement and a quick cut to a closer angle halfway through.", "duration": 5, "enhance": false}, "note": "Dynamic tempo: does LTX-2.5 cut to a closer angle when asked, or does it stay one take? Tracking then whip pan."},
{"id": "ref-tpl-sketch", "app": "z-image", "values": {"prompt": "A rough pencil sketch on white paper of a cat sitting on a windowsill next to a potted plant, loose lines, no color", "width": 1024, "height": 1024},
"note": "Reference sketch for Sketch to Real."},
{"id": "ref-tpl-sign", "app": "z-image", "values": {"prompt": "Photo of a small bakery storefront with a wooden sign above the door that reads OPEN in bold white letters, daylight, photorealistic", "width": 1280, "height": 768},
diff --git a/lab/core.py b/lab/core.py
index 8c3b64b..541b923 100644
--- a/lab/core.py
+++ b/lab/core.py
@@ -108,18 +108,46 @@ def set_value(value, values: dict):
return render(value, values) if isinstance(value, str) and PLACEHOLDER.search(value) else value
+def picks(inp: dict, raw) -> list[str]:
+ """A multiple select's value: the picked option values in the order given, no repeats (as server/runner.ts)."""
+ items = raw if isinstance(raw, list) else ([] if raw in (None, "") else [raw])
+ allowed = [str(o["value"]) for o in inp.get("options", [])]
+ out: list[str] = []
+ for r in items:
+ if str(r) not in allowed:
+ raise ValueError(f'{inp["id"]}: "{r}" is not one of the options')
+ if str(r) and str(r) not in out:
+ out.append(str(r))
+ if inp["multiple"].get("max") and len(out) > inp["multiple"]["max"]:
+ raise ValueError(f'{inp["id"]}: at most {inp["multiple"]["max"]}')
+ return out
+
+
+def text_values(manifest: dict, values: dict) -> dict:
+ """Values as the workflow gets them: multiple selects joined (prefix + join + suffix, "" when none)."""
+ out = dict(values)
+ for inp in manifest.get("inputs", []):
+ if inp.get("multiple") and inp["id"] in values:
+ m, items = inp["multiple"], values[inp["id"]]
+ out[inp["id"]] = f'{m.get("prefix", "")}{m.get("join", ", ").join(items)}{m.get("suffix", "")}' if items else ""
+ return out
+
+
def resolve_values(manifest: dict, given: dict) -> dict:
values = {}
for inp in manifest.get("inputs", []):
v = given.get(inp["id"], inp.get("default"))
if inp["type"] == "seed" and v in (None, -1, "-1"):
v = 42 # fixed, so cases are comparable
+ if inp.get("multiple"):
+ v = picks(inp, v)
if v is not None:
values[inp["id"]] = v
return values
def apply(manifest: dict, api: dict, values: dict, preset: str | None = None) -> None:
+ values = text_values(manifest, values)
for inp in manifest.get("inputs", []):
if inp["id"] not in values:
continue
diff --git a/packs/index.json b/packs/index.json
index 2718296..a4aeb2e 100644
--- a/packs/index.json
+++ b/packs/index.json
@@ -141,6 +141,7 @@
"behind-the-scenes",
"camera-copy",
"chameleon",
+ "cinema-video",
"cloud-surf",
"dub",
"genjutsu",
diff --git a/packs/video-ltx25.json b/packs/video-ltx25.json
index 5869a4d..ac1d71f 100644
--- a/packs/video-ltx25.json
+++ b/packs/video-ltx25.json
@@ -7,6 +7,7 @@
"behind-the-scenes",
"camera-copy",
"chameleon",
+ "cinema-video",
"cloud-surf",
"dub",
"genjutsu",
@@ -52,6 +53,7 @@
"license": "FLUX Kommunity License",
"used_by": [
"chameleon",
+ "cinema-video",
"cloud-surf",
"mixed-media",
"morph",
@@ -74,6 +76,7 @@
"behind-the-scenes",
"camera-copy",
"chameleon",
+ "cinema-video",
"cloud-surf",
"dub",
"genjutsu",
@@ -126,6 +129,7 @@
"asmr-product",
"asmr-whisper",
"behind-the-scenes",
+ "cinema-video",
"idol",
"kick-ad",
"magic-button",
@@ -293,6 +297,7 @@
"behind-the-scenes",
"camera-copy",
"chameleon",
+ "cinema-video",
"cloud-surf",
"dub",
"genjutsu",
@@ -334,6 +339,7 @@
"behind-the-scenes",
"camera-copy",
"chameleon",
+ "cinema-video",
"cloud-surf",
"dub",
"idol",
@@ -367,6 +373,7 @@
"license": "FLUX Kommunity License",
"used_by": [
"chameleon",
+ "cinema-video",
"cloud-surf",
"mixed-media",
"morph",
@@ -384,6 +391,7 @@
"license": "FLUX Kommunity License",
"used_by": [
"chameleon",
+ "cinema-video",
"cloud-surf",
"mixed-media",
"morph",
@@ -406,6 +414,7 @@
"behind-the-scenes",
"camera-copy",
"chameleon",
+ "cinema-video",
"cloud-surf",
"dub",
"genjutsu",
@@ -448,6 +457,7 @@
"behind-the-scenes",
"camera-copy",
"chameleon",
+ "cinema-video",
"cloud-surf",
"dub",
"genjutsu",
diff --git a/schema/app.schema.json b/schema/app.schema.json
index 90b346d..5387ff8 100644
--- a/schema/app.schema.json
+++ b/schema/app.schema.json
@@ -43,6 +43,13 @@
"notes": { "type": "string" }
}
},
+ "modes": {
+ "type": "array",
+ "minItems": 2,
+ "uniqueItems": true,
+ "items": { "type": "string", "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$" },
+ "description": "Sibling apps shown as a switch at the top of the form (Cinema Studio: image, video). Each app in the list includes itself and lists the same ids in the same order."
+ },
"inputs": { "type": "array", "items": { "$ref": "#/$defs/input" } },
"presets": { "type": "array", "items": { "$ref": "#/$defs/preset" } },
"outputs": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/output" } },
@@ -121,6 +128,18 @@
"type": "boolean",
"description": "Select only. lab/publish.py keeps one example per option and the UI shows the options as cards with those examples (the effects picker)."
},
+ "multiple": {
+ "type": "object",
+ "additionalProperties": false,
+ "description": "Select only: several options at once (camera moves in a shot, traits of a character). The value is the list of picked option values, in the order picked; templates and binds get them joined: prefix + values joined by join + suffix, or \"\" when none is picked. Its options cannot carry sets.",
+ "properties": {
+ "max": { "type": "integer", "minimum": 2 },
+ "join": { "type": "string", "description": "Between two values. Default \", \"." },
+ "prefix": { "type": "string" },
+ "suffix": { "type": "string" },
+ "ordered": { "type": "boolean", "description": "The order of picking matters (camera moves): the UI numbers the picks." }
+ }
+ },
"paint": {
"type": "string",
"description": "Image inputs only: the id of the image input this one is painted over in the web UI (inpaint). The upload is a white-on-black mask of that image."
diff --git a/server/registry.ts b/server/registry.ts
index 37a3f22..e67d152 100644
--- a/server/registry.ts
+++ b/server/registry.ts
@@ -20,6 +20,8 @@ export type Input = {
step?: number;
options?: Option[];
gallery?: boolean;
+ /** selects: several options at once, in the order picked; templates get them joined */
+ multiple?: { max?: number; join?: string; prefix?: string; suffix?: string; ordered?: boolean };
/** image inputs: the image input this one is painted over in the web UI (a white-on-black mask) */
paint?: string;
limits?: { max_mb?: number; seconds?: [number, number] };
@@ -46,6 +48,8 @@ export type AppManifest = {
section: "image" | "video" | "audio" | "utility";
summary?: string;
higgsfield_feature?: string;
+ /** sibling apps shown as a switch at the top of the form (Cinema Studio: image, video) */
+ modes?: string[];
pack: string;
status: "draft" | "ready";
workflow?: string;
@@ -135,6 +139,16 @@ function checkGraph(app: App, problems: Problem[], severity: Problem["severity"]
if (input.type !== "image") say(`input "${input.id}": only an image input can be painted (paint)`);
else if (!src || src.type !== "image" || src === input) say(`input "${input.id}": paint names "${input.paint}", which is not another image input`);
}
+ for (const input of app.inputs) {
+ if (!input.multiple) continue;
+ if (input.type !== "select") { say(`input "${input.id}": only a select can be multiple`); continue; }
+ if ((input.options ?? []).some((o) => o.sets?.length)) say(`input "${input.id}": the options of a multiple select cannot carry sets`);
+ if (input.gallery) say(`input "${input.id}": a multiple select cannot be a gallery`);
+ const values = new Set((input.options ?? []).map((o) => String(o.value)));
+ if (input.default !== undefined && (!Array.isArray(input.default) || input.default.some((v) => !values.has(String(v))))) {
+ say(`input "${input.id}": the default of a multiple select is a list of its option values`);
+ }
+ }
for (const p of app.presets ?? []) for (const s of p.sets) has(s.node, s.field, `preset "${p.id}"`);
for (const input of app.inputs) {
for (const o of input.options ?? []) for (const s of o.sets ?? []) has(s.node, s.field, `input "${input.id}" option "${o.label}"`);
@@ -208,5 +222,16 @@ export function loadRegistry(root = repoRoot()): { apps: App[]; problems: Proble
if (app.graph) checkGraph(app, problems, severity);
apps.push(app);
}
+ // modes: every app in the switch exists and lists the same ids in the same order
+ const byId = new Map(apps.map((a) => [a.id, a]));
+ for (const app of apps) {
+ if (!app.modes) continue;
+ if (!app.modes.includes(app.id)) problems.push({ app: app.id, severity: "error", message: "modes must include the app itself" });
+ for (const id of app.modes) {
+ const other = byId.get(id);
+ if (!other) problems.push({ app: app.id, severity: "error", message: `modes: app "${id}" does not exist` });
+ else if (JSON.stringify(other.modes ?? []) !== JSON.stringify(app.modes)) problems.push({ app: app.id, severity: "error", message: `modes: "${id}" does not list the same apps` });
+ }
+ }
return { apps, problems };
}
diff --git a/server/runner.ts b/server/runner.ts
index 17674a5..4c1bad4 100644
--- a/server/runner.ts
+++ b/server/runner.ts
@@ -30,6 +30,7 @@ function coerce(input: Input, raw: unknown): unknown {
case "toggle":
return raw === true || raw === "true" || raw === "1" || raw === "on";
case "select": {
+ if (input.multiple) return picks(input, raw);
const opts = input.options ?? [];
const hit = opts.find((o) => o.value === raw || String(o.value) === String(raw));
if (!hit) throw new InputError(`${input.id}: "${String(raw)}" is not one of the options`);
@@ -40,13 +41,48 @@ function coerce(input: Input, raw: unknown): unknown {
}
}
+/** A multiple select's value: the picked option values in the order picked, no repeats. The form sends a JSON list. */
+function picks(input: Input, raw: unknown): string[] {
+ let list: unknown[];
+ if (Array.isArray(raw)) list = raw;
+ else if (typeof raw === "string" && raw.trim().startsWith("[")) {
+ try { list = JSON.parse(raw); } catch { throw new InputError(`${input.id}: expected a list`); }
+ if (!Array.isArray(list)) throw new InputError(`${input.id}: expected a list`);
+ } else list = raw === "" || raw === null || raw === undefined ? [] : [raw];
+ const out: string[] = [];
+ for (const r of list) {
+ const hit = (input.options ?? []).find((o) => String(o.value) === String(r));
+ if (!hit) throw new InputError(`${input.id}: "${String(r)}" is not one of the options`);
+ const v = String(hit.value);
+ if (v && !out.includes(v)) out.push(v);
+ }
+ const max = input.multiple?.max;
+ if (max && out.length > max) throw new InputError(`${input.id}: at most ${max}`);
+ return out;
+}
+
+/** The picks of a multiple select as the one string templates and binds get. */
+export function joinPicks(input: Input, list: unknown): string {
+ const items = Array.isArray(list) ? list.map(String).filter(Boolean) : [];
+ if (!items.length) return "";
+ const m = input.multiple ?? {};
+ return `${m.prefix ?? ""}${items.join(m.join ?? ", ")}${m.suffix ?? ""}`;
+}
+
+/** Values as the workflow gets them: multiple selects joined. */
+export function textValues(app: App, values: Values): Values {
+ const out: Values = { ...values };
+ for (const input of app.inputs) if (input.multiple && values[input.id] !== undefined) out[input.id] = joinPicks(input, values[input.id]);
+ return out;
+}
+
/** Fill defaults, coerce types, check required fields. File inputs pass through as FileValue. */
export function resolveValues(app: App, values: Values): Values {
const out: Values = {};
for (const input of app.inputs) {
let v = values[input.id];
// "" is a choice when a select offers it ("Any" in a builder writes nothing); elsewhere it means "use the default"
- const emptyIsOption = input.type === "select" && (input.options ?? []).some((o) => o.value === "");
+ const emptyIsOption = input.type === "select" && (Boolean(input.multiple) || (input.options ?? []).some((o) => o.value === ""));
if (v === undefined || (v === "" && !emptyIsOption)) v = input.default;
if (input.type === "seed" && (v === undefined || v === -1 || v === "-1")) {
v = Math.floor(Math.random() * 2 ** 48);
@@ -93,6 +129,7 @@ export function applyInputs(
asset: (f: FileValue) => unknown,
presetId?: string,
): void {
+ values = textValues(app, values);
for (const input of app.inputs) {
const v = values[input.id];
if (v === undefined) continue;
diff --git a/server/server.ts b/server/server.ts
index 27727aa..b2bfde0 100644
--- a/server/server.ts
+++ b/server/server.ts
@@ -89,6 +89,7 @@ function publicApp(a: App) {
id: a.id, name: a.name, section: a.section, summary: a.summary ?? "", status: a.status, pack: a.pack,
runnable: runnable(a),
higgsfield_feature: a.higgsfield_feature ?? null,
+ modes: a.modes ?? null,
inputs: a.inputs.map(({ bind: _bind, options, ...rest }) => ({
...rest, ...(options ? { options: options.map(({ sets: _sets, ...o }) => o) } : {}),
})),
diff --git a/test/runner.test.ts b/test/runner.test.ts
index 4a83507..f1c4dac 100644
--- a/test/runner.test.ts
+++ b/test/runner.test.ts
@@ -59,6 +59,35 @@ test("cinema studio composes the prompt from every select", () => {
assert.ok(!text.includes("{"), "no placeholder left behind");
});
+test("a multiple select keeps the picks in order and templates get them joined", () => {
+ const app = byId("cinema-video");
+ const values = resolveValues(app, { prompt: "a fox in snow", moves: JSON.stringify(["slowly dollies in toward the subject", "pans left", "pans left"]), seed: 1 });
+ assert.deepEqual(values.moves, ["slowly dollies in toward the subject", "pans left"], "the form's JSON list, repeats dropped, order kept");
+ const wf = recorder();
+ applyInputs(app, values, wf, () => null);
+ const motion = wf.sets["398:376.value"] as string;
+ assert.match(motion, /^The camera slowly dollies in toward the subject, then pans left\. a fox in snow\. The look of a film: /);
+ assert.ok(!(wf.sets["still:18:17.value"] as string).includes("dollies"), "the first frame gets the look, not the moves");
+ assert.ok(!/camera|lens/i.test(wf.sets["still:18:17.value"] as string), "and no gear words, so Klein draws no camera");
+ // none picked is a choice: the moves vanish from the prompt instead of falling back to the default
+ const none = resolveValues(app, { prompt: "a fox in snow", moves: "[]", seed: 1 });
+ const wf2 = recorder();
+ applyInputs(app, none, wf2, () => null);
+ assert.match(wf2.sets["398:376.value"] as string, /^a fox in snow\. The look/);
+ assert.deepEqual(resolveValues(app, { prompt: "x", seed: 1 }).moves, ["slowly dollies in toward the subject"], "no value at all takes the default list");
+ assert.throws(() => resolveValues(app, { prompt: "x", moves: JSON.stringify(["flies to the moon"]) }), /not one of the options/);
+ assert.throws(() => resolveValues(app, { prompt: "x", moves: JSON.stringify(["pans left", "pans right", "tilts up", "tilts down"]) }), /at most 3/);
+});
+
+test("the aspect select sizes the first frame and the video together", () => {
+ const app = byId("cinema-video");
+ const wf = recorder();
+ applyInputs(app, resolveValues(app, { prompt: "x", aspect: "9:16 (Portrait Widescreen)", seed: 1 }), wf, () => null);
+ assert.equal(wf.sets["403.aspect_ratio"], "9:16 (Portrait Widescreen)");
+ assert.equal(wf.sets["still:18:6.width"], 768);
+ assert.equal(wf.sets["still:18:6.height"], 1344);
+});
+
test("file inputs go through the asset function", () => {
const app = byId("edit");
const file = { bytes: new Uint8Array([1]), name: "me.png" };
diff --git a/tools/build_apps.py b/tools/build_apps.py
index f2e6026..7dd96b5 100644
--- a/tools/build_apps.py
+++ b/tools/build_apps.py
@@ -371,6 +371,19 @@ def morph(api: Api, edit: Api) -> None:
put(api, "251:250", "value", False) # the motion prompt is written per transformation: no enhancer rewrite
+def cinema_video(api: Api, still: Api) -> None:
+ """Cinema Studio's video mode: the LTX-2.5 image-to-video template with its first frame drawn in the same graph
+ by the Cinema Studio still (FLUX 3 Image Klein, merged in as still:*). The selects that set the look (camera, lens,
+ lighting, palette) reach the picture through that frame, which Klein follows closely; LTX-2.5 then moves it with
+ the camera moves, the pacing, the action and the sound the prompt describes. The still is saved as a second output."""
+ merge(api, still, "still")
+ put(api, "still:9", "filename_prefix", "freefield/cinema-video-still")
+ load = find(api, "LoadImage")
+ rewire(api, [load, 0], ["still:18:8", 0])
+ drop(api, load)
+ put(api, find(api, "SaveVideo"), "filename_prefix", "freefield/cinema-video")
+
+
def ltx_union_control(api: Api, edit: Api) -> None:
"""Lightricks' Union Control IC-LoRA example (two stages) as a one-click restyle: the clip's first frame
is redrawn in the chosen look by FLUX 3 Klein (the `edit` pipeline, merged in under "edit:"), that still
@@ -666,6 +679,9 @@ def recipes(templates: Path, ltx: Path, info: dict, reshoot: Path | None = None)
out["video"] = tpl("video_ltx2_5_i2v.json")
out["speak"] = tpl("video_ltx2_5_i2v.json") # LTX-2.5 voices a quoted line itself; the manifest builds the prompt
out["video-t2v"] = tpl("video_ltx2_5_t2v.json")
+ cv = tpl("video_ltx2_5_i2v.json")
+ cinema_video(cv, cs)
+ out["cinema-video"] = cv
t = tpl("video_ltx2_5_flf2v.json")
add_lora_after(t, find(t, "UNETLoader"), "ltx2.3-transition.safetensors", 1.0)
diff --git a/tools/comfy_validate.py b/tools/comfy_validate.py
index 966be8d..038b16b 100644
--- a/tools/comfy_validate.py
+++ b/tools/comfy_validate.py
@@ -151,6 +151,10 @@ def app_variants(app_dir: Path) -> list[tuple[str, dict]]:
for i in manifest.get("inputs", []): # the runner turns -1 into a random seed; any fixed one will do here
if i["type"] == "seed" and values.get(i["id"]) in (None, -1, "-1"):
values[i["id"]] = 42
+ for i in manifest.get("inputs", []): # a multiple select reaches the workflow joined, as server/runner.ts writes it
+ if i.get("multiple") and isinstance(values.get(i["id"]), list):
+ m, items = i["multiple"], values[i["id"]]
+ values[i["id"]] = f'{m.get("prefix", "")}{m.get("join", ", ").join(map(str, items))}{m.get("suffix", "")}' if items else ""
def render(t: str) -> str:
import re
diff --git a/web/app.css b/web/app.css
index 27d5f16..6ec5866 100644
--- a/web/app.css
+++ b/web/app.css
@@ -306,6 +306,14 @@ pre.code { margin: 0; padding: 12px 14px; border-radius: 10px; background: #0d0d
.pop .opt:hover, .pop .opt:focus-visible { background: #27272b; }
.pop .opt .chk { margin-left: auto; color: var(--accent); visibility: hidden; }
.pop .opt[aria-selected="true"] .chk { visibility: visible; }
+/* a multiple select: picked options carry their number (the order they run in) or a check */
+.pop h4 .n { margin-left: 8px; text-transform: none; letter-spacing: 0; font-weight: 500; }
+.pop h4 .mini-link { float: right; border: 0; background: none; color: var(--dim); font: inherit; text-transform: none; letter-spacing: 0; cursor: pointer; padding: 0; }
+.pop h4 .mini-link:hover { color: var(--ink); }
+.multi-list { max-height: 360px; overflow-y: auto; }
+.pop .opt[aria-pressed="true"] { color: var(--ink); background: #1f1f23; }
+.pop .opt .pick { margin-left: auto; display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--accent); color: #0b0b0c; font-size: 11.5px; font-weight: 800; }
+.pop .opt .pick svg { width: 12px; height: 12px; }
.pop .opt .thumb { width: 40px; height: 40px; border-radius: 9px; overflow: hidden; background: #111; flex: none; }
.pop .opt .thumb img, .pop .opt .thumb video { width: 100%; height: 100%; object-fit: cover; }
.pop .opt .two { display: grid; min-width: 0; }
@@ -379,6 +387,11 @@ input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border: 0; bo
.seg button { flex: 1 1 auto; min-width: 0; min-height: 30px; padding: 6px 10px; border: 0; border-radius: 8px; background: transparent; color: #a9a9b1; font-weight: 600; font-size: 12.5px; cursor: pointer; line-height: 1.25; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: #2a2a2f; color: var(--ink); }
+.seg.modes button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
+.seg.modes svg { width: 15px; height: 15px; }
+.side-scroll > .seg.modes { margin: 2px 0 4px; }
+.cmp-row > .seg.modes { flex: none; padding: 2px; }
+.cmp-row > .seg.modes button { min-height: 28px; padding: 4px 10px; }
.selrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; height: 40px; padding: 0 12px; border-radius: 11px; border: 0;
background: #0f0f11; color: var(--ink); cursor: pointer; font-size: 13.5px; }
.selrow:hover { background: #18181b; }
diff --git a/web/js/catalog.js b/web/js/catalog.js
index 8f0fbc9..bb28b86 100644
--- a/web/js/catalog.js
+++ b/web/js/catalog.js
@@ -22,7 +22,7 @@ export async function loadCatalog() {
/** Apps grouped like a store: a card can only sit in one row. */
export const CATEGORIES = [
- { id: "create", apps: ["create-image", "cinema-studio", "z-image", "moss-image", "moodboard", "styles", "video-t2v", "video", "h3-video", "h3-photo", "music", "sfx"] },
+ { id: "create", apps: ["create-image", "cinema-studio", "cinema-video", "z-image", "moss-image", "moodboard", "styles", "video-t2v", "video", "h3-video", "h3-photo", "music", "sfx"] },
{ id: "identity", apps: ["character", "character-3", "speak", "talking", "recast", "motion-transfer", "genjutsu", "dub", "character-swap", "face-swap"] },
{ id: "camera", apps: ["camera-moves", "camera-copy", "reshoot", "reframe", "extend-video", "transitions", "angles", "shots", "zooms", "whats-next", "bullet-time-scene", "bullet-time-white", "bullet-time-splash"] },
{ id: "style", apps: ["relight", "style-reference", "mixed-media", "upscale", "upscale-video", "sdr-hdr", "smooth", "remove-bg", "video-remove-bg", "depth-map", "expand-image"] },
@@ -40,7 +40,7 @@ export function categoryOf(id) {
/** The video studio's three tabs, like a camera crew: shoot, fix, move. */
export const VIDEO_TABS = [
- { id: "create", apps: ["video", "h3-video", "h3-photo", "effects", "morph", "video-t2v", "genjutsu", "speak", "talking", "dub", "transitions", "camera-moves"] },
+ { id: "create", apps: ["video", "cinema-video", "h3-video", "h3-photo", "effects", "morph", "video-t2v", "genjutsu", "speak", "talking", "dub", "transitions", "camera-moves"] },
{ id: "edit", apps: ["recast", "mixed-media", "reframe", "extend-video", "vfx-clean-plate", "vfx-day-to-night", "vfx-water", "sdr-hdr", "upscale-video", "smooth", "reshoot", "video-remove-bg"] },
{ id: "motion", apps: ["motion-transfer", "camera-copy"] },
{ id: "templates", apps: ["behind-the-scenes", "asmr-product", "asmr-whisper", "asmr-host", "chameleon", "magic-button", "truck-ad", "kick-ad", "volcano-ad",
@@ -136,6 +136,7 @@ export function rememberApp(app) {
const TAGLINES = {
"z-image": ["Words to picture in seconds", "De palabras a imagen en segundos"],
"cinema-studio": ["Shoot it on any camera", "Fílmalo con cualquier cámara"],
+ "cinema-video": ["The same film look, now moving", "El mismo look de cine, ahora en movimiento"],
styles: ["Nine looks, one prompt", "Nueve estilos, un prompt"],
"style-reference": ["Paint like your reference", "Pinta como tu referencia"],
character: ["Same face, any scene", "La misma cara, cualquier escena"],
diff --git a/web/js/i18n.js b/web/js/i18n.js
index cfbe58a..e8eee42 100644
--- a/web/js/i18n.js
+++ b/web/js/i18n.js
@@ -59,7 +59,7 @@ const en = {
"ws.replace": "Replace", "ws.remove": "Remove", "ws.need": "Add {label} first", "ws.needtext": "Write {label} first",
"ws.draft": "Draft: add FREEFIELD_DRAFTS=1 to .env and restart the server to run it.", "ws.noworkflow": "This app has no workflow yet.",
"ws.example": "Example from the lab", "ws.useex": "Load this example", "ws.related": "More like this",
- "ws.empty.hist": "Nothing generated with this app yet.", "ws.dense": "Smaller tiles", "ws.optional": "optional", "ws.eg": "e.g. {x}",
+ "ws.empty.hist": "Nothing generated with this app yet.", "ws.dense": "Smaller tiles", "ws.optional": "optional", "ws.eg": "e.g. {x}", "ws.none": "None", "ws.multi.max": "Up to {n}: remove one first", "ws.multi.clear": "Clear", "ws.multi.upto": "up to {n}", "ws.multi.upto.ordered": "up to {n}, in order",
"paint.title": "Paint the area to change", "paint.help": "Only what you paint is redrawn; the rest of the photo keeps its pixels.",
"paint.brush": "Brush", "paint.erase": "Eraser", "paint.size": "Size", "paint.undo": "Undo", "paint.clear": "Clear", "paint.done": "Done",
"paint.cta": "Paint the area to change", "paint.first": "Add {label} first", "paint.empty": "Paint over the part to change first",
@@ -148,7 +148,7 @@ const es = {
"ws.replace": "Reemplazar", "ws.remove": "Quitar", "ws.need": "Primero agrega {label}", "ws.needtext": "Primero escribe {label}",
"ws.draft": "Borrador: agrega FREEFIELD_DRAFTS=1 a .env y reinicia el servidor para correrla.", "ws.noworkflow": "Esta app aún no tiene workflow.",
"ws.example": "Ejemplo del lab", "ws.useex": "Cargar este ejemplo", "ws.related": "Más como esta",
- "ws.empty.hist": "Aún no has generado nada con esta app.", "ws.dense": "Mosaicos chicos", "ws.optional": "opcional", "ws.eg": "p. ej. {x}",
+ "ws.empty.hist": "Aún no has generado nada con esta app.", "ws.dense": "Mosaicos chicos", "ws.optional": "opcional", "ws.eg": "p. ej. {x}", "ws.none": "Ninguno", "ws.multi.max": "Hasta {n}: quita uno primero", "ws.multi.clear": "Borrar", "ws.multi.upto": "hasta {n}", "ws.multi.upto.ordered": "hasta {n}, en orden",
"paint.title": "Pinta el área a cambiar", "paint.help": "Solo se redibuja lo que pintes; el resto de la foto conserva sus píxeles.",
"paint.brush": "Pincel", "paint.erase": "Borrador", "paint.size": "Tamaño", "paint.undo": "Deshacer", "paint.clear": "Limpiar", "paint.done": "Listo",
"paint.cta": "Pinta el área a cambiar", "paint.first": "Primero agrega {label}", "paint.empty": "Primero pinta la parte a cambiar",
diff --git a/web/js/workspace.js b/web/js/workspace.js
index f7d15f1..d455a6e 100644
--- a/web/js/workspace.js
+++ b/web/js/workspace.js
@@ -16,6 +16,7 @@ const forms = new Map();
function validValue(inp, v) {
if (v === undefined || v === null) return false;
+ if (inp.multiple) return Array.isArray(v) && v.length <= (inp.multiple.max ?? Infinity) && v.every((x) => (inp.options || []).some((o) => String(o.value) === String(x)));
if (inp.type === "select") return (inp.options || []).some((o) => String(o.value) === String(v));
if (inp.type === "slider" || inp.type === "number") return Number.isFinite(Number(v)) && (inp.min === undefined || v >= inp.min) && (inp.max === undefined || v <= inp.max);
return true;
@@ -28,7 +29,7 @@ export function formFor(app) {
const values = {};
for (const inp of app.inputs) {
if (isMedia(inp.type)) continue;
- const fallback = inp.type === "textarea" || inp.type === "text" ? "" : inp.type === "seed" ? -1 : inp.default ?? "";
+ const fallback = inp.type === "textarea" || inp.type === "text" ? "" : inp.type === "seed" ? -1 : inp.multiple ? [...(inp.default ?? [])] : inp.default ?? "";
values[inp.id] = validValue(inp, saved[inp.id]) ? saved[inp.id] : fallback;
}
f = { values, files: {}, preset: (app.presets || []).some((p) => p.id === saved.__preset) ? saved.__preset : "", count: 1 };
@@ -111,6 +112,7 @@ function buildForm(app, { randomSeed = false } = {}) {
if (isMedia(inp.type)) { const x = f.files[inp.id]; if (x) fd.append(inp.id, x.file, x.file.name); continue; }
const v = f.values[inp.id];
if (inp.type === "toggle") { fd.append(inp.id, v ? "true" : "false"); continue; }
+ if (inp.multiple) { fd.append(inp.id, JSON.stringify(Array.isArray(v) ? v : [])); continue; } // none picked is a choice too
if (inp.type === "seed" && (randomSeed || v === -1 || v === "-1" || v === "" || v === null)) continue;
// "Any" in a builder select is the empty value: send it, or the server would fill in the default
if (v === "" && inp.type === "select" && (inp.options || []).some((o) => o.value === "")) { fd.append(inp.id, ""); continue; }
@@ -202,10 +204,43 @@ function switcher(app) {
}
function optionLabel(inp, v) {
+ if (Array.isArray(v)) return v.length ? v.map((x) => optionLabel(inp, x)).join(inp.multiple?.ordered ? " → " : ", ") : t("ws.none");
const o = (inp.options || []).find((x) => String(x.value) === String(v));
return o ? o.label : String(v ?? "");
}
+/** A multiple select's list: tap to add or remove; ordered ones number the picks, which is the order they run in. */
+function multiPicker(inp, f, onChange) {
+ const max = inp.multiple.max ?? Infinity;
+ const list = el("div", { class: "multi-list" });
+ const draw = () => {
+ const picked = f.values[inp.id] || [];
+ list.replaceChildren(...(inp.options || []).map((o) => {
+ const at = picked.findIndex((x) => String(x) === String(o.value));
+ return el("button", { class: "opt", type: "button", "aria-pressed": String(at >= 0), onclick: () => {
+ const cur = [...(f.values[inp.id] || [])];
+ if (at >= 0) cur.splice(at, 1);
+ else if (cur.length >= max) { toast(t("ws.multi.max", { n: max }), { error: true }); return; }
+ else cur.push(o.value);
+ f.values[inp.id] = cur;
+ onChange();
+ draw();
+ } }, o.label, at >= 0 ? el("span", { class: "pick" }, inp.multiple.ordered ? String(at + 1) : icon("check")) : null);
+ }));
+ };
+ draw();
+ const clear = el("button", { class: "mini-link", type: "button", onclick: () => { f.values[inp.id] = []; onChange(); draw(); } }, t("ws.multi.clear"));
+ return el("div", {}, el("h4", {}, inp.label, el("span", { class: "n" }, Number.isFinite(max) ? t(inp.multiple.ordered ? "ws.multi.upto.ordered" : "ws.multi.upto", { n: max }) : ""), clear), list);
+}
+
+/** The switch between sibling apps (Cinema Studio's image and video modes). */
+function modeSwitch(app) {
+ if (!app.modes) return null;
+ return el("div", { class: "seg modes", role: "group", "aria-label": app.name }, ...app.modes.map((id) => byId.get(id)).filter(Boolean).map((a) =>
+ el("button", { type: "button", "aria-pressed": String(a.id === app.id), onclick: () => { if (a.id !== app.id) location.hash = `#/app/${a.id}`; } },
+ icon(a.section === "video" ? "video" : "image"), t(`nav.${a.section}`))));
+}
+
/** A select marked "gallery" (the effects picker): cards with each option's lab example, and the chosen one playing. */
function galleryField(app, inp, f, set, help) {
const shots = app.example?.options?.[inp.id] || {};
@@ -318,6 +353,8 @@ function composerBar(app, rerenderBar) {
icon(inp.type === "image" ? "image" : inp.type), inp.label))));
} }, icon("plus")));
}
+ const modes = modeSwitch(app);
+ if (modes) chips.push(modes);
const model = el("button", { class: "chip model", type: "button", "aria-haspopup": "dialog",
onclick: (ev) => popover(ev.currentTarget, switcher(app), { width: 360 }) },
el("span", { class: "thumb" }, appThumb(app)), el("span", { class: "v" }, app.name), icon("chevD"));
@@ -382,7 +419,9 @@ function chipFor(app, inp, f) {
draw();
b.onclick = (ev) => {
let content;
- if (inp.type === "select") {
+ if (inp.multiple) {
+ content = multiPicker(inp, f, () => { persistSoon(); draw(); });
+ } else if (inp.type === "select") {
content = el("div", {}, el("h4", {}, inp.label), ...(inp.options || []).map((o) => el("button", { class: "opt", type: "button",
"aria-selected": String(String(o.value) === String(f.values[inp.id])), onclick: () => { set(o.value); draw(); closePopover(); } },
o.label, el("span", { class: "chk" }, icon("check")))));
@@ -491,6 +530,12 @@ function sideField(app, inp, f, ui) {
ui.refs[inp.id] = ta;
return el("label", { class: "field" }, el("span", { class: "lbl" }, inp.label, inp.required ? null : el("small", {}, t("ws.optional"))), ta, help);
}
+ if (inp.multiple) {
+ const val = el("span", { class: "v" }, optionLabel(inp, f.values[inp.id]));
+ const row = el("button", { class: "selrow", type: "button", "aria-haspopup": "dialog", "aria-label": inp.label }, val, icon("chevD"));
+ row.onclick = () => popover(row, multiPicker(inp, f, () => { persistSoon(); val.textContent = optionLabel(inp, f.values[inp.id]); }), { width: Math.max(280, row.offsetWidth) });
+ return el("div", { class: "field" }, el("span", { class: "lbl" }, inp.label), row, help);
+ }
if (inp.type === "select" && inp.gallery) return galleryField(app, inp, f, set, help);
if (inp.type === "select") {
const opts = inp.options || [];
@@ -572,7 +617,7 @@ function sidebarPanel(app, rerenderSide) {
if (app.presets?.length) adv.unshift(presetField(app, f));
const advanced = adv.length ? el("details", { class: "adv" }, el("summary", {}, t("ws.advanced"), icon("chevD", "i-chev")), el("div", { class: "in" }, ...adv)) : null;
- const scroll = el("div", { class: "side-scroll" }, card, ...main, advanced);
+ const scroll = el("div", { class: "side-scroll" }, card, modeSwitch(app), ...main, advanced);
const note = el("p", { class: "side-note" }, !app.runnable ? (app.status === "draft" ? t("ws.draft") : t("ws.noworkflow")) : "");
ui.clearMissing = () => { scroll.querySelectorAll(".missing").forEach((n) => n.classList.remove("missing")); };
ui.markMissing = (id) => {