The open creative studio on ComfyUI: images, video, 3D and audio on open weights, on your own GPU or the cloud. Camera motions, effects, apps, Cinema, Layers, Image to 3D and an AI agent.
TypeScript ai-videocomfyuicreative-toolsgenerative-aiideogramimage-generationimage-to-3dimage-to-videoltx-videominimax-h3nextjsopen-sourceopen-weightsqwen-imagetext-to-imagevideo-generationwan
World mode: Hy-Nomas turns on your GPU, camera paths as Hy-Nomas reads them, and a World take in Cinema's planner
Claudebd752edf4f5c
diff --git a/scripts/comfy/hand-built/world-hy-nomas-turn.json b/scripts/comfy/hand-built/world-hy-nomas-turn.jsonnew file mode 100644index 00000000..237530b0--- /dev/null+++ b/scripts/comfy/hand-built/world-hy-nomas-turn.json@@ -0,0 +1,89 @@+{+ "1": {+ "class_type": "UNETLoader",+ "inputs": { "unet_name": "nomas_dit_distilled_int8_convrot.safetensors", "weight_dtype": "default" },+ "_meta": { "title": "Hy-Nomas DiT (distilled, int8 ConvRot)" }+ },+ "2": {+ "class_type": "CLIPLoader",+ "inputs": { "clip_name": "qwen_2.5_vl_7b.safetensors", "type": "qwen_image", "device": "default" },+ "_meta": { "title": "Qwen2.5-VL 7B text encoder" }+ },+ "3": {+ "class_type": "VAELoader",+ "inputs": { "vae_name": "nomas_pixelumm_vae_bf16.safetensors" },+ "_meta": { "title": "PixelUMM decoder" }+ },+ "4": {+ "class_type": "NomasWorldPrompt",+ "inputs": {+ "perspective": "third-person follow",+ "style": "real-world footage",+ "subject": "a small orange fox",+ "subject_details": "Orange fur, a white chest and a fluffy tail.",+ "scene": "<|Subject1|> stands on a stone path in a luminous forest at dusk. Blue fireflies drift between tall mossy trees, and soft mist hangs over the ground.",+ "action": "<|Subject1|> walks slowly along the path.",+ "seconds": 5+ },+ "_meta": { "title": "Opening turn" }+ },+ "5": {+ "class_type": "NomasCameraPath",+ "inputs": { "script": "w 2\nw+left 1.5\nw 1.5" },+ "_meta": { "title": "Opening camera move" }+ },+ "6": {+ "class_type": "NomasWorldGenerate",+ "inputs": {+ "model": ["1", 0],+ "clip": ["2", 0],+ "turn": ["4", 0],+ "camera": ["5", 0],+ "seed": 42,+ "width": 1280,+ "height": 704,+ "steps": 8,+ "history": "window"+ },+ "_meta": { "title": "World: opening" }+ },+ "7": {+ "class_type": "NomasCameraPath",+ "inputs": { "script": "right 1\nw 2" },+ "_meta": { "title": "Turn 1 camera move" }+ },+ "8": {+ "class_type": "NomasWorldContinue",+ "inputs": {+ "model": ["1", 0],+ "clip": ["2", 0],+ "world": ["6", 1],+ "change": "a wooden bridge crosses a glowing stream ahead",+ "action": "<|Subject1|> trots onto the bridge.",+ "camera": ["7", 0],+ "seconds": 5,+ "steps": 8+ },+ "_meta": { "title": "World: turn 1" }+ },+ "9": {+ "class_type": "TrimVideoLatent",+ "inputs": { "samples": ["8", 0], "trim_amount": 31 },+ "_meta": { "title": "This turn only (the earlier turns' latents left out)" }+ },+ "10": {+ "class_type": "VAEDecode",+ "inputs": { "samples": ["9", 0], "vae": ["3", 0] },+ "_meta": { "title": "Decode the turn" }+ },+ "11": {+ "class_type": "CreateVideo",+ "inputs": { "images": ["10", 0], "fps": 24, "bit_depth": "auto", "color_space": "sRGB" },+ "_meta": { "title": "24 fps" }+ },+ "12": {+ "class_type": "SaveVideo",+ "inputs": { "video": ["11", 0], "filename_prefix": "fuobe/world", "format": "auto", "format.codec": "auto", "codec": "auto" },+ "_meta": { "title": "Save the turn" }+ }+}diff --git a/scripts/comfy/install-comfyui.sh b/scripts/comfy/install-comfyui.shindex 4fd16b65..eed0cf54 100755--- a/scripts/comfy/install-comfyui.sh+++ b/scripts/comfy/install-comfyui.sh@@ -60,6 +60,11 @@ declare -A NODES=(# nodes). Read at this commit: 3 AI-assisted commits on 2026-10-30, not in the Comfy Registry. It goes in the main# ComfyUI, not the isolated worker. Without it the provider runs image-to-splat-idol on core nodes.[ComfyUI-Idol]="https://github.com/Nynxz/ComfyUI-Idol 4d3a4f671028f0e062d9f004cda1a2dd73360d35"+ # World mode (world-hy-nomas-turn; research #10 §6.14): Nynxz's native Hy-Nomas port. Apache-2.0, no Python+ # dependencies; importing it registers the Nomas DiT and the PixelUMM decoder with the core loaders' model detection.+ # Read at this commit (2026-10-24, three commits, not in the Comfy Registry). Weights: about 25 GB from nynxz/Hy-Nomas+ # (model-pins.json), the PixelUMM decoder under the NVIDIA One-Way Noncommercial License.+ [ComfyUI-HyNomas]="https://github.com/Nynxz/ComfyUI-HyNomas a89e0515619924da71093aa3fe52dbb7104cb06e")# Licences are information (Settings → Models & licences has the switches): every pack is installed, the# non-commercial ComfyUI-Whisper (CC-BY-NC-SA-4.0, used by the captions-whisper-burnin workflow) included.diff --git a/scripts/comfy/library.spec.mjs b/scripts/comfy/library.spec.mjsindex 67384394..6acf003a 100644--- a/scripts/comfy/library.spec.mjs+++ b/scripts/comfy/library.spec.mjs@@ -241,6 +241,9 @@ export const CUSTOM_NODE_REPOS = {// comfyui/ folder of each repository). Neither is on the validation server; core ComfyUI has no Kandinsky 6 nodes yet (PR #16825).kandinsky6: 'https://github.com/kandinskylab/kandinsky-6/tree/7ceeefad7fb625011f7db602c43893a989f19c15/comfyui','kandinsky6-sr': 'https://github.com/kandinskylab/kandinsky-6-sr/tree/b15e2aac526519c51f59dfec2b848355bb8902de/comfyui',+ // World mode (nm10-hy-nomas-world): Nynxz's native Hy-Nomas port (Apache-2.0, no Python dependencies; it registers the+ // DiT and the PixelUMM decoder with the core loaders). Read at this commit (2026-10-24); not on the validation server.+ 'ComfyUI-HyNomas': 'https://github.com/Nynxz/ComfyUI-HyNomas/tree/a89e0515619924da71093aa3fe52dbb7104cb06e',};// Node classes of the packs entries list in `packs` (packs the validation server doesn't have installed): the build@@ -276,11 +279,17 @@ export const PACK_CLASSES = {'ComfyUI-Idol': /^Idol(PreprocessImage|Camera|PruneSplat)$/,kandinsky6: /^Kandinsky6(BeautifyPrompt|Sampler|EmptyLatent|ImageToVideoAudio|RemoveReferenceLatent|AudioVAELoader|AudioVAEDecode|TextEncode|MagCache)$/,'kandinsky6-sr': /^Kandinsky6(SRVAELoader|LatentUpscalerLoader|VSRUpscale)$/,+ 'ComfyUI-HyNomas': /^Nomas(WorldPrompt|PromptJSON|CameraPath|WorldGenerate|WorldContinue|Explore)$/,};// Model download locations for files that the source workflow does not annotate// (UI templates usually carry node.properties.models; custom-node examples do not).export const KNOWN_MODELS = {+ // World mode (nm10-hy-nomas-world): nynxz/Hy-Nomas, Tencent's Hy-Nomas converted for ComfyUI's core loaders, at the+ // revision read on 2026-11-03. The DiT is Apache-2.0; the PixelUMM decoder is NVIDIA One-Way Noncommercial (its card).+ 'nomas_dit_distilled_int8_convrot.safetensors': { folder: 'diffusion_models', url: 'https://huggingface.co/nynxz/Hy-Nomas/resolve/e8ddc4bfa664d69213930552493c220c3af56f41/nomas_dit_distilled_int8_convrot.safetensors' },+ 'nomas_dit_distilled_bf16.safetensors': { folder: 'diffusion_models', url: 'https://huggingface.co/nynxz/Hy-Nomas/resolve/e8ddc4bfa664d69213930552493c220c3af56f41/nomas_dit_distilled_bf16.safetensors' },+ 'nomas_pixelumm_vae_bf16.safetensors': { folder: 'vae', url: 'https://huggingface.co/nynxz/Hy-Nomas/resolve/e8ddc4bfa664d69213930552493c220c3af56f41/nomas_pixelumm_vae_bf16.safetensors' },// Kandinsky 6.0 (nm10-kandinsky6): Kandinsky Lab's distilled transformers (MIT) at the revisions read on 2026-11-02, saved// where the pack's README puts them (diffusion_models/<repo>/transformer/…); the encoders, VAE and vocoder its templates load;// and the VSR bundle, whose loaders list a file only with its config.json beside it.@@ -5744,4 +5753,39 @@ export const SPEC = ['Each loader lists a file only with its config.json beside it (the eight files of the SR README\'s manual-download table, in diffusion_models/Kandinsky-6.0-VSR-distilled2steps-5s-Diffusers/). ' +'VRAM is not published: 24 GB is an estimate (a 3.19 GB DiT, a 6.96 GB K-VAE and a 7.31 GB latent upscaler bank, loaded one stage at a time). The same model runs on fal (kandinsky-vsr).',},+ // ---- World mode: Hy-Nomas (research #10 §6.14, package nm10-hy-nomas-world) ----------------------------------------------+ // Nynxz's ComfyUI-HyNomas isn't on the validation server: the graph follows its nomas_world example and is checked against+ // the node definitions read from its source at the pinned commit (tests/world-mode.test.ts).+ {+ id: 'world-hy-nomas-turn',+ title: 'World mode: one turn of a Hy-Nomas world (the opening and every turn before it, then this turn in words and a camera move, 1280x704 at 24 fps)',+ capability: 'world-turn',+ handBuilt: 'hand-built/world-hy-nomas-turn.json',+ packs: ['ComfyUI-HyNomas'],+ expand: 'world',+ bindings: {+ prompt: [b('4', 'scene')], seed: [b('6', 'seed')], width: [b('6', 'width')], height: [b('6', 'height')],+ steps: [b('6', 'steps'), b('8', 'steps')], filenamePrefix: [b('12', 'filename_prefix')],+ },+ outputs: [{ node: '12', kind: 'video' }],+ defaults: { width: 1280, height: 704, steps: 8, fps: 24 },+ limits: { maxDurationSec: 12, dimensionMultiple: 32 },+ // The bf16 DiT (17.1 GB) is the base for LoRA merges, never needed for a run.+ optionalModels: ['nomas_dit_distilled_bf16.safetensors'],+ vramGb: 24,+ license:+ 'Apache-2.0 (Hy-Nomas DiT, Tencent Hunyuan; the ComfyUI files are nynxz/Hy-Nomas\'s conversion); PixelUMM decoder (nomas_pixelumm_vae_bf16, Tencent\'s fine-tune of NVIDIA PixelUMM): ' ++ 'NVIDIA One-Way Noncommercial License (NON-COMMERCIAL research and evaluation only, per the converted weights\' card); Qwen2.5-VL 7B text encoder Apache-2.0; ComfyUI-HyNomas nodes Apache-2.0',+ notes:+ 'Nynxz\'s ComfyUI-HyNomas (pinned at a89e0515) on core loaders: UNETLoader (the distilled DiT, int8 ConvRot, 8.97 GB), CLIPLoader qwen_image (qwen_2.5_vl_7b, 16.6 GB, shared with Qwen-Image), ' ++ 'VAELoader (the PixelUMM decoder, 15.8 GB): about 25 GB of files beside the shared text encoder. ' ++ 'The template is the pack\'s nomas_world example: Nomas World Prompt (perspective, style, subject, scene, action, seconds) -> Nomas World (seed, 1280x704, 8 Euler steps, window history) with a Nomas Camera Path, ' ++ 'then Nomas World Continue for a turn (change, action, camera, seconds). Fuobe rebuilds it per run (expand: "world", src/lib/world.ts expandWorldWorkflow): the opening and one Continue per turn up to the one asked for, ' ++ 'each with the key script src/lib/world-path.ts flies along the turn\'s camera move (or no camera for a still turn), then TrimVideoLatent drops the earlier turns\' latents so VAE Decode -> CreateVideo 24 fps -> SaveVideo writes this turn alone. ' ++ 'The port keeps a world in ComfyUI\'s memory (NOMAS_WORLD plus an int8 key/value cache in temp/nomas_history), and ComfyUI reuses the outputs of the last prompt it ran: the turns before this one have the same inputs and node ids every time, ' ++ 'so only the new turn is generated; after another job or a restart they are generated again from the same seed. ' ++ 'No sound (Hy-Nomas makes none). No image input: Hy-Nomas starts every world from words. ' ++ 'Speed and VRAM are the port author\'s: about 21 s per 3 s turn plus about 4 s of decode per 10-latent window on an RTX 5090 at 1280x704 int8; Tencent\'s single-4090 configuration uses an int8 DiT and cache, ' ++ 'an FP8 decoder and CPU offload. 24 GB is a guess. The pack patches the core loaders\' model detection (Load Diffusion Model, Load VAE) to recognise the Nomas files.',+ },];diff --git a/src/lib/catalog/cinema.ts b/src/lib/catalog/cinema.tsindex ffb7d2d8..6967cd31 100644--- a/src/lib/catalog/cinema.ts+++ b/src/lib/catalog/cinema.ts@@ -18,6 +18,7 @@ import { WORLDCAST_AFTER, WORLDCAST_MODELS, WORLDCAST_SECONDS, worldcastFallbackimport { WORLDCAST_RUN } from "@/lib/worldcast";import { exactDefaults, exactSummary, normalizeExact, takesExact, type ExactOrbit } from "@/lib/exact-orbit";import { CAST_LOOK } from "./soul-cards";+import { clipSeconds, normalizeWorld, scriptKey, turnAt, WORLD_JOIN, WORLD_LIMITS, WORLD_MODEL, worldSeconds, type WorldScript } from "@/lib/world";import type { Engine, GenerationRequest, GenParams, LoraRef, ModelDef, Operation } from "./types";/*@@ -176,6 +177,11 @@ export interface CinemaTakeInfo {path?: { keys: CameraKey[]; duration: number; preset?: string };/** A filmed blockout: its length, how many shots or windows it was filmed in, and its beats. */blockout?: { seconds: number; parts: number; beats: string[] };+ /**+ * A World turn (nm10-hy-nomas-world): which turn, the script it was made from (up to that turn) and its key (scriptKey),+ * so the World panel can rebuild the turn timeline from the takes; or the joined film of the turns.+ */+ world?: { turn: number; script: WorldScript; made: string; joined?: boolean };}/** A generation's membership in a project (and its folder = scene). */@@ -210,7 +216,7 @@ export interface DirectorMessage {}export type CinemaMode = "video" | "image";-export type CinemaAction = "generate" | "extend-forward" | "extend-backward" | "edit" | "grid" | "cast" | "location" | "location-view" | "scene" | "recompose" | "path" | "turnaround" | "blockout";+export type CinemaAction = "generate" | "extend-forward" | "extend-backward" | "edit" | "grid" | "cast" | "location" | "location-view" | "scene" | "recompose" | "path" | "turnaround" | "blockout" | "world";export type GridSize = "2x2" | "3x3" | "4x4";export type GridType = "freeform" | "zooms" | "shots" | "next_shots" | "prev_shots";export type CastValues = Record<string, string | number | string[] | undefined>;@@ -255,6 +261,16 @@ export interface CinemaGenerateInput {turnaround?: Omit<TurnaroundInput, "engine" | "feature" | "stepFeature">;/** "blockout": a grey-box blockout filmed with references and beats (package blockout-film: src/lib/blockout.ts). */blockout?: BlockoutRun;+ /** "world": a World turn to run, or (join) the turns' clips to join into one film (nm10-hy-nomas-world: src/lib/world.ts). */+ world?: WorldRun;+}++/** A World take: the script and the turn to run (0 = the opening), or the finished turns' clips to join. */+export interface WorldRun {+ script: WorldScript;+ turn: number;+ /** Export: every turn's clip, in order (one film, no re-encode). */+ join?: string[];}/** A blockout to film: the grey box (and its depth), its beats and references, and the words around them. */@@ -1482,6 +1498,7 @@ const FEATURES: Partial<Record<CinemaAction, string>> = {path: "cinema-path",turnaround: "cinema-turnaround",blockout: "cinema-blockout",+ world: "cinema-world",};const feature = (action: CinemaAction, mode: CinemaMode) => FEATURES[action] ?? (mode === "image" ? "cinema-image" : "cinema");@@ -2480,6 +2497,68 @@ export function blockoutTake(input: Pick<CinemaGenerateInput, "blockout">, plan:return { seconds: Math.round(b.seconds * 100) / 100, parts, beats: normalizeBeats(b.beats, b.seconds).map((x) => x.label).slice(0, BLOCKOUT.maxMarkers) };}++// ---------------------------------------------------------------------------+// World mode (nm10-hy-nomas-world; research #10 §6.14): a world described once, then steered turn by turn++/** Said where World mode is offered on the cloud engine: Hy-Nomas is hosted on neither fal nor Replicate. */+export const WORLD_OPEN_ONLY = "World mode runs on your GPU (open source): switch to Open source to use it";+/** Said after a turn: Hy-Nomas makes no sound. */+export const WORLD_SOUND = "Hy-Nomas makes no sound: add it afterwards with Sound for video or Music";++/**+ * A World take. One turn: Hy-Nomas continues the world from the turns before it and films this turn (1280 × 704 at+ * 24 fps). Export: the turns' clips joined into one film, packet by packet (they share one size, rate and codec). Open+ * engine only: no stand-in model on the cloud.+ */+function planWorld(input: CinemaGenerateInput, ctx: CinemaContext): CinemaPlan {+ const has = ctx.has ?? ((id: string) => !!getModel(id));+ const model = getModel(WORLD_MODEL)!;+ const run = input.world;+ const script = normalizeWorld(run?.script);+ const notes: string[] = [];+ if (input.engine !== "open") return finish(model, [], notes, WORLD_OPEN_ONLY);+ if (!has(WORLD_MODEL)) return finish(model, [], notes, "World mode needs the Hy-Nomas workflow on your GPU");+ if (run?.join) {+ const join = getModel(WORLD_JOIN);+ const clips = run.join.filter(Boolean);+ if (!join || !has(WORLD_JOIN)) return finish(model, [], notes, "Joining the turns needs the join workflow on your GPU");+ notes.push(`Joins the ${clips.length} turns into one ${Math.round(worldSeconds(script))} s film on your GPU, without re-encoding them`, WORLD_SOUND);+ const step: CinemaStep = { key: "main", request: { feature: "cinema-world", modelId: join.id, op: "concat", prompt: "World film", inputs: { videos: clips }, params: { numOutputs: 1 } } };+ return finish(join, [step], notes, clips.length < 2 ? "Run at least two turns to export a film" : undefined);+ }+ const k = Math.max(0, Math.min(script.turns.length, Math.round(run?.turn ?? 0)));+ const t = turnAt(script, k)!;+ const total = script.turns.length + 1;+ notes.push(+ k === 0+ ? `The opening on your GPU: Hy-Nomas starts the world from your words, ${clipSeconds(t)} s at 1280 × 704, 24 fps`+ : `Turn ${k} of ${total - 1} on your GPU: Hy-Nomas continues the world from the turns before it, then films this one (${clipSeconds(t)} s at 1280 × 704, 24 fps)`,+ );+ if (k > 0) notes.push("While ComfyUI still holds the earlier turns only this one is made; after another job it makes them again from the same seed first, which takes longer");+ notes.push(WORLD_SOUND);+ const prompt = (k === 0 ? script.opening.words : [t.words, t.action].filter(Boolean).join(" · ")) || "Camera move";+ const request: GenerationRequest = {+ feature: "cinema-world",+ modelId: model.id,+ op: "world-turn",+ prompt: prompt.slice(0, WORLD_LIMITS.maxScene),+ params: { numOutputs: 1, seed: script.seed, duration: clipSeconds(t), extra: { world: script, turn: k } },+ };+ return finish(model, [{ key: "main", request }], notes);+}++/** What a World take remembers: its turn, the script up to it and that part's key; or that it is the joined film. */+export function worldTake(input: Pick<CinemaGenerateInput, "world">): CinemaTakeInfo["world"] {+ const run = input.world;+ if (!run) return undefined;+ const script = normalizeWorld(run.script);+ if (run.join) return { turn: script.turns.length, script, made: scriptKey(script, script.turns.length), joined: true };+ const k = Math.max(0, Math.min(script.turns.length, Math.round(run.turn)));+ const upTo = { ...script, turns: script.turns.slice(0, k) };+ return { turn: k, script: upTo, made: scriptKey(script, k) };+}+/** Everything a Generate press would run, priced, without running it (the browser shows it live). */export function planCinema(input: CinemaGenerateInput, ctx: CinemaContext): CinemaPlan {const i = { ...input, settings: input.settings ?? {}, prompt: input.prompt ?? "" };@@ -2506,6 +2585,8 @@ export function planCinema(input: CinemaGenerateInput, ctx: CinemaContext): Cinereturn planTurnaroundTake(i, ctx);case "blockout":return planBlockout(i, ctx);+ case "world":+ return planWorld(i, ctx);default:return i.mode === "image" ? planStill(i) : planVideo(i, ctx);}diff --git a/src/lib/catalog/models.ts b/src/lib/catalog/models.tsindex 0df66a55..539b5e6b 100644--- a/src/lib/catalog/models.ts+++ b/src/lib/catalog/models.ts@@ -2335,6 +2335,21 @@ const open: ModelDef[] = [},defaults: { resolution: "480p", aspectRatio: "auto" },}),+ // World mode (nm10-hy-nomas-world): Hy-Nomas (Tencent Hunyuan, Apache-2.0) through Nynxz's ComfyUI port, a world described+ // once and steered turn by turn. Hosted on neither fal nor Replicate: open engine only. Cinema's World take runs it+ // (src/lib/world.ts); it isn't a model of the Video studio's menu.+ o({+ id: "oss-hy-nomas-world",+ name: "Hy-Nomas",+ vendor: "Tencent Hunyuan",+ family: "hy-nomas",+ kind: "video",+ tagline: "A world you describe once, then steer turn by turn with words and camera moves · 1280 × 704 at 24 fps · Apache-2.0",+ badges: ["new"],+ hidden: true,+ routes: [comfy("world-turn", "world-hy-nomas-turn", "the opening and every turn before this one, then this turn's clip")],+ options: { seed: true },+ }),// N7-9: WorldCast (PixCtrol) on the WorldCast worker, outside ComfyUI (docs/workers/worldcast.md). Fly path, Turnaround and// the exact orbits prefer it when the worker answers: the still's depth (MoGe 2), SAM 3.1 masks of the still and the views,// then one case; the back and sides follow the views. 81 frames, portrait 480 × 832, 15 fps.diff --git a/src/lib/catalog/plan.ts b/src/lib/catalog/plan.tsindex 0f6e4d17..3ff40a21 100644--- a/src/lib/catalog/plan.ts+++ b/src/lib/catalog/plan.ts@@ -27,6 +27,7 @@ import { carriesLayout, flux3Boxes, flux3Caption, layoutCompilerFor, LAYOUT_MAX_import { pricingOn, type PriceClock } from "./promo";import { isInstrumental, lyricsOf, lyricsProblem, LYRICS_PARAM, promptLyricsProblem } from "@/lib/lyrics";import { presetRoutes } from "./preset-recipe-routes";+import { readWorld, worldProblem } from "@/lib/world";export { pricingAt } from "./promo";@@ -277,6 +278,8 @@ const PROMPTLESS = new Set<Operation>(["song-extend", "song-stems",// nm10-hosted-catchup: an inserted moment can be left to the model; a retexture takes words or a style picture"insert-moment", "retexture-3d",+ // nm10-hy-nomas-world: a world turn's words are in its script (params.extra.world)+ "world-turn",]);/**@@ -577,6 +580,11 @@ export function planGeneration(if (op === "dub" && !params.targetLanguage) throw new Error("Pick a language to translate into");if (op === "voice-design" && !params.voiceDescription?.trim()) throw new Error("Describe the voice you want");if (op === "speech-edit" && !(Array.isArray(params.extra?.speechWindows) && params.extra.speechWindows.length)) throw new Error("Edit the words, or pick a range and an effect");+ if (op === "world-turn") {+ const world = readWorld(params.extra?.world);+ const problem = world ? worldProblem(world, Number(params.extra?.turn ?? 0)) : "Describe the world first: the opening is where it starts";+ if (problem) throw new Error(problem);+ }if (model.options.motionPaths && !(params.extra?.motionPaths as { paths?: unknown[] } | undefined)?.paths?.length) {throw new Error(`Draw on the start frame — ${model.name} moves things along the paths you draw`);}diff --git a/src/lib/catalog/types.ts b/src/lib/catalog/types.tsindex 4e2916dd..d62fc282 100644--- a/src/lib/catalog/types.ts+++ b/src/lib/catalog/types.ts@@ -100,7 +100,9 @@ export type Operation =// nm10-music3: a song's cloud tools (Mureka). The song is inputs.audio, or one of Mureka's own (params.extra.songId)| "song-extend" // song + lyrics for the new part (+ params.startTime: where it begins; params.extra.extend_type tail | head) → the song, longer| "song-remix" // song + a style (prompt) + the whole song's lyrics → a new arrangement of it- | "song-stems"; // song → its vocal and instrument tracks (meta.stem), one file each+ | "song-stems" // song → its vocal and instrument tracks (meta.stem), one file each+ // nm10-hy-nomas-world+ | "world-turn"; // params.extra.world (src/lib/world.ts: the opening and the turns) + params.extra.turn → that turn's clip of the world (Hy-Nomas)export const OPERATION_LABELS: Record<Operation, string> = {t2i: "Text to image",@@ -180,6 +182,7 @@ export const OPERATION_LABELS: Record<Operation, string> = {"song-extend": "Extend a song","song-remix": "Remix a song","song-stems": "Song stems",+ "world-turn": "World turn",};export const OPERATION_OUTPUT: Record<Operation, MediaKind> = {@@ -261,6 +264,7 @@ export const OPERATION_OUTPUT: Record<Operation, MediaKind> = {"song-extend": "audio","song-remix": "audio","song-stems": "audio",+ "world-turn": "video",};/**diff --git a/src/lib/comfy.ts b/src/lib/comfy.tsindex 00d71a6e..fabeb28c 100644--- a/src/lib/comfy.ts+++ b/src/lib/comfy.ts@@ -116,9 +116,10 @@ export interface ManifestWorkflow {* "timeline": one loader per audio clip, each placed at its start time; "videos" / "audios": one loader* per clip of a join, src/lib/av/joins.ts; "references": one loader per reference image, clip and audio clip of* MiniMax H3's Ref2VA graph, src/lib/h3-references.ts; "speech": every Edit speech window of params.extra.speechWindows,- * src/lib/av/speech-edit-graph.ts).+ * src/lib/av/speech-edit-graph.ts; "world": the opening and every turn of a World up to the one asked for,+ * src/lib/world.ts).*/- expand?: "captions" | "timeline" | "videos" | "audios" | "speech" | "keyframes" | "references";+ expand?: "captions" | "timeline" | "videos" | "audios" | "speech" | "keyframes" | "references" | "world";/** Classes the app adds to the graph per run (the References clip loaders): the GPU pre-flight counts them as the graph's. */runtimeNodes?: string[];validated: boolean;diff --git a/src/lib/world-path.ts b/src/lib/world-path.tsnew file mode 100644index 00000000..2768ec1b--- /dev/null+++ b/src/lib/world-path.ts@@ -0,0 +1,363 @@+/**+ * World mode's camera (package nm10-hy-nomas-world): Fuobe's camera paths (the fly-path library in ./camera-path: orbits,+ * arcs, dollies, trucks, the figure-8, or any keys made in the 3D scene) as Hy-Nomas reads a camera.+ *+ * Two forms of the same move:+ *+ * - **The trajectory** Tencent's offline inference reads (`inference.camera_trajectory`, an .npz): camera-to-world+ * matrices `c2ws` [N, 4, 4] in OpenCV axes (x right, y down, z forward) and normalised intrinsics [N, 3, 3]+ * (fx = f / width, fy = f / height, principal point 0.5, 0.5, as hymm/models/camera/geometry/generate_npz_trajectories.py+ * writes them), one per frame at 24 fps, with the release's default gains (trajectory_translation_scale 1.0,+ * trajectory_rotation_scale 2.5). A world's turns are chained: each turn starts where the one before stopped.+ * - **The key script** the ComfyUI port (Nynxz/ComfyUI-HyNomas, Nomas Camera Path) reads: keys held at 24 fps, the way+ * Tencent's demo is steered (W/S along the view, A/D sideways, the arrows turn 20°/s, a mouse drag turns 0.0024 rad/px).+ * The port integrates the keys into the same camera-to-world poses, so the script is made by steering a simulated camera+ * along the trajectory frame by frame (closed loop: every tick corrects what the earlier ticks missed).+ *+ * What survives into the model (both runtimes): each turn's poses relative to its first frame, frame-to-frame deltas,+ * translations divided by their 99th-percentile step (only direction and relative speed matter), rotations scaled by 2.5.+ * So a path's size doesn't matter, its shape and timing do. Keys can't rise straight up: a change of height is flown+ * along the (tilted) view, as the demo flies it.+ *+ * Pure: no DOM, no three.js.+ */++import { framePoses, normalizeKeys, presetKeys, PHOTO_KEY, type CameraKey, type Mat3, type Mat4 } from "./camera-path";++/** Hy-Nomas's frame rate and the size it was trained at (the release's "720p" is 1280 × 704). */+export const WORLD_FPS = 24;+export const WORLD_SIZE = { width: 1280, height: 704 } as const;+/** The release's default camera gains (configs/config.yaml): translation × 1.0, each step's rotation × 2.5. */+export const WORLD_SCALES = { translation: 1.0, rotation: 2.5 } as const;+/** The horizontal field of view the intrinsics describe (the browser demo's default camera). */+export const WORLD_FOV = 55;++/** The port's controls (nomas/camera.py at the pinned commit). */+export const PORT_CONTROLS = { moveSpeed: 2.8, turnDegPerSec: 20, mouseRadPerPx: 0.0024 } as const;++const DEG = Math.PI / 180;+const tidy = (n: number, digits = 6) => Number(n.toFixed(digits)) + 0;++/** A move for a turn: one of the fly-path presets, "still" (no camera move: words only), or keys made in the 3D scene. */+export type WorldMove = string | CameraKey[];+export const STILL_MOVE = "still";++/** The keys of a move ([] for a still camera or an unknown id). */+export function moveKeys(move: WorldMove | undefined): CameraKey[] {+ if (!move || move === STILL_MOVE) return [];+ const keys = typeof move === "string" ? presetKeys(move) : normalizeKeys(move);+ if (!keys || keys.length < 2) return [];+ const moving = keys.some((k) => Math.abs(k.azimuth) > 0.05 || Math.abs(k.elevation) > 0.05 || Math.abs(k.distance - 1) > 1e-3 || Math.abs(k.truck ?? 0) > 1e-3);+ return moving ? keys : [];+}++/** Frames of a turn `seconds` long at 24 fps (whole frames; a turn is at least one frame long). */+export function turnFrames(seconds: number): number {+ return Math.max(1, Math.round(seconds * WORLD_FPS));+}++// ---------------------------------------------------------------------------+// Small matrix helpers (4×4 rows)++type V3 = [number, number, number];++export function matMul(a: Mat4, b: Mat4): Mat4 {+ return a.map((row) => [0, 1, 2, 3].map((j) => row[0] * b[0][j] + row[1] * b[1][j] + row[2] * b[2][j] + row[3] * b[3][j]));+}++/** The inverse of a rigid camera-to-world matrix. */+export function rigidInverse(m: Mat4): Mat4 {+ const r = [0, 1, 2].map((i) => [m[0][i], m[1][i], m[2][i]]);+ const t: V3 = [m[0][3], m[1][3], m[2][3]];+ const ti = r.map((row) => -(row[0] * t[0] + row[1] * t[1] + row[2] * t[2]));+ return [[...r[0], ti[0]], [...r[1], ti[1]], [...r[2], ti[2]], [0, 0, 0, 1]];+}++const IDENTITY: Mat4 = [+ [1, 0, 0, 0],+ [0, 1, 0, 0],+ [0, 0, 1, 0],+ [0, 0, 0, 1],+];++// ---------------------------------------------------------------------------+// The trajectory (Tencent's .npz form)++/** Normalised intrinsics of a WORLD_SIZE frame with a horizontal field of view of `fovDeg`. */+export function worldIntrinsic(fovDeg = WORLD_FOV, size: { width: number; height: number } = WORLD_SIZE): Mat3 {+ const fx = 0.5 / Math.tan(Math.max(1, Math.min(179, fovDeg)) * DEG * 0.5);+ return [+ [tidy(fx), 0, 0.5],+ [0, tidy((fx * size.width) / size.height), 0.5],+ [0, 0, 1],+ ];+}++/**+ * One turn's camera: frames + 1 camera-to-world poses (frame 0 = where the turn starts, the identity), OpenCV axes in the+ * turn's own frame. A still camera holds the identity. The subject's pivot sits one unit ahead (the size cancels out).+ */+export function turnPoses(move: WorldMove | undefined, seconds: number): Mat4[] {+ const n = turnFrames(seconds) + 1;+ const keys = moveKeys(move);+ if (!keys.length) return Array.from({ length: n }, () => IDENTITY.map((r) => [...r]));+ return framePoses(keys, n, 1, WORLD_FOV).poses;+}++export interface WorldTurnCamera {+ move?: WorldMove;+ seconds: number;+}++export interface WorldTrajectory {+ /** Camera-to-world per frame, OpenCV axes, the world being the first turn's starting camera: 1 + Σ frames. */+ c2ws: Mat4[];+ /** Normalised intrinsics per frame (fx = f / width, fy = f / height, cx = cy = 0.5). */+ intrinsics: Mat3[];+ fps: number;+ /** Where each turn starts in `c2ws` (its first pose is the previous turn's last). */+ starts: number[];+ translationScale: number;+ rotationScale: number;+}++/**+ * The whole world's camera as Tencent's trajectory file holds it: every turn's poses chained onto the end of the one+ * before (a turn's frame 0 is the previous turn's last frame), with the intrinsics and the default gains.+ */+export function worldTrajectory(turns: readonly WorldTurnCamera[], fovDeg = WORLD_FOV): WorldTrajectory {+ const c2ws: Mat4[] = [IDENTITY.map((r) => [...r])];+ const starts: number[] = [];+ let base: Mat4 = IDENTITY;+ for (const t of turns) {+ starts.push(c2ws.length - 1);+ const local = turnPoses(t.move, t.seconds);+ for (let i = 1; i < local.length; i++) c2ws.push(matMul(base, local[i]).map((row) => row.map((v) => tidy(v))));+ base = c2ws[c2ws.length - 1];+ }+ const k = worldIntrinsic(fovDeg);+ return { c2ws, intrinsics: c2ws.map(() => k.map((r) => [...r])), fps: WORLD_FPS, starts, translationScale: WORLD_SCALES.translation, rotationScale: WORLD_SCALES.rotation };+}++// ---------------------------------------------------------------------------+// The key script (the ComfyUI port's Nomas Camera Path)++/** OpenCV world (y down, z forward) → the port's Three.js world (y up, the camera looking down −Z). */+const toThree = (p: V3): V3 => [p[0], -p[1], -p[2]];++/** The port's camera (nomas/camera.py Pose): position, yaw and pitch (Euler 'YXZ', no roll), stepped one tick at a time. */+export class PortPose {+ constructor(+ public position: V3 = [0, 0, 0],+ public yaw = 0,+ public pitch = 0,+ ) {}++ copy(): PortPose {+ return new PortPose([...this.position], this.yaw, this.pitch);+ }++ /** The view direction (Three axes). */+ forward(): V3 {+ const cp = Math.cos(this.pitch);+ return [-Math.sin(this.yaw) * cp, Math.sin(this.pitch), -Math.cos(this.yaw) * cp];+ }++ /** One 24 fps control tick, as the port applies it. */+ step(keys: ReadonlySet<string>, mouseDx = 0, mouseDy = 0): void {+ const dt = 1 / WORLD_FPS;+ const f = this.forward();+ let right: V3 = [-f[2], 0, f[0]]; // cross(forward, up)+ const n = Math.hypot(...right);+ right = n > 1e-8 ? [right[0] / n, right[1] / n, right[2] / n] : [Math.cos(this.yaw), 0, -Math.sin(this.yaw)];+ const fw = (keys.has("w") ? 1 : 0) - (keys.has("s") ? 1 : 0);+ const rt = (keys.has("d") ? 1 : 0) - (keys.has("a") ? 1 : 0);+ const v = PORT_CONTROLS.moveSpeed * dt;+ this.position = [0, 1, 2].map((i) => this.position[i] + (f[i] * fw + right[i] * rt) * v) as V3;+ const turn = PORT_CONTROLS.turnDegPerSec * DEG * dt;+ this.yaw += turn * ((keys.has("left") ? 1 : 0) - (keys.has("right") ? 1 : 0)) - mouseDx * PORT_CONTROLS.mouseRadPerPx;+ this.pitch += turn * ((keys.has("up") ? 1 : 0) - (keys.has("down") ? 1 : 0)) - mouseDy * PORT_CONTROLS.mouseRadPerPx;+ }+}++/** A tick of the script: keys held for one frame, or a mouse drag in pixels (the port's `look`, which holds no keys). */+export type Tick = { keys: string[] } | { look: [number, number] };++/** A camera-to-world pose (OpenCV) as the port's position / yaw / pitch (Three axes). */+function portTarget(m: Mat4): { position: V3; yaw: number; pitch: number } {+ const f = toThree([m[0][2], m[1][2], m[2][2]]);+ return { position: toThree([m[0][3], m[1][3], m[2][3]]), yaw: Math.atan2(-f[0], -f[2]), pitch: Math.asin(Math.max(-1, Math.min(1, f[1]))) };+}++const wrap = (a: number) => Math.atan2(Math.sin(a), Math.cos(a));+/** How many arrow steps the heading may fall behind before a mouse drag catches it up (about 3.3°). */+const LOOK_DEBT = 4;++/**+ * Steer the port's camera along a turn's poses (`poses[0]` is where it starts), one tick per frame. The path is scaled so+ * its fastest stretch runs at 90 % of the keys' speed (less when it also turns faster than the arrows can, leaving room+ * for the mouse-drag ticks that catch the heading up, which hold no keys); keys and arrows are pressed when the simulated+ * camera falls half a step behind. The start pose carries the earlier turns' heading and tilt.+ */+export function steerTicks(poses: readonly Mat4[], start: PortPose = new PortPose()): { ticks: Tick[]; end: PortPose } {+ const n = poses.length - 1;+ if (n < 1) return { ticks: [], end: start.copy() };+ const first = portTarget(poses[0]);+ // The turn's own frame, turned to the camera's heading: the targets are relative to the turn's first pose.+ const rel = poses.map((m) => portTarget(m));+ let fastest = 0;+ let fastestTurn = 0;+ for (let i = 1; i <= n; i++) {+ fastest = Math.max(fastest, Math.hypot(...([0, 1, 2].map((a) => rel[i].position[a] - rel[i - 1].position[a]) as V3)));+ fastestTurn = Math.max(fastestTurn, Math.abs(wrap(rel[i].yaw - rel[i - 1].yaw)), Math.abs(rel[i].pitch - rel[i - 1].pitch));+ }+ const keyStep = PORT_CONTROLS.moveSpeed / WORLD_FPS;+ const arrowStep = (PORT_CONTROLS.turnDegPerSec * DEG) / WORLD_FPS;+ // Turning faster than the arrows: the heading falls behind by (turn − arrow) a tick, and a drag catches it up once it is+ // LOOK_DEBT arrow steps behind, so one tick in (m + 1) holds no keys; the path is slowed to leave that room.+ const behind = fastestTurn - arrowStep;+ const share = behind > 1e-9 ? 1 / ((LOOK_DEBT * arrowStep) / behind + 1) : 0;+ const scale = fastest > 1e-9 ? (keyStep * 0.9 * (1 - share)) / fastest : 0;+ // Rotate the turn's frame by the start heading so "forward" in the path is forward for the camera.+ const cy = Math.cos(start.yaw - first.yaw);+ const sy = Math.sin(start.yaw - first.yaw);+ const place = (p: V3): V3 => {+ const d: V3 = [(p[0] - first.position[0]) * scale, (p[1] - first.position[1]) * scale, (p[2] - first.position[2]) * scale];+ // Rotation about +Y by (start.yaw - first.yaw), Three axes.+ return [start.position[0] + cy * d[0] + sy * d[2], start.position[1] + d[1], start.position[2] - sy * d[0] + cy * d[2]];+ };+ const cam = start.copy();+ const ticks: Tick[] = [];+ for (let i = 1; i <= n; i++) {+ const want = place(rel[i].position);+ const wantYaw = start.yaw + wrap(rel[i].yaw - first.yaw);+ const wantPitch = start.pitch + (rel[i].pitch - first.pitch);+ const dyaw = wrap(wantYaw - cam.yaw);+ const dpitch = wantPitch - cam.pitch;+ // Turning further than the arrows reach this tick: a mouse drag (no keys) catches the heading up exactly.+ if (Math.abs(dyaw) > arrowStep * LOOK_DEBT || Math.abs(dpitch) > arrowStep * LOOK_DEBT) {+ const dx = -dyaw / PORT_CONTROLS.mouseRadPerPx;+ const dy = -dpitch / PORT_CONTROLS.mouseRadPerPx;+ const look: [number, number] = [tidy(dx, 3), tidy(dy, 3)];+ cam.step(new Set(), look[0], look[1]);+ ticks.push({ look });+ continue;+ }+ const keys: string[] = [];+ const f = cam.forward();+ const fr: V3 = [-f[2], 0, f[0]];+ const fn = Math.hypot(...fr) || 1;+ const r: V3 = [fr[0] / fn, 0, fr[2] / fn];+ const err: V3 = [want[0] - cam.position[0], want[1] - cam.position[1], want[2] - cam.position[2]];+ const along = err[0] * f[0] + err[1] * f[1] + err[2] * f[2];+ const side = err[0] * r[0] + err[2] * r[2];+ if (along > keyStep / 2) keys.push("w");+ else if (along < -keyStep / 2) keys.push("s");+ if (side > keyStep / 2) keys.push("d");+ else if (side < -keyStep / 2) keys.push("a");+ if (dyaw > arrowStep / 2) keys.push("left");+ else if (dyaw < -arrowStep / 2) keys.push("right");+ if (dpitch > arrowStep / 2) keys.push("up");+ else if (dpitch < -arrowStep / 2) keys.push("down");+ cam.step(new Set(keys));+ ticks.push({ keys });+ }+ return { ticks, end: cam };+}++/** Ticks as the port's script: runs of the same keys merged ("w+left 0.375"), one instruction per line. */+export function ticksScript(ticks: readonly Tick[]): string {+ const lines: string[] = [];+ let i = 0;+ while (i < ticks.length) {+ const t = ticks[i];+ let j = i + 1;+ if ("look" in t) {+ lines.push(`look ${t.look[0]} ${t.look[1]} ${secs(1)}`);+ i = j;+ continue;+ }+ const name = t.keys.length ? t.keys.join("+") : "wait";+ while (j < ticks.length && !("look" in ticks[j]) && ((ticks[j] as { keys: string[] }).keys.join("+") || "wait") === name) j++;+ lines.push(`${name} ${secs(j - i)}`);+ i = j;+ }+ return lines.join("\n");+}++/** Seconds of `n` ticks, written so the port's round(seconds × 24) gives back n. */+function secs(n: number): string {+ return String(tidy(n / WORLD_FPS, 4));+}++/** The port's own reading of a script (nomas/camera.py parse_script): one tick per frame. */+export function parseScript(script: string): Tick[] {+ const ticks: Tick[] = [];+ for (const raw of script.replace(/,/g, "\n").split("\n")) {+ const parts = raw.trim().toLowerCase().split(/\s+/).filter(Boolean);+ if (!parts.length || parts[0].startsWith("#")) continue;+ if (parts[0] === "look") {+ const dx = Number(parts[1]);+ const dy = Number(parts[2]);+ const n = Math.max(1, Math.round((parts.length > 3 ? Number(parts[3]) : 1) * WORLD_FPS));+ for (let k = 0; k < n; k++) ticks.push({ look: [dx / n, dy / n] });+ continue;+ }+ const keys = ["wait", "stay", "none"].includes(parts[0]) ? [] : parts[0].split("+");+ const n = Math.max(1, Math.round((parts.length > 1 ? Number(parts[1]) : 1) * WORLD_FPS));+ for (let k = 0; k < n; k++) ticks.push({ keys });+ }+ return ticks;+}++/** Ticks flown from `start`: the poses the port integrates (frame 0 = the start). */+export function flyTicks(ticks: readonly Tick[], start: PortPose = new PortPose()): PortPose[] {+ const cam = start.copy();+ const out = [cam.copy()];+ for (const t of ticks) {+ if ("look" in t) cam.step(new Set(), t.look[0], t.look[1]);+ else cam.step(new Set(t.keys));+ out.push(cam.copy());+ }+ return out;+}++export interface WorldScriptTurn {+ /** The port's script for this turn ("" for a still camera: the turn's length comes from its seconds). */+ script: string;+ /** Ticks in the script (= frames − 1 of the turn when it moves). */+ ticks: number;+}++/**+ * Every turn's key script, flown one after the other: a turn starts with the heading and tilt the one before left, as the+ * port's world carries its camera from turn to turn. A still turn has no script.+ */+export function worldScripts(turns: readonly WorldTurnCamera[]): WorldScriptTurn[] {+ let cam = new PortPose();+ return turns.map((t) => {+ if (!moveKeys(t.move).length) return { script: "", ticks: 0 };+ const { ticks, end } = steerTicks(turnPoses(t.move, t.seconds), cam);+ cam = end;+ return { script: ticksScript(ticks), ticks: ticks.length };+ });+}++/** A top-down sketch of the world's camera for "Preview the path": x / z of every frame (Three axes) and each turn's start. */+export function pathSketch(turns: readonly WorldTurnCamera[], step = 4): { points: [number, number][]; starts: number[]; headings: number[] } {+ const traj = worldTrajectory(turns);+ const points: [number, number][] = [];+ const headings: number[] = [];+ const starts: number[] = [];+ const keep = (i: number) => i % step === 0 || traj.starts.includes(i) || i === traj.c2ws.length - 1;+ traj.c2ws.forEach((m, i) => {+ if (!keep(i)) return;+ if (traj.starts.includes(i)) starts.push(points.length);+ const t = portTarget(m);+ points.push([tidy(t.position[0], 4), tidy(t.position[2], 4)]);+ headings.push(tidy(t.yaw, 4));+ });+ return { points, starts, headings };+}++export { PHOTO_KEY };diff --git a/src/lib/world.ts b/src/lib/world.tsnew file mode 100644index 00000000..3316b8f0--- /dev/null+++ b/src/lib/world.ts@@ -0,0 +1,357 @@+/**+ * World mode (package nm10-hy-nomas-world): a world you describe once, then steer turn by turn with words and camera+ * moves, on Hy-Nomas (Tencent Hunyuan, Apache-2.0) through Nynxz's ComfyUI port. Open engine only: Hy-Nomas is hosted on+ * neither fal nor Replicate.+ *+ * The state is a script: the opening (the scene, who the camera follows, the look) and the turns after it, each with its+ * words (what changes, what the subject does), a camera move from the fly-path library and its length. Running turn k+ * sends the script up to k; the graph chains the opening and every turn up to k, and saves turn k only.+ *+ * How the earlier turns' state reaches turn k: the port holds a world in ComfyUI's memory (its NOMAS_WORLD output and a+ * key/value cache in ComfyUI's temp folder), and ComfyUI keeps the outputs of the last prompt it ran. The chain for turn k+ * repeats turns 0…k−1 with exactly the same inputs, so ComfyUI reuses them and only turn k is generated. When the cache+ * no longer holds them (another job ran in between, a restart), ComfyUI simply generates them again from the same seed,+ * which takes longer and gives the same world. Redo from turn k changes turn k's inputs, so turns 0…k−1 are reused and k+ * onwards are made afresh.+ *+ * Pure: the browser and the server share it.+ */++import type { ComfyNode, ComfyWorkflow } from "./comfy";+import { PATH_PRESETS } from "./camera-path";+import { STILL_MOVE, WORLD_FPS, WORLD_SIZE, moveKeys, turnFrames, worldScripts, type WorldTurnCamera } from "./world-path";++/** The model, its op and the graph. */+export const WORLD_MODEL = "oss-hy-nomas-world";+export const WORLD_WORKFLOW = "world-hy-nomas-turn";+/** The open engine's join (video-concat-encoded: the turns share one size, rate and codec). */+export const WORLD_JOIN = "oss-join-encoded";++/** The port's subject token: the opening's subject is written this way in the scene and action text. */+export const SUBJECT_TOKEN = "<|Subject1|>";++export const WORLD_LIMITS = {+ /** Seconds per turn (Hy-Nomas's turns: 3–12 s; steps of half a second keep the frame count whole). */+ minSeconds: 3,+ maxSeconds: 12,+ step: 0.5,+ /** Turns, the opening included. */+ maxTurns: 10,+ /** The whole world: the port's noise bank is 120 s (it extends it, but the reference's interactive bank is 120 s). */+ maxTotal: 120,+ /** Characters of the scene and of each turn's words. */+ maxScene: 1200,+ maxWords: 400,+} as const;++/** The opening's camera, as Hy-Nomas's prompt enhancer names it (nomas/prompt.py PERSPECTIVES). */+export const PERSPECTIVES = [+ { id: "third-person follow", name: "Follows the subject" },+ { id: "third-person observer", name: "Watches from a distance" },+ { id: "first-person", name: "Through their eyes" },+ { id: "second-person", name: "Looking at the viewer" },+] as const;+/** The look (nomas/prompt.py STYLES, the ones that make sense for a film). */+export const STYLES = [+ { id: "real-world footage", name: "Real footage" },+ { id: "CG", name: "CG" },+ { id: "animation/anime", name: "Animation" },+ { id: "video game", name: "Video game" },+] as const;+export type Perspective = (typeof PERSPECTIVES)[number]["id"];+export type WorldStyle = (typeof STYLES)[number]["id"];++/** The camera moves a turn offers: a still camera, then the fly-path library. */+export const WORLD_MOVES: { id: string; name: string; description: string }[] = [+ { id: STILL_MOVE, name: "Still", description: "The camera stays put: only the words steer this turn" },+ ...PATH_PRESETS,+];++export interface WorldTurn {+ /** What changes in the world ("a wooden bridge crosses a stream ahead"). The opening's are its scene. */+ words: string;+ /** What the subject does during the turn (optional). */+ action?: string;+ /** A move id from WORLD_MOVES. */+ move: string;+ seconds: number;+}++export interface WorldOpening extends WorldTurn {+ /** Who or what the camera follows ("a small orange fox"); empty for a world with no one in it. */+ subject?: string;+ /** How they look. */+ details?: string;+ perspective?: Perspective;+ style?: WorldStyle;+}++export interface WorldScript {+ opening: WorldOpening;+ /** The turns after the opening. */+ turns: WorldTurn[];+ seed: number;+}++/** A turn of the script by index: 0 = the opening. */+export function turnAt(script: WorldScript, k: number): WorldTurn | undefined {+ return k === 0 ? script.opening : script.turns[k - 1];+}++/** Every turn, the opening first. */+export function allTurns(script: WorldScript): WorldTurn[] {+ return [script.opening, ...script.turns];+}++export const newTurn = (): WorldTurn => ({ words: "", move: "orbit_90_ccw", seconds: 5 });++export function newWorld(seed = Math.floor(Math.random() * 2 ** 31)): WorldScript {+ return {+ opening: { words: "", subject: "", details: "", action: "", perspective: "third-person follow", style: "real-world footage", move: "zoom_in", seconds: 5 },+ turns: [],+ seed,+ };+}++const clampSeconds = (s: number) => {+ const n = Number.isFinite(s) ? s : 5;+ return Math.min(WORLD_LIMITS.maxSeconds, Math.max(WORLD_LIMITS.minSeconds, Math.round(n / WORLD_LIMITS.step) * WORLD_LIMITS.step));+};+const knownMove = (m: string | undefined) => (m && WORLD_MOVES.some((x) => x.id === m) ? m : STILL_MOVE);+const text = (s: unknown, max: number) => (typeof s === "string" ? s.trim().slice(0, max) : "");++function tidyTurn(t: Partial<WorldTurn> | undefined): WorldTurn {+ const action = text(t?.action, WORLD_LIMITS.maxWords);+ return { words: text(t?.words, WORLD_LIMITS.maxWords), ...(action ? { action } : {}), move: knownMove(t?.move), seconds: clampSeconds(Number(t?.seconds)) };+}++/** A script as the planner runs it: lengths on the half second within 3–12 s, known moves, at most WORLD_LIMITS.maxTurns turns. */+export function normalizeWorld(s: Partial<WorldScript> | undefined): WorldScript {+ const o = s?.opening;+ const opening: WorldOpening = {+ ...tidyTurn(o),+ words: text(o?.words, WORLD_LIMITS.maxScene),+ subject: text(o?.subject, 120),+ details: text(o?.details, WORLD_LIMITS.maxWords),+ perspective: PERSPECTIVES.some((p) => p.id === o?.perspective) ? o!.perspective : "third-person follow",+ style: STYLES.some((p) => p.id === o?.style) ? o!.style : "real-world footage",+ };+ const seed = Number.isInteger(s?.seed) && (s!.seed as number) >= 0 ? (s!.seed as number) : 0;+ return { opening, turns: (s?.turns ?? []).slice(0, WORLD_LIMITS.maxTurns - 1).map(tidyTurn), seed };+}++/** Seconds of the world up to and including turn k (all of it by default). */+export function worldSeconds(script: WorldScript, upTo = script.turns.length): number {+ return allTurns(script)+ .slice(0, upTo + 1)+ .reduce((sum, t) => sum + t.seconds, 0);+}++/** What stops turn k from running, or null. */+export function worldProblem(script: WorldScript, k: number): string | null {+ if (!script.opening.words.trim()) return "Describe the world first: the opening is where it starts";+ if (k < 0 || k > script.turns.length) return "That turn isn't in this world";+ const t = turnAt(script, k)!;+ if (k > 0 && !t.words.trim() && !t.action?.trim() && t.move === STILL_MOVE) return `Turn ${k} needs words or a camera move`;+ if (worldSeconds(script, k) > WORLD_LIMITS.maxTotal + 1e-9) return `A world runs up to ${WORLD_LIMITS.maxTotal} s: shorten a turn`;+ return null;+}++// ---------------------------------------------------------------------------+// Turn state in the browser: which turns have a clip, and what Redo from here keeps++export interface WorldClip {+ /** The turn's generation and, once it has finished, its clip. */+ generationId: string;+ url?: string;+ /** The script the clip was made from, up to its turn: a clip is current only while that part is unchanged. */+ made: string;+}++/** The part of the script that turn k's clip depends on (everything up to k, and the seed). */+export function scriptKey(script: WorldScript, k: number): string {+ const o = script.opening;+ return JSON.stringify([script.seed, o.subject ?? "", o.details ?? "", o.perspective ?? "", o.style ?? "", allTurns(script).slice(0, k + 1).map((t) => [t.words, t.action ?? "", t.move, t.seconds])]);+}++/** Whether turn k's clip still matches the script (nothing up to k has changed since it was made). */+export function clipCurrent(script: WorldScript, k: number, clip: WorldClip | undefined): boolean {+ return !!clip && clip.made === scriptKey(script, k);+}++/** The next turn to run: the first one with no current clip (−1 when every turn has one). */+export function nextTurn(script: WorldScript, clips: readonly (WorldClip | undefined)[]): number {+ const n = script.turns.length + 1;+ for (let k = 0; k < n; k++) if (!clipCurrent(script, k, clips[k])) return k;+ return -1;+}++/** Whether turn k can run now: every earlier turn has a current, finished clip (the world continues from them). */+export function canRun(script: WorldScript, clips: readonly (WorldClip | undefined)[], k: number): boolean {+ for (let i = 0; i < k; i++) if (!clipCurrent(script, i, clips[i]) || !clips[i]?.url) return false;+ return worldProblem(script, k) === null;+}++/**+ * Redo from turn k: the turns before k keep their clips; turn k and every later turn lose theirs (the world after k is+ * made again from k), and their words and moves stay to be run again.+ */+export function redoFrom(clips: readonly (WorldClip | undefined)[], k: number): (WorldClip | undefined)[] {+ return clips.slice(0, Math.max(0, k));+}++/** The clips to join for Export: every turn's, in order, when every turn has a current finished clip; else null. */+export function exportClips(script: WorldScript, clips: readonly (WorldClip | undefined)[]): string[] | null {+ const n = script.turns.length + 1;+ const urls: string[] = [];+ for (let k = 0; k < n; k++) {+ const c = clips[k];+ if (!clipCurrent(script, k, c) || !c?.url) return null;+ urls.push(c.url);+ }+ return urls;+}++/** A turn's label for the timeline ("Opening", "Turn 2 · Arc 90° left · 5 s"). */+export function turnLabel(t: WorldTurn, k: number): string {+ const move = WORLD_MOVES.find((m) => m.id === t.move)?.name ?? "Still";+ return `${k === 0 ? "Opening" : `Turn ${k}`} · ${move} · ${t.seconds} s`;+}++// ---------------------------------------------------------------------------+// The port's turn lengths (nomas/nodes.py turn_frames and NomasWorldGenerate's lengths)++/** Latent frames of a turn (4 video frames each): a camera move makes frames + 1 poses, words alone round(s × 24) frames. */+export function turnLatents(t: Pick<WorldTurn, "move" | "seconds">): number {+ const n = turnFrames(t.seconds);+ return moveKeys(t.move).length ? Math.floor(n / 4) + 1 : Math.floor((Math.max(n, 5) - 1) / 4) + 1;+}++/** Latent frames before turn k: what the graph trims off so only turn k is decoded. */+export function latentsBefore(script: WorldScript, k: number): number {+ return allTurns(script)+ .slice(0, k)+ .reduce((sum, t) => sum + turnLatents(t), 0);+}++/** Seconds turn k's clip runs (VAE Decode makes 4 frames per latent frame). */+export function clipSeconds(t: Pick<WorldTurn, "move" | "seconds">): number {+ return Math.round(((turnLatents(t) * 4) / WORLD_FPS) * 100) / 100;+}++// ---------------------------------------------------------------------------+// Words as the port reads them++const escapeRe = (s: string) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");++/** The subject named in the text written as the port's token (case-insensitive, whole words). */+export function withSubject(text: string, subject: string | undefined): string {+ const s = subject?.trim();+ if (!s) return text.trim();+ return text.trim().replace(new RegExp(`\\b${escapeRe(s)}\\b`, "gi"), SUBJECT_TOKEN);+}++/** The opening as Nomas World Prompt's inputs. A scene that never names the subject gets it placed in view. */+export function openingInputs(o: WorldOpening): Record<string, string | number> {+ const subject = o.subject?.trim();+ let scene = withSubject(o.words, subject);+ if (subject && !scene.includes(SUBJECT_TOKEN)) scene = `${scene} ${SUBJECT_TOKEN} is in view.`.trim();+ return {+ perspective: o.perspective ?? "third-person follow",+ style: o.style ?? "real-world footage",+ // A world with no one in it: the camera itself is who the prompt follows.+ subject: subject || "the camera",+ subject_details: o.details?.trim() ?? "",+ scene,+ action: withSubject(o.action ?? "", subject),+ seconds: o.seconds,+ };+}++// ---------------------------------------------------------------------------+// The graph: the opening and every turn up to k chained, turn k decoded and saved++export class WorldGraphError extends Error {}++const linkFrom = (v: unknown): string | undefined => (Array.isArray(v) && typeof v[0] === "string" ? v[0] : undefined);++/**+ * world-hy-nomas-turn for turn k of a script: the template's loaders, its opening (Nomas World Prompt → Nomas World,+ * with the opening's camera script or none), one Nomas World Continue per later turn up to k (each with its own camera+ * script or none), then TrimVideoLatent cuts the earlier turns' latents off so VAE Decode, CreateVideo and SaveVideo+ * write turn k alone. Seed, size and steps stay as the bindings set them on the template's Nomas World node. Node ids are+ * the same for the same turn every time (o, c0; t1, c1 …), so ComfyUI reuses the turns it already made.+ */+export function expandWorldWorkflow(template: ComfyWorkflow, script: WorldScript, k: number): ComfyWorkflow {+ const wf: ComfyWorkflow = structuredClone(template);+ const of = (type: string) => Object.keys(wf).filter((id) => wf[id].class_type === type);+ const [promptId] = of("NomasWorldPrompt");+ const [genId] = of("NomasWorldGenerate");+ const [trimId] = of("TrimVideoLatent");+ const cont = of("NomasWorldContinue")[0];+ if (!promptId || !genId || !trimId || !cont) throw new WorldGraphError("This isn't the World graph (Nomas World Prompt, Nomas World, Nomas World Continue and TrimVideoLatent)");+ const problem = worldProblem(script, k);+ if (problem) throw new WorldGraphError(problem);+ const model = wf[genId].inputs.model;+ const clip = wf[genId].inputs.clip;+ const steps = wf[cont].inputs.steps ?? wf[genId].inputs.steps ?? 8;+ // Take the template's turn and camera nodes out: they are rebuilt below.+ const template_ = { gen: wf[genId], prompt: wf[promptId] };+ for (const id of [...of("NomasCameraPath"), ...of("NomasWorldContinue"), promptId, genId]) delete wf[id];++ const cameras: WorldTurnCamera[] = allTurns(script).slice(0, k + 1).map((t) => ({ move: t.move, seconds: t.seconds }));+ const scripts = worldScripts(cameras);+ const subject = script.opening.subject;+ const cam = (i: number): string | null => {+ if (!scripts[i].script) return null;+ const id = `c${i}`;+ wf[id] = { class_type: "NomasCameraPath", inputs: { script: scripts[i].script }, _meta: { title: i === 0 ? "Opening camera move" : `Turn ${i} camera move` } };+ return id;+ };++ wf.o = { class_type: "NomasWorldPrompt", inputs: openingInputs(script.opening), _meta: template_.prompt._meta ?? { title: "Opening turn" } };+ const c0 = cam(0);+ const gen: ComfyNode = { ...template_.gen, inputs: { ...template_.gen.inputs, turn: ["o", 0] } };+ if (c0) gen.inputs.camera = [c0, 0];+ else delete gen.inputs.camera;+ wf.w0 = gen;+ let last = "w0";+ for (let i = 1; i <= k; i++) {+ const t = script.turns[i - 1];+ const ci = cam(i);+ wf[`w${i}`] = {+ class_type: "NomasWorldContinue",+ inputs: {+ model,+ clip,+ world: [last, 1],+ change: withSubject(t.words, subject),+ action: withSubject(t.action ?? "", subject),+ ...(ci ? { camera: [ci, 0] } : {}),+ seconds: t.seconds,+ steps,+ },+ _meta: { title: `World: turn ${i}` },+ };+ last = `w${i}`;+ }+ wf[trimId].inputs.samples = [last, 0];+ wf[trimId].inputs.trim_amount = latentsBefore(script, k);+ // Nothing else may still point at a node taken out.+ for (const n of Object.values(wf)) for (const v of Object.values(n.inputs)) {+ const from = linkFrom(v);+ if (from && !wf[from]) throw new WorldGraphError(`The World graph still links to node ${from}`);+ }+ return wf;+}++/** The opening's size: Hy-Nomas was trained at 1280 × 704. */+export const WORLD_FRAME = WORLD_SIZE;++/** Read a script sent in params.extra.world (null when it isn't one). */+export function readWorld(v: unknown): WorldScript | null {+ if (!v || typeof v !== "object") return null;+ const s = v as Partial<WorldScript>;+ if (!s.opening || typeof s.opening !== "object" || !Array.isArray(s.turns ?? [])) return null;+ return normalizeWorld(s);+}diff --git a/src/server/cinema-generate.ts b/src/server/cinema-generate.tsindex 37e894d5..d984ac56 100644--- a/src/server/cinema-generate.ts+++ b/src/server/cinema-generate.ts@@ -5,6 +5,7 @@ import { getModel } from "@/lib/catalog";import {SWATCH_PLACEHOLDER,blockoutTake,+ worldTake,pathTake,planCinema,withPlaceholders,@@ -168,6 +169,7 @@ export function generateInProject(projectId: string, asked: CinemaRequest, folde...(input.action === "recompose" && input.capture ? { camera: { lens: input.capture.lens, aperture: input.capture.aperture, pose: input.capture.pose } } : {}),...(input.action === "path" && input.path ? { path: pathTake(input, plan) } : {}),...(input.action === "blockout" && input.blockout ? { blockout: blockoutTake(input, plan) } : {}),+ ...(input.action === "world" && input.world ? { world: worldTake(input) } : {}),};const batchId = nanoid(10);const made: Record<string, Generation[]> = {};diff --git a/src/server/cinema-schemas.ts b/src/server/cinema-schemas.tsindex f707a82f..e51ba9c5 100644--- a/src/server/cinema-schemas.ts+++ b/src/server/cinema-schemas.ts@@ -1,6 +1,7 @@import "server-only";import { z } from "zod";import { BLOCKOUT } from "@/lib/blockout";+import { PERSPECTIVES, STYLES, WORLD_LIMITS, type Perspective, type WorldStyle } from "@/lib/world";import { DISTANCE, MAX_KEYS } from "@/lib/camera-path";import { APERTURE, LENS } from "@/lib/scene3d";import { CinemaError } from "./cinema";@@ -103,12 +104,34 @@ export const BlockoutSchema = z.object({avoid: z.array(z.string().trim().max(120)).max(16).optional(),});+/** A World take (src/lib/catalog/cinema.ts WorldRun): the opening and the turns, the turn to run, or the clips to join. */+const WorldTurnSchema = z.object({+ words: z.string().max(WORLD_LIMITS.maxScene).default(""),+ action: z.string().max(WORLD_LIMITS.maxWords).optional(),+ move: z.string().max(40),+ seconds: z.number().min(WORLD_LIMITS.minSeconds).max(WORLD_LIMITS.maxSeconds),+});+export const WorldSchema = z.object({+ script: z.object({+ opening: WorldTurnSchema.extend({+ subject: z.string().max(120).optional(),+ details: z.string().max(WORLD_LIMITS.maxWords).optional(),+ perspective: z.enum(PERSPECTIVES.map((p) => p.id) as [Perspective, ...Perspective[]]).optional(),+ style: z.enum(STYLES.map((p) => p.id) as [WorldStyle, ...WorldStyle[]]).optional(),+ }),+ turns: z.array(WorldTurnSchema).max(WORLD_LIMITS.maxTurns - 1),+ seed: z.number().int().min(0).max(2 ** 31),+ }),+ turn: z.number().int().min(0).max(WORLD_LIMITS.maxTurns - 1),+ join: z.array(FileRef).min(2).max(WORLD_LIMITS.maxTurns).optional(),+});+export const GenerateBody = z.object({folderId: z.string().max(40).nullable().optional(),input: z.object({engine: z.enum(["cloud", "open"]),mode: z.enum(["video", "image"]),- action: z.enum(["generate", "extend-forward", "extend-backward", "edit", "grid", "cast", "location", "location-view", "scene", "recompose", "path", "turnaround", "blockout"]).default("generate"),+ action: z.enum(["generate", "extend-forward", "extend-backward", "edit", "grid", "cast", "location", "location-view", "scene", "recompose", "path", "turnaround", "blockout", "world"]).default("generate"),modelId: z.string().max(80).optional(),prompt: z.string().max(60_000).default(""),moves: z.array(z.string().max(40)).max(12).optional(),@@ -174,6 +197,8 @@ export const GenerateBody = z.object({turnaround: TurnaroundSchema.omit({ engine: true, realPerson: true, consent: true }).optional(),// Blockout to film: the grey box (its depth and first frame when the builder made them), beats, references, words.blockout: BlockoutSchema.optional(),+ // World mode (nm10-hy-nomas-world): the script, the turn to run, or the turns' clips to join (src/lib/world.ts).+ world: WorldSchema.optional(),}),});diff --git a/src/server/providers/comfyui.ts b/src/server/providers/comfyui.tsindex 85b60220..50aeb91e 100644--- a/src/server/providers/comfyui.ts+++ b/src/server/providers/comfyui.ts@@ -73,6 +73,7 @@ import { SpeechEditError, ttsInstruction, ttsLength, type SpeechWindow } from "@import { expandInbetweenWorkflow, type InbetweenPass } from "@/lib/av/inbetween-graph";import { gapPrompt, requestTiming, type InbetweenTiming } from "@/lib/inbetween";import { expandTimelineWorkflow, readTimeline } from "@/lib/av/timeline";+import { expandWorldWorkflow, readWorld, WorldGraphError, worldProblem, type WorldScript } from "@/lib/world";import { RTX_FRAMEGEN_WORKFLOW, RTX_HDR_WORKFLOW, RTX_MISSING } from "@/lib/catalog/rtx-video";import { exportValues, framesPerPass, hdrColorSpace, RTX_UPSCALE_WORKFLOW, rtxScale, upscaleShortSide, wholeClipProblem, wholeClipTool } from "@/lib/av/video-finish";import { keyFormatValues } from "@/lib/av/keying";@@ -1788,6 +1789,20 @@ export async function prepareWorkflow(endpointTemplate: string, input: GenInput,delete extra.inbetween;delete extra.stillMouth;}+ // World mode (world-hy-nomas-turn): the script and the turn asked for; the graph is rebuilt for them below. The script's+ // own seed always: the turns before this one must match the ones ComfyUI already made.+ let world: { script: WorldScript; turn: number } | null = null;+ if (manifest.expand === "world") {+ const script = readWorld(extra.world);+ const turn = Math.round(Number(extra.turn ?? 0));+ const problem = script ? worldProblem(script, turn) : "Describe the world first: the opening is where it starts";+ if (problem || !script) throw new ProviderError(problem ?? "Describe the world first", 400);+ world = { script, turn };+ if (b.prompt) values.prompt = script.opening.words;+ if (b.seed) values.seed = script.seed;+ }+ delete extra.world;+ delete extra.turn;const cues = manifest.expand === "captions" ? captionCues(input, extra) : [];delete extra.cues;delete extra.wordsPerCaption;@@ -2054,6 +2069,13 @@ export async function prepareWorkflow(endpointTemplate: string, input: GenInput,throw new ProviderError((e as Error).message, 400);}}+ if (world) {+ try {+ wf = expandWorldWorkflow(wf, world.script, world.turn);+ } catch (e) {+ throw new ProviderError((e as Error).message, e instanceof WorldGraphError ? 400 : 500);+ }+ }// Keyframe animation: one pass per gap on the shared loaders, every keyframe loaded once.if (inbetween) {try {diff --git a/tests/comfy-library-4.test.ts b/tests/comfy-library-4.test.tsindex efcfed5c..005a07ae 100644--- a/tests/comfy-library-4.test.ts+++ b/tests/comfy-library-4.test.ts@@ -173,6 +173,8 @@ describe("round-4 ComfyUI workflows", () => {"kandinsky6-t2av","kandinsky6-i2av","video-upscale-kandinsky6-vsr",+ // World mode (nm10-hy-nomas-world): Nynxz's ComfyUI-HyNomas isn't on the validation server (tests/world-mode.test.ts).+ "world-hy-nomas-turn",]);for (const w of manifest.workflows) for (const o of w.outputs) if (o.role) expect(ROLES, `${w.id} ${o.role}`).toContain(o.role);});diff --git a/tests/world-path.test.ts b/tests/world-path.test.tsnew file mode 100644index 00000000..638f9111--- /dev/null+++ b/tests/world-path.test.ts@@ -0,0 +1,204 @@+import { describe, expect, it } from "vitest";+import { PATH_PRESETS } from "@/lib/camera-path";+import {+ PortPose,+ STILL_MOVE,+ WORLD_FPS,+ WORLD_SCALES,+ flyTicks,+ matMul,+ moveKeys,+ parseScript,+ pathSketch,+ rigidInverse,+ steerTicks,+ ticksScript,+ turnFrames,+ turnPoses,+ worldIntrinsic,+ worldScripts,+ worldTrajectory,+} from "@/lib/world-path";++// World mode (nm10-hy-nomas-world): Fuobe's camera paths as Hy-Nomas reads a camera — Tencent's trajectory form+// (OpenCV camera-to-world + normalised intrinsics at 24 fps) and the ComfyUI port's key script.++const det3 = (m: number[][]) =>+ m[0][0] * (m[1][1] * m[2][2] - m[1][2] * m[2][1]) - m[0][1] * (m[1][0] * m[2][2] - m[1][2] * m[2][0]) + m[0][2] * (m[1][0] * m[2][1] - m[1][1] * m[2][0]);+const close = (a: number, b: number, eps = 1e-4) => Math.abs(a - b) < eps;++describe("the trajectory (Tencent's c2ws + intrinsics)", () => {+ it("makes one pose per frame at 24 fps plus the start, frame 0 the identity", () => {+ const t = worldTrajectory([{ move: "orbit_90_ccw", seconds: 5 }]);+ expect(t.fps).toBe(WORLD_FPS);+ expect(t.c2ws).toHaveLength(5 * 24 + 1);+ expect(t.intrinsics).toHaveLength(t.c2ws.length);+ expect(t.c2ws[0]).toEqual([+ [1, 0, 0, 0],+ [0, 1, 0, 0],+ [0, 0, 1, 0],+ [0, 0, 0, 1],+ ]);+ expect(turnFrames(3)).toBe(72);+ expect(turnFrames(12)).toBe(288);+ });++ it("keeps the release's default gains", () => {+ const t = worldTrajectory([{ move: "zoom_in", seconds: 3 }]);+ expect(t.translationScale).toBe(1);+ expect(t.rotationScale).toBe(2.5);+ expect(WORLD_SCALES).toEqual({ translation: 1, rotation: 2.5 });+ });++ it("writes rigid camera-to-world matrices in OpenCV axes (x right, y down, z forward)", () => {+ for (const p of PATH_PRESETS) {+ for (const m of worldTrajectory([{ move: p.id, seconds: 4 }]).c2ws) {+ const r = m.slice(0, 3).map((row) => row.slice(0, 3));+ expect(close(det3(r), 1, 1e-4), p.id).toBe(true);+ expect(m[3]).toEqual([0, 0, 0, 1]);+ }+ }+ // A dolly in moves along +z (the camera's forward) and keeps looking down +z.+ const dolly = worldTrajectory([{ move: "zoom_in", seconds: 3 }]).c2ws;+ const end = dolly.at(-1)!;+ expect(end[2][3]).toBeGreaterThan(0.3);+ expect(close(end[0][3], 0) && close(end[1][3], 0)).toBe(true);+ expect(close(end[2][2], 1)).toBe(true);+ // Truck right slides along +x without turning.+ const truck = worldTrajectory([{ move: "truck_right", seconds: 3 }]).c2ws.at(-1)!;+ expect(truck[0][3]).toBeGreaterThan(0.3);+ expect(close(truck[0][0], 1)).toBe(true);+ // An arc to the right swings the camera to +x and turns it back towards the subject (−x).+ const arc = worldTrajectory([{ move: "orbit_90_ccw", seconds: 3 }]).c2ws.at(-1)!;+ expect(arc[0][3]).toBeGreaterThan(0.5);+ expect(arc[0][2]).toBeLessThan(-0.9);+ });++ it("has normalised intrinsics: fx = f / width, fy = f / height, principal point at the centre", () => {+ const k = worldIntrinsic(55);+ expect(k[0][2]).toBe(0.5);+ expect(k[1][2]).toBe(0.5);+ expect(close(k[0][0], 0.5 / Math.tan((27.5 * Math.PI) / 180))).toBe(true);+ expect(close(k[1][1] / k[0][0], 1280 / 704)).toBe(true);+ expect(k[2]).toEqual([0, 0, 1]);+ });++ it("chains turns: each starts where the one before stopped", () => {+ const t = worldTrajectory([+ { move: "orbit_90_ccw", seconds: 3 },+ { move: STILL_MOVE, seconds: 4 },+ { move: "zoom_in", seconds: 3 },+ ]);+ expect(t.starts).toEqual([0, 72, 72 + 96]);+ expect(t.c2ws).toHaveLength(1 + 72 + 96 + 72);+ // The still turn holds the arc's last pose.+ expect(t.c2ws[72 + 96]).toEqual(t.c2ws[72]);+ // The dolly continues in the arc's end frame: relative to its first pose it is the same as a dolly from the start.+ const own = worldTrajectory([{ move: "zoom_in", seconds: 3 }]).c2ws.at(-1)!;+ const rel = matMul(rigidInverse(t.c2ws[72 + 96]), t.c2ws.at(-1)!);+ for (let i = 0; i < 3; i++) for (let j = 0; j < 4; j++) expect(close(rel[i][j], own[i][j], 1e-4)).toBe(true);+ });++ it("holds the camera for a still turn or an unknown move", () => {+ expect(moveKeys(STILL_MOVE)).toEqual([]);+ expect(moveKeys("nope")).toEqual([]);+ expect(new Set(turnPoses(STILL_MOVE, 3).map((m) => JSON.stringify(m))).size).toBe(1);+ });+});++describe("the key script (the ComfyUI port's Nomas Camera Path)", () => {+ it("is read back by the port's rules into exactly one tick per frame", () => {+ for (const p of PATH_PRESETS) {+ const [s] = worldScripts([{ move: p.id, seconds: 5 }]);+ expect(s.ticks, p.id).toBe(5 * 24);+ expect(parseScript(s.script), p.id).toHaveLength(5 * 24);+ }+ });++ it("is empty for a still camera (the turn's seconds set its length)", () => {+ expect(worldScripts([{ move: STILL_MOVE, seconds: 5 }])).toEqual([{ script: "", ticks: 0 }]);+ });++ it("flies a dolly in on W, a truck on D, a truck left on A", () => {+ expect(worldScripts([{ move: "zoom_in", seconds: 3 }])[0].script).toMatch(/^w /);+ expect(worldScripts([{ move: "zoom_out", seconds: 3 }])[0].script).toMatch(/^s /);+ expect(worldScripts([{ move: "truck_right", seconds: 3 }])[0].script).toMatch(/^d /);+ expect(worldScripts([{ move: "truck_left", seconds: 3 }])[0].script).toMatch(/^a /);+ });++ it("follows the path: the flown camera ends near the target, heading and all", () => {+ for (const id of ["orbit_90_ccw", "orbit_90_cw", "orbit_360", "orbit_180_push", "lemniscate", "zoom_in", "truck_right"]) {+ const poses = turnPoses(id, 6);+ const { ticks, end } = steerTicks(poses);+ const flown = flyTicks(ticks);+ const last = flown.at(-1)!;+ expect(last.yaw).toBeCloseTo(end.yaw, 9);+ // The heading matches the path's to within two arrow steps.+ const f = [poses.at(-1)![0][2], -poses.at(-1)![1][2], -poses.at(-1)![2][2]];+ const wantYaw = Math.atan2(-f[0], -f[2]);+ const err = Math.abs(Math.atan2(Math.sin(wantYaw - last.yaw), Math.cos(wantYaw - last.yaw)));+ expect(err, id).toBeLessThan(((2 * 20) / 24) * (Math.PI / 180) + 1e-6);+ }+ });++ it("moves in the path's direction (only direction and relative speed reach the model)", () => {+ // An arc to the right: the camera ends to the right of where it started and has turned left (towards the subject).+ const { ticks } = steerTicks(turnPoses("orbit_90_ccw", 5));+ const last = flyTicks(ticks).at(-1)!;+ expect(last.position[0]).toBeGreaterThan(0);+ expect(last.yaw).toBeGreaterThan(Math.PI / 2 - 0.05);+ // A full ring comes back round: heading +360° and the camera near where it started.+ const ring = flyTicks(steerTicks(turnPoses("orbit_360", 12)).ticks);+ const r = ring.at(-1)!;+ expect(r.yaw).toBeGreaterThan(2 * Math.PI - 0.05);+ const span = Math.max(...ring.map((p) => Math.abs(p.position[0])));+ expect(Math.hypot(r.position[0], r.position[2])).toBeLessThan(span * 0.15);+ });++ it("turns faster than the arrows with mouse drags (a full ring in 5 s is 72°/s)", () => {+ const { ticks } = steerTicks(turnPoses("orbit_360", 5));+ expect(ticks.some((t) => "look" in t)).toBe(true);+ expect(ticksScript(ticks)).toMatch(/^look -?\d/m);+ });++ it("carries the heading from turn to turn", () => {+ const [a, b] = worldScripts([+ { move: "orbit_90_ccw", seconds: 4 },+ { move: "zoom_in", seconds: 3 },+ ]);+ // The dolly after the arc is still flown on W: forward is the camera's, whatever its heading.+ expect(b.script).toMatch(/^w /);+ const start = flyTicks(parseScript(a.script)).at(-1)!;+ const after = flyTicks(parseScript(b.script), start).at(-1)!;+ const moved = [after.position[0] - start.position[0], after.position[2] - start.position[2]];+ const f = start.forward();+ expect(moved[0] * f[0] + moved[1] * f[2]).toBeGreaterThan(0);+ });++ it("merges runs of the same keys and writes seconds the port rounds back to whole ticks", () => {+ const script = ticksScript([{ keys: ["w"] }, { keys: ["w"] }, { keys: ["w", "left"] }, { keys: [] }, { look: [10, 0] }]);+ expect(script).toBe("w 0.0833\nw+left 0.0417\nwait 0.0417\nlook 10 0 0.0417");+ expect(parseScript(script)).toHaveLength(5);+ });++ it("flies the port's controls: W moves 2.8 units a second along the view, the arrows turn 20° a second", () => {+ const p = new PortPose();+ for (let i = 0; i < 24; i++) p.step(new Set(["w"]));+ expect(p.position[2]).toBeCloseTo(-2.8, 6);+ const q = new PortPose();+ for (let i = 0; i < 24; i++) q.step(new Set(["left"]));+ expect(q.yaw).toBeCloseTo((20 * Math.PI) / 180, 6);+ });+});++describe("the path preview", () => {+ it("sketches the camera from above with each turn's start marked", () => {+ const s = pathSketch([+ { move: "orbit_90_ccw", seconds: 4 },+ { move: "truck_left", seconds: 4 },+ ]);+ expect(s.starts).toEqual([0, expect.any(Number)]);+ expect(s.points.length).toBe(s.headings.length);+ expect(s.points[0]).toEqual([0, 0]);+ });+});diff --git a/workflows/comfyui/manifest.json b/workflows/comfyui/manifest.jsonindex f01b53c4..34cc3c23 100644--- a/workflows/comfyui/manifest.json+++ b/workflows/comfyui/manifest.json@@ -1,6 +1,6 @@{"version": 1,- "generatedAt": "2026-11-02T22:13:05.337Z",+ "generatedAt": "2026-11-03T05:21:42.050Z","comfyuiCommit": "fc04da91b2ab12f99e4716371a7e4f98ac982597","comfyuiVersion": "0.41.0","workflowTemplatesVersion": "0.11.86",@@ -25890,6 +25890,109 @@"validated": false,"notes": "The kandinsky6-sr pack's Video Super Resolution template, with Fuobe's bindings: LoadVideo -> GetVideoComponents -> Kandinsky6VSRUpscale (the 2-step distilled VSR DiT from Load Diffusion Model, the K-VAE and the latent upscaler bank; tiled diffusion in latent space, overlap 0.2, NABLA attention off) -> CreateVideo with the clip's own sound (trimmed to the frames kept) -> SaveVideo. scale = params.resolution as the pack's combo (\"2x\", \"2.25x\", \"4x\"); upscalerScale = the bank entry it needs (\"2x\" for 2x and 2.25x, \"4x\" for 4x). The pack resamples the clip to 24 fps and keeps at most 121 frames (about 5 s): Fuobe refuses a longer clip rather than cut it. 2x and 4x need sides that are multiples of 16. Each loader lists a file only with its config.json beside it (the eight files of the SR README's manual-download table, in diffusion_models/Kandinsky-6.0-VSR-distilled2steps-5s-Diffusers/). VRAM is not published: 24 GB is an estimate (a 3.19 GB DiT, a 6.96 GB K-VAE and a 7.31 GB latent upscaler bank, loaded one stage at a time). The same model runs on fal (kandinsky-vsr).","validationError": "HTTP 400: missing_node_type: Node 'Kandinsky VSR VAE' not found. The custom node may not be installed. (Node ID '#4')"+ },+ {+ "id": "world-hy-nomas-turn",+ "title": "World mode: one turn of a Hy-Nomas world (the opening and every turn before it, then this turn in words and a camera move, 1280x704 at 24 fps)",+ "capability": "world-turn",+ "file": "world-hy-nomas-turn.json",+ "source": "hand-built (scripts/comfy/hand-built/world-hy-nomas-turn.json)",+ "bindings": {+ "prompt": [+ {+ "node": "4",+ "input": "scene"+ }+ ],+ "seed": [+ {+ "node": "6",+ "input": "seed"+ }+ ],+ "width": [+ {+ "node": "6",+ "input": "width"+ }+ ],+ "height": [+ {+ "node": "6",+ "input": "height"+ }+ ],+ "steps": [+ {+ "node": "6",+ "input": "steps"+ },+ {+ "node": "8",+ "input": "steps"+ }+ ],+ "filenamePrefix": [+ {+ "node": "12",+ "input": "filename_prefix"+ }+ ]+ },+ "outputs": [+ {+ "node": "12",+ "kind": "video"+ }+ ],+ "defaults": {+ "width": 1280,+ "height": 704,+ "steps": 8,+ "fps": 24+ },+ "limits": {+ "maxDurationSec": 12,+ "dimensionMultiple": 32+ },+ "models": [+ {+ "file": "nomas_dit_distilled_int8_convrot.safetensors",+ "folder": "diffusion_models",+ "url": "https://huggingface.co/nynxz/Hy-Nomas/resolve/e8ddc4bfa664d69213930552493c220c3af56f41/nomas_dit_distilled_int8_convrot.safetensors",+ "sizeGb": 8.97+ },+ {+ "file": "qwen_2.5_vl_7b.safetensors",+ "folder": "text_encoders",+ "url": "https://huggingface.co/Comfy-Org/Qwen-Image/resolve/1f12b17be14c89b026c51a91d67c32f84bb047bc/split_files/text_encoders/qwen_2.5_vl_7b.safetensors",+ "sizeGb": 16.58+ },+ {+ "file": "nomas_pixelumm_vae_bf16.safetensors",+ "folder": "vae",+ "url": "https://huggingface.co/nynxz/Hy-Nomas/resolve/e8ddc4bfa664d69213930552493c220c3af56f41/nomas_pixelumm_vae_bf16.safetensors",+ "sizeGb": 15.78+ },+ {+ "file": "nomas_dit_distilled_bf16.safetensors",+ "folder": "diffusion_models",+ "url": "https://huggingface.co/nynxz/Hy-Nomas/resolve/e8ddc4bfa664d69213930552493c220c3af56f41/nomas_dit_distilled_bf16.safetensors",+ "sizeGb": 17.11,+ "optional": true+ }+ ],+ "customNodes": [+ {+ "name": "ComfyUI-HyNomas",+ "repo": "https://github.com/Nynxz/ComfyUI-HyNomas/tree/a89e0515619924da71093aa3fe52dbb7104cb06e"+ }+ ],+ "vramGb": 24,+ "license": "Apache-2.0 (Hy-Nomas DiT, Tencent Hunyuan; the ComfyUI files are nynxz/Hy-Nomas's conversion); PixelUMM decoder (nomas_pixelumm_vae_bf16, Tencent's fine-tune of NVIDIA PixelUMM): NVIDIA One-Way Noncommercial License (NON-COMMERCIAL research and evaluation only, per the converted weights' card); Qwen2.5-VL 7B text encoder Apache-2.0; ComfyUI-HyNomas nodes Apache-2.0",+ "validated": false,+ "notes": "Nynxz's ComfyUI-HyNomas (pinned at a89e0515) on core loaders: UNETLoader (the distilled DiT, int8 ConvRot, 8.97 GB), CLIPLoader qwen_image (qwen_2.5_vl_7b, 16.6 GB, shared with Qwen-Image), VAELoader (the PixelUMM decoder, 15.8 GB): about 25 GB of files beside the shared text encoder. The template is the pack's nomas_world example: Nomas World Prompt (perspective, style, subject, scene, action, seconds) -> Nomas World (seed, 1280x704, 8 Euler steps, window history) with a Nomas Camera Path, then Nomas World Continue for a turn (change, action, camera, seconds). Fuobe rebuilds it per run (expand: \"world\", src/lib/world.ts expandWorldWorkflow): the opening and one Continue per turn up to the one asked for, each with the key script src/lib/world-path.ts flies along the turn's camera move (or no camera for a still turn), then TrimVideoLatent drops the earlier turns' latents so VAE Decode -> CreateVideo 24 fps -> SaveVideo writes this turn alone. The port keeps a world in ComfyUI's memory (NOMAS_WORLD plus an int8 key/value cache in temp/nomas_history), and ComfyUI reuses the outputs of the last prompt it ran: the turns before this one have the same inputs and node ids every time, so only the new turn is generated; after another job or a restart they are generated again from the same seed. No sound (Hy-Nomas makes none). No image input: Hy-Nomas starts every world from words. Speed and VRAM are the port author's: about 21 s per 3 s turn plus about 4 s of decode per 10-latent window on an RTX 5090 at 1280x704 int8; Tencent's single-4090 configuration uses an int8 DiT and cache, an FP8 decoder and CPU offload. 24 GB is a guess. The pack patches the core loaders' model detection (Load Diffusion Model, Load VAE) to recognise the Nomas files.",+ "expand": "world"}]}diff --git a/workflows/comfyui/model-pins.json b/workflows/comfyui/model-pins.jsonindex 503233e7..e92235db 100644--- a/workflows/comfyui/model-pins.json+++ b/workflows/comfyui/model-pins.json@@ -1268,5 +1268,20 @@"revision": "59716e19a6cc97f91311edea190938219c097b76","sizeBytes": 884915688,"sha256": "3100fd296d2991f4859db9d83c43ece45f432659b06db3d79810dad033c62253"+ },+ "https://huggingface.co/nynxz/Hy-Nomas/resolve/e8ddc4bfa664d69213930552493c220c3af56f41/nomas_dit_distilled_int8_convrot.safetensors": {+ "revision": "e8ddc4bfa664d69213930552493c220c3af56f41",+ "sizeBytes": 8966889488,+ "sha256": "0cf9c169c22149c83c647485e5e30319f137cd153a62bdf5813bc0657520b835"+ },+ "https://huggingface.co/nynxz/Hy-Nomas/resolve/e8ddc4bfa664d69213930552493c220c3af56f41/nomas_dit_distilled_bf16.safetensors": {+ "revision": "e8ddc4bfa664d69213930552493c220c3af56f41",+ "sizeBytes": 17107123184,+ "sha256": "fecc7c94de4c4d7a9513e4d9c15c430fad24927554e5a2531b2d36313bafdbb7"+ },+ "https://huggingface.co/nynxz/Hy-Nomas/resolve/e8ddc4bfa664d69213930552493c220c3af56f41/nomas_pixelumm_vae_bf16.safetensors": {+ "revision": "e8ddc4bfa664d69213930552493c220c3af56f41",+ "sizeBytes": 15776972360,+ "sha256": "2003b63f87917f80061d0196c3114c70374c4d60a44ce72e03cf52305eeaa5e3"}}diff --git a/workflows/comfyui/object_info.subset.json b/workflows/comfyui/object_info.subset.jsonindex 6331a8e7..e80eb10e 100644--- a/workflows/comfyui/object_info.subset.json+++ b/workflows/comfyui/object_info.subset.json@@ -17265,6 +17265,528 @@"has_intermediate_output": false,"search_aliases": []},+ "NomasCameraPath": {+ "input": {+ "required": {+ "script": [+ "STRING",+ {+ "tooltip": "One '<keys> <seconds>' per line, keys joined with + (w a s d up down left right, or wait). 'look <dx> <dy> <seconds>' is a mouse drag in pixels.",+ "multiline": true,+ "default": "w 2\nw+left 1.5\nw 1.5"+ }+ ]+ },+ "optional": {}+ },+ "input_order": {+ "required": [+ "script"+ ],+ "optional": []+ },+ "is_input_list": false,+ "output": [+ "NOMAS_CAMERA"+ ],+ "output_is_list": [+ false+ ],+ "output_name": [+ "camera"+ ],+ "name": "NomasCameraPath",+ "display_name": "Nomas Camera Path",+ "description": "A camera move for one turn, as keys held for a time (the demo's controls at 24 fps). W/S move along the view, A/D strafe, the arrows turn 20 deg/s. Only the direction and the relative speed of moves reach the model; turning speed matters.",+ "python_module": "custom_nodes.ComfyUI-HyNomas",+ "category": "video/nomas",+ "output_node": false+ },+ "NomasExplore": {+ "input": {+ "required": {+ "model": [+ "MODEL",+ {}+ ],+ "clip": [+ "CLIP",+ {}+ ],+ "vae": [+ "VAE",+ {}+ ],+ "turn": [+ "NOMAS_TURN",+ {}+ ],+ "seed": [+ "INT",+ {+ "default": 42,+ "min": 0,+ "max": 18446744073709551615+ }+ ],+ "width": [+ "INT",+ {+ "default": 1280,+ "min": 256,+ "max": 2048,+ "step": 32+ }+ ],+ "height": [+ "INT",+ {+ "default": 704,+ "min": 256,+ "max": 2048,+ "step": 32+ }+ ],+ "change": [+ "STRING",+ {+ "multiline": false,+ "default": ""+ }+ ],+ "action": [+ "STRING",+ {+ "multiline": false,+ "default": ""+ }+ ],+ "seconds": [+ "FLOAT",+ {+ "default": 3.0,+ "min": 0.5,+ "max": 15.0,+ "step": 0.5+ }+ ],+ "steps": [+ "INT",+ {+ "advanced": true,+ "default": 8,+ "min": 1,+ "max": 16+ }+ ],+ "history": [+ "COMBO",+ {+ "advanced": true,+ "default": "window",+ "multiselect": false,+ "options": [+ "window",+ "full"+ ]+ }+ ],+ "controls": [+ "STRING",+ {+ "advanced": true,+ "multiline": false,+ "default": ""+ }+ ]+ },+ "optional": {}+ },+ "input_order": {+ "required": [+ "model",+ "clip",+ "vae",+ "turn",+ "seed",+ "width",+ "height",+ "change",+ "action",+ "seconds",+ "steps",+ "history",+ "controls"+ ],+ "optional": []+ },+ "is_input_list": false,+ "output": [+ "IMAGE",+ "LATENT",+ "NOMAS_WORLD"+ ],+ "output_is_list": [+ false,+ false,+ false+ ],+ "output_name": [+ "turn_frames",+ "LATENT",+ "world"+ ],+ "name": "NomasExplore",+ "display_name": "Nomas Explore",+ "description": "Explore a Hy-Nomas world interactively: hold W/A/S/D and the arrow keys (or drag with the mouse) to record a camera move, and each move becomes the next turn of the world. Holds the world in memory between runs.",+ "python_module": "custom_nodes.ComfyUI-HyNomas",+ "category": "video/nomas",+ "output_node": true+ },+ "NomasPromptJSON": {+ "input": {+ "required": {+ "json": [+ "STRING",+ {+ "multiline": true,+ "default": ""+ }+ ]+ },+ "optional": {}+ },+ "input_order": {+ "required": [+ "json"+ ],+ "optional": []+ },+ "is_input_list": false,+ "output": [+ "NOMAS_TURN"+ ],+ "output_is_list": [+ false+ ],+ "output_name": [+ "turn"+ ],+ "name": "NomasPromptJSON",+ "display_name": "Nomas Prompt (JSON)",+ "description": "A whole Hy-Nomas prompt as JSON (perspective_view, Style, subject_list, segments with start_time / end_time), as in the release's examples/prompts.json. Each segment becomes one turn.",+ "python_module": "custom_nodes.ComfyUI-HyNomas",+ "category": "video/nomas",+ "output_node": false+ },+ "NomasWorldContinue": {+ "input": {+ "required": {+ "model": [+ "MODEL",+ {}+ ],+ "clip": [+ "CLIP",+ {}+ ],+ "world": [+ "NOMAS_WORLD",+ {}+ ],+ "change": [+ "STRING",+ {+ "multiline": true,+ "default": ""+ }+ ],+ "action": [+ "STRING",+ {+ "multiline": true,+ "default": ""+ }+ ],+ "seconds": [+ "FLOAT",+ {+ "tooltip": "Unless the camera path sets it.",+ "default": 5.0,+ "min": 0.5,+ "max": 30.0,+ "step": 0.5+ }+ ],+ "steps": [+ "INT",+ {+ "advanced": true,+ "default": 8,+ "min": 1,+ "max": 16+ }+ ]+ },+ "optional": {+ "camera": [+ "NOMAS_CAMERA",+ {}+ ]+ }+ },+ "input_order": {+ "required": [+ "model",+ "clip",+ "world",+ "change",+ "action",+ "seconds",+ "steps"+ ],+ "optional": [+ "camera"+ ]+ },+ "is_input_list": false,+ "output": [+ "LATENT",+ "NOMAS_WORLD"+ ],+ "output_is_list": [+ false,+ false+ ],+ "output_name": [+ "LATENT",+ "world"+ ],+ "name": "NomasWorldContinue",+ "display_name": "Nomas World Continue",+ "description": "Adds one turn to a world: a change in words, a camera move, or both. The latent holds the whole world.",+ "python_module": "custom_nodes.ComfyUI-HyNomas",+ "category": "video/nomas",+ "output_node": false+ },+ "NomasWorldGenerate": {+ "input": {+ "required": {+ "model": [+ "MODEL",+ {+ "tooltip": "The Nomas DiT (Load Diffusion Model)."+ }+ ],+ "clip": [+ "CLIP",+ {+ "tooltip": "qwen_2.5_vl_7b from Load CLIP, type qwen_image."+ }+ ],+ "turn": [+ "NOMAS_TURN",+ {}+ ],+ "seed": [+ "INT",+ {+ "default": 42,+ "min": 0,+ "max": 18446744073709551615,+ "control_after_generate": true+ }+ ],+ "width": [+ "INT",+ {+ "tooltip": "Trained at 1280x704 (the release's '720p' is 704 rows).",+ "default": 1280,+ "min": 256,+ "max": 2048,+ "step": 32+ }+ ],+ "height": [+ "INT",+ {+ "default": 704,+ "min": 256,+ "max": 2048,+ "step": 32+ }+ ],+ "steps": [+ "INT",+ {+ "tooltip": "Euler steps on the shift-5 schedule. The distilled DiT was made for 4, 6 or 8.",+ "advanced": true,+ "default": 8,+ "min": 1,+ "max": 16+ }+ ],+ "history": [+ "COMBO",+ {+ "advanced": true,+ "default": "window",+ "multiselect": false,+ "options": [+ "window",+ "full"+ ]+ }+ ]+ },+ "optional": {+ "camera": [+ "NOMAS_CAMERA",+ {+ "tooltip": "A camera path for the first turn."+ }+ ]+ }+ },+ "input_order": {+ "required": [+ "model",+ "clip",+ "turn",+ "seed",+ "width",+ "height",+ "steps",+ "history"+ ],+ "optional": [+ "camera"+ ]+ },+ "is_input_list": false,+ "output": [+ "LATENT",+ "NOMAS_WORLD"+ ],+ "output_is_list": [+ false,+ false+ ],+ "output_name": [+ "LATENT",+ "world"+ ],+ "name": "NomasWorldGenerate",+ "display_name": "Nomas World",+ "description": "Generates a Hy-Nomas world segment by segment. Each segment attends to a cache of the earlier ones. Decode the latent with VAE Decode and the PixelUMM VAE; continue it with Nomas World Continue.",+ "python_module": "custom_nodes.ComfyUI-HyNomas",+ "category": "video/nomas",+ "output_node": false+ },+ "NomasWorldPrompt": {+ "input": {+ "required": {+ "perspective": [+ "COMBO",+ {+ "default": "third-person follow",+ "multiselect": false,+ "options": [+ "first-person",+ "second-person",+ "third-person follow",+ "third-person observer"+ ]+ }+ ],+ "style": [+ "COMBO",+ {+ "default": "real-world footage",+ "multiselect": false,+ "options": [+ "real-world footage",+ "animation/anime",+ "CG",+ "video game",+ "software/web/app/computer screen recording",+ "slideshow"+ ]+ }+ ],+ "subject": [+ "STRING",+ {+ "tooltip": "Who the camera follows. Written as <|Subject1|> in the scene and action text.",+ "multiline": false,+ "default": "a small orange fox"+ }+ ],+ "subject_details": [+ "STRING",+ {+ "multiline": true,+ "default": "Orange fur, a white chest and a fluffy tail."+ }+ ],+ "scene": [+ "STRING",+ {+ "tooltip": "The opening shot. Use <|Subject1|> for the subject.",+ "multiline": true,+ "default": "<|Subject1|> stands on a stone path in a luminous forest at dusk. Blue fireflies drift between tall mossy trees, and soft mist hangs over the ground."+ }+ ],+ "action": [+ "STRING",+ {+ "tooltip": "What happens during the turn (optional). Leave empty for a camera-driven turn.",+ "multiline": true,+ "default": "<|Subject1|> walks slowly along the path."+ }+ ],+ "seconds": [+ "FLOAT",+ {+ "tooltip": "Length of the turn, unless a camera path sets it.",+ "default": 5.0,+ "min": 0.5,+ "max": 30.0,+ "step": 0.5+ }+ ]+ },+ "optional": {}+ },+ "input_order": {+ "required": [+ "perspective",+ "style",+ "subject",+ "subject_details",+ "scene",+ "action",+ "seconds"+ ],+ "optional": []+ },+ "is_input_list": false,+ "output": [+ "NOMAS_TURN"+ ],+ "output_is_list": [+ false+ ],+ "output_name": [+ "turn"+ ],+ "name": "NomasWorldPrompt",+ "display_name": "Nomas World Prompt",+ "description": "The first turn of a Hy-Nomas world, in the format its prompt enhancer writes: perspective, style, one subject and a scene description, with an optional action.",+ "python_module": "custom_nodes.ComfyUI-HyNomas",+ "category": "video/nomas",+ "output_node": false+ },"OpenH3RegenFastVAEDecode": null,"OpenH3RegenFinish": null,"OpenH3RegenLora": null,diff --git a/workflows/comfyui/packs.json b/workflows/comfyui/packs.jsonindex 538c224b..66c25ee7 100644--- a/workflows/comfyui/packs.json+++ b/workflows/comfyui/packs.json@@ -53,6 +53,15 @@"subdir": null,"folders": []},+ "ComfyUI-HyNomas": {+ "repo": "https://github.com/Nynxz/ComfyUI-HyNomas",+ "commit": "a89e0515619924da71093aa3fe52dbb7104cb06e",+ "registry": null,+ "requirementsTxt": false,+ "isolated": false,+ "subdir": null,+ "folders": []+ },"ComfyUI-IndexTTS2": {"repo": "https://github.com/snicolast/ComfyUI-IndexTTS2","commit": "5b33e02bc0112b8aaf1fc823d5e5a609ca07fc27",diff --git a/workflows/comfyui/requirements.json b/workflows/comfyui/requirements.jsonindex 5a437e23..f6d60a49 100644--- a/workflows/comfyui/requirements.json+++ b/workflows/comfyui/requirements.json@@ -1,15 +1,16 @@{"v": 1,- "hash": "15701d79960e79c16b68f3d53c7344f63578c67f1f886c61d98246ec18afce08",+ "hash": "508900b61c2ac3392ae778c9941791ef7b26dbc201f528bd41961dd256d949b8","comfyui": {"min":"0.41.0","testedCommit":"fc04da91"},"folders": ["Hi3D","RMBG","audio_encoders","background_removal","checkpoints","clip_vision","dbs","diffusion_models","facerestore_models","foley","frame_interpolation","geometry_estimation","insightface","kandinsky6_audio_vae","latent_upscale_models","loras","mmaudio","model_patches","optical_flow","reuse","text_encoders","thinksound","upscale_models","vae"],- "sentinels": ["AILab_FeyNoBg","AILab_Qwen3ASRSubtitle","AILab_Qwen3TTSVoiceClone_Advanced","AILab_Qwen3TTSVoiceDesign_Advanced","AILab_VRMBG","AUSBOSS_NODES_CropForInpaint","AUSBOSS_NODES_ImageCropRotatePad","AUSBOSS_NODES_StitchInpaint","Add Subtitles To Frames","Apply Whisper","AuKGenerateEdit","AuKModelLoader","CFGOverride","ClothesSegment","ComfyMathExpression","CorridorKey2","CropFuobeLive","DBSLoader","DBSSeparate","DownloadAndLoadWav2VecModel","DualModelGuider","FL_ChatterboxDialogTTS","FL_ChatterboxMultilingualTTS","FL_ChatterboxVC","GetImageRangeFromBatch","GetImageSizeAndCount","GrowMaskWithBlur","H3AdaLNLoRAFix","H3CharacterSwapAssemble","H3CharacterSwapController","H3CharacterSwapExpandMask","H3CharacterSwapModels","H3CharacterSwapPrepareVideo","H3CharacterSwapRecoverMasks","H3CharacterSwapSelectSubject","H3CharacterSwapSettings","H3CharacterSwapShot","H3CharacterSwapWindowPlan","H3RelayAppendWindow","H3RelayApplyEditMask","H3RelayApplyHistory","H3RelayExpandMask","H3RelayFinishWindows","H3RelayPrepareSource","H3RelayRecoverMasks","H3RelayReviewWindows","H3RelaySamplingMemory","H3RelaySelectMask","H3RelayTextMemory","H3RelayWindowInputs","H3RelayWindowPlan","H3SLAAttention","Hi3DLoadMesh","Hi3DModelLoader","Hi3DRefine","HunyuanDependenciesLoader","HunyuanFoleySampler","HunyuanModelLoader","INTConstant","Ideogram4Scheduler","IdolCamera","IdolPreprocessImage","IdolPruneSplat","ImageBatchExtendWithOverlap","ImageGridtoBatch","ImageResizeKJv2","IndexTTS2Simple","Kandinsky6AudioVAEDecode","Kandinsky6AudioVAELoader","Kandinsky6BeautifyPrompt","Kandinsky6EmptyLatent","Kandinsky6ImageToVideoAudio","Kandinsky6LatentUpscalerLoader","Kandinsky6RemoveReferenceLatent","Kandinsky6SRVAELoader","Kandinsky6Sampler","Kandinsky6TextEncode","Kandinsky6VSRUpscale","Krea2EditGroundedEncode","Krea2EditModelPatch","Krea2OstrisEditModelPatch","LTXAVTextEncoderLoader","LTXAddVideoICLoRAGuide","LTXICLoRALoaderModelOnly","LTXVAddGuide","LTXVAudioVAEDecode","LTXVAudioVAELoader","LTXVConcatAVLatent","LTXVConditioning","LTXVCropGuides","LTXVDualCFGGuider","LTXVEmptyLatentAudio","LTXVImgToVideoInplace","LTXVLatentUpsampler","LTXVPreprocess","LTXVScheduler","LTXVSeparateAVLatent","LTXVTiledFusionSampler","LatentSyncNode","LoadBackgroundRemovalModel","LoadImageFuobeLive","LoadVideoDepthAnythingModel","MMAudioFeatureUtilsLoader","MMAudioModelLoader","MMAudioSampler","MelBandRoFormerModelLoader","MelBandRoFormerSampler","MiniMaxH3TurboLoRA","MiniMaxH3TurboSampler","MultiTalkModelLoader","MultiTalkWav2VecEmbeds","OpenH3LoadRefinedLatent","OpenH3RegenFastVAEDecode","OpenH3RegenFinish","OpenH3RegenLora","OpenH3RegenPrepareDraft","OpenH3RegenRefineLatent","OpenH3RegenSigmas","OpenH3RegenUpscale","OpenH3SaveRefinedLatent","PasteBackFuobeLive","Qwen21EncodeFuobeLive","Qwen21ReferenceFuobeLive","QwenImage21Cache","REUSEEnhance","REUSELoader","RIFE VFI","RMBG","RTXTrueHDR","RTXVideoFrameGeneration","RTXVideoSuperResolution","ReActorFaceSwap","RemoveBackground","SAM3_Detect","SAM3_TrackToMask","SAM3_VideoTrack","SaveImageFuobeLive","SeedVR2Conditioning","SeedVR2PostProcessing","SeedVR2Preprocess","TS_ImageToSVGStringColor_Vtracer","TS_SVGStringToSVGBytesIO","TextEncodeFibo2","TextEncodeKrea2OstrisEdit","TextEncodeQwenImage21","ThinkSoundFeatureUtilsLoader","ThinkSoundModelLoader","ThinkSoundSampler","Trellis2Conditioning","Trellis2ShapeStage","Trellis2TextureStage","Trellis2UpsampleStage","VHS_BatchManager","VHS_LoadAudioUpload","VHS_LoadVideo","VHS_SelectEveryNthImage","VHS_VideoCombine","VHS_VideoInfo","VHS_VideoInfoLoaded","VideoDepthAnythingOutput","VideoDepthAnythingProcess","VideoLengthAdjuster","VoxCPM2_Clone","VoxCPM2_TTS","WanVideoBlockSwap","WanVideoClipVisionEncode","WanVideoDecode","WanVideoEncode","WanVideoImageToVideoMultiTalk","WanVideoLoraSelect","WanVideoModelLoader","WanVideoPassImagesFromSamples","WanVideoSampler","WanVideoTextEncodeCached","WanVideoVAELoader","ZenImage21AdapterLoader","ZenImage21TextEncode"],+ "sentinels": ["AILab_FeyNoBg","AILab_Qwen3ASRSubtitle","AILab_Qwen3TTSVoiceClone_Advanced","AILab_Qwen3TTSVoiceDesign_Advanced","AILab_VRMBG","AUSBOSS_NODES_CropForInpaint","AUSBOSS_NODES_ImageCropRotatePad","AUSBOSS_NODES_StitchInpaint","Add Subtitles To Frames","Apply Whisper","AuKGenerateEdit","AuKModelLoader","CFGOverride","ClothesSegment","ComfyMathExpression","CorridorKey2","CropFuobeLive","DBSLoader","DBSSeparate","DownloadAndLoadWav2VecModel","DualModelGuider","FL_ChatterboxDialogTTS","FL_ChatterboxMultilingualTTS","FL_ChatterboxVC","GetImageRangeFromBatch","GetImageSizeAndCount","GrowMaskWithBlur","H3AdaLNLoRAFix","H3CharacterSwapAssemble","H3CharacterSwapController","H3CharacterSwapExpandMask","H3CharacterSwapModels","H3CharacterSwapPrepareVideo","H3CharacterSwapRecoverMasks","H3CharacterSwapSelectSubject","H3CharacterSwapSettings","H3CharacterSwapShot","H3CharacterSwapWindowPlan","H3RelayAppendWindow","H3RelayApplyEditMask","H3RelayApplyHistory","H3RelayExpandMask","H3RelayFinishWindows","H3RelayPrepareSource","H3RelayRecoverMasks","H3RelayReviewWindows","H3RelaySamplingMemory","H3RelaySelectMask","H3RelayTextMemory","H3RelayWindowInputs","H3RelayWindowPlan","H3SLAAttention","Hi3DLoadMesh","Hi3DModelLoader","Hi3DRefine","HunyuanDependenciesLoader","HunyuanFoleySampler","HunyuanModelLoader","INTConstant","Ideogram4Scheduler","IdolCamera","IdolPreprocessImage","IdolPruneSplat","ImageBatchExtendWithOverlap","ImageGridtoBatch","ImageResizeKJv2","IndexTTS2Simple","Kandinsky6AudioVAEDecode","Kandinsky6AudioVAELoader","Kandinsky6BeautifyPrompt","Kandinsky6EmptyLatent","Kandinsky6ImageToVideoAudio","Kandinsky6LatentUpscalerLoader","Kandinsky6RemoveReferenceLatent","Kandinsky6SRVAELoader","Kandinsky6Sampler","Kandinsky6TextEncode","Kandinsky6VSRUpscale","Krea2EditGroundedEncode","Krea2EditModelPatch","Krea2OstrisEditModelPatch","LTXAVTextEncoderLoader","LTXAddVideoICLoRAGuide","LTXICLoRALoaderModelOnly","LTXVAddGuide","LTXVAudioVAEDecode","LTXVAudioVAELoader","LTXVConcatAVLatent","LTXVConditioning","LTXVCropGuides","LTXVDualCFGGuider","LTXVEmptyLatentAudio","LTXVImgToVideoInplace","LTXVLatentUpsampler","LTXVPreprocess","LTXVScheduler","LTXVSeparateAVLatent","LTXVTiledFusionSampler","LatentSyncNode","LoadBackgroundRemovalModel","LoadImageFuobeLive","LoadVideoDepthAnythingModel","MMAudioFeatureUtilsLoader","MMAudioModelLoader","MMAudioSampler","MelBandRoFormerModelLoader","MelBandRoFormerSampler","MiniMaxH3TurboLoRA","MiniMaxH3TurboSampler","MultiTalkModelLoader","MultiTalkWav2VecEmbeds","NomasCameraPath","NomasWorldContinue","NomasWorldGenerate","NomasWorldPrompt","OpenH3LoadRefinedLatent","OpenH3RegenFastVAEDecode","OpenH3RegenFinish","OpenH3RegenLora","OpenH3RegenPrepareDraft","OpenH3RegenRefineLatent","OpenH3RegenSigmas","OpenH3RegenUpscale","OpenH3SaveRefinedLatent","PasteBackFuobeLive","Qwen21EncodeFuobeLive","Qwen21ReferenceFuobeLive","QwenImage21Cache","REUSEEnhance","REUSELoader","RIFE VFI","RMBG","RTXTrueHDR","RTXVideoFrameGeneration","RTXVideoSuperResolution","ReActorFaceSwap","RemoveBackground","SAM3_Detect","SAM3_TrackToMask","SAM3_VideoTrack","SaveImageFuobeLive","SeedVR2Conditioning","SeedVR2PostProcessing","SeedVR2Preprocess","TS_ImageToSVGStringColor_Vtracer","TS_SVGStringToSVGBytesIO","TextEncodeFibo2","TextEncodeKrea2OstrisEdit","TextEncodeQwenImage21","ThinkSoundFeatureUtilsLoader","ThinkSoundModelLoader","ThinkSoundSampler","Trellis2Conditioning","Trellis2ShapeStage","Trellis2TextureStage","Trellis2UpsampleStage","VHS_BatchManager","VHS_LoadAudioUpload","VHS_LoadVideo","VHS_SelectEveryNthImage","VHS_VideoCombine","VHS_VideoInfo","VHS_VideoInfoLoaded","VideoDepthAnythingOutput","VideoDepthAnythingProcess","VideoLengthAdjuster","VoxCPM2_Clone","VoxCPM2_TTS","WanVideoBlockSwap","WanVideoClipVisionEncode","WanVideoDecode","WanVideoEncode","WanVideoImageToVideoMultiTalk","WanVideoLoraSelect","WanVideoModelLoader","WanVideoPassImagesFromSamples","WanVideoSampler","WanVideoTextEncodeCached","WanVideoVAELoader","ZenImage21AdapterLoader","ZenImage21TextEncode"],"packs": {"ComfyUI-AuK": {"repo":"https://github.com/Tencent-Hunyuan/AuK","commit":"0d40366b1039e37c6cad008ab4713f6ad6d954b7","classes":["AuKGenerateEdit","AuKModelLoader"],"folders":[],"isolated":false,"subdir":"comfyui/ComfyUI-AuK","requirementsTxt":false,"install":"manual"},"ComfyUI-CorridorKey2": {"repo":"https://github.com/hashu786/ComfyUI-CorridorKey2","commit":"d1228b68796786acee92b6497f72a60d70d1a844","classes":["CorridorKey2"],"folders":["corridorkey2"],"isolated":false,"requirementsTxt":true,"install":"manual"},"ComfyUI-DBS": {"repo":"https://github.com/hiroki-abe-58/ComfyUI-DBS","commit":"f656e53434b5485c148a2866fbd6ddc6b6152ed6","registry":{"id":"dbs-soundtrack-separation","version":""},"classes":["DBSLoader","DBSSeparate"],"folders":["dbs"],"isolated":false,"requirementsTxt":true,"install":"manual"},"ComfyUI-Frame-Interpolation": {"repo":"https://github.com/Fannovel16/ComfyUI-Frame-Interpolation","commit":"26545cc2dd95bc3d27f056016300673bdeee78f5","registry":{"id":"comfyui-frame-interpolation","version":""},"classes":["RIFE VFI"],"folders":[],"isolated":false,"requirementsTxt":false,"install":"manual"},"ComfyUI-HunyuanVideo-Foley": {"repo":"https://github.com/phazei/ComfyUI-HunyuanVideo-Foley","commit":"afd2960b8ad9036a9f55a15daf514112ff68e010","registry":{"id":"ComfyUI-HunyuanVideo-Foley","version":""},"classes":["HunyuanDependenciesLoader","HunyuanFoleySampler","HunyuanModelLoader"],"folders":["foley"],"isolated":false,"requirementsTxt":true,"install":"manual"},+ "ComfyUI-HyNomas": {"repo":"https://github.com/Nynxz/ComfyUI-HyNomas","commit":"a89e0515619924da71093aa3fe52dbb7104cb06e","classes":["NomasCameraPath","NomasWorldContinue","NomasWorldGenerate","NomasWorldPrompt"],"folders":[],"isolated":false,"requirementsTxt":false,"install":"manual"},"ComfyUI-Idol": {"repo":"https://github.com/Nynxz/ComfyUI-Idol","commit":"4d3a4f671028f0e062d9f004cda1a2dd73360d35","classes":["IdolCamera","IdolPreprocessImage","IdolPruneSplat"],"folders":[],"isolated":false,"requirementsTxt":false,"install":"manual"},"ComfyUI-IndexTTS2": {"repo":"https://github.com/snicolast/ComfyUI-IndexTTS2","commit":"5b33e02bc0112b8aaf1fc823d5e5a609ca07fc27","classes":["IndexTTS2Simple"],"folders":[],"isolated":false,"requirementsTxt":true,"install":"manual"},"ComfyUI-KJNodes": {"repo":"https://github.com/kijai/ComfyUI-KJNodes","commit":"17195fcfa8a05f601b766a0f09c9733284f47416","registry":{"id":"comfyui-kjnodes","version":""},"classes":["GetImageRangeFromBatch","GetImageSizeAndCount","GrowMaskWithBlur","INTConstant","ImageBatchExtendWithOverlap","ImageGridtoBatch","ImageResizeKJv2"],"folders":[],"isolated":false,"requirementsTxt":true,"install":"manual"},@@ -134,6 +135,8 @@"diffusion_models/moss_image_base_int8_convrot.safetensors": {"folder":"diffusion_models","file":"moss_image_base_int8_convrot.safetensors","url":"https://huggingface.co/Comfy-Org/MOSS-Image/resolve/530a4c94f92c35ef6818b1b035a983fe9dcf5f54/diffusion_models/moss_image_base_int8_convrot.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/MOSS-Image/resolve/530a4c94f92c35ef6818b1b035a983fe9dcf5f54/diffusion_models/moss_image_base_int8_convrot.safetensors","sizeBytes":5413698958,"gated":false,"presence":"list"},"diffusion_models/moss_image_sft_8stepdmd_int8_convrot.safetensors": {"folder":"diffusion_models","file":"moss_image_sft_8stepdmd_int8_convrot.safetensors","url":"https://huggingface.co/Spectrallic/MOSS-Image-SFT-8step-DMD-int8-convrot/resolve/8fdeb392c6322418687fc2519a7958c954497a22/moss_image_sft_8stepdmd_int8_convrot.safetensors","pinnedUrl":"https://huggingface.co/Spectrallic/MOSS-Image-SFT-8step-DMD-int8-convrot/resolve/8fdeb392c6322418687fc2519a7958c954497a22/moss_image_sft_8stepdmd_int8_convrot.safetensors","sizeBytes":5413723302,"gated":false,"presence":"list"},"diffusion_models/moss_image_sft_int8_convrot.safetensors": {"folder":"diffusion_models","file":"moss_image_sft_int8_convrot.safetensors","url":"https://huggingface.co/Comfy-Org/MOSS-Image/resolve/530a4c94f92c35ef6818b1b035a983fe9dcf5f54/diffusion_models/moss_image_sft_int8_convrot.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/MOSS-Image/resolve/530a4c94f92c35ef6818b1b035a983fe9dcf5f54/diffusion_models/moss_image_sft_int8_convrot.safetensors","sizeBytes":5413698958,"gated":false,"presence":"loader","loaders":[["UNETLoader","unet_name"]]},+ "diffusion_models/nomas_dit_distilled_bf16.safetensors": {"folder":"diffusion_models","file":"nomas_dit_distilled_bf16.safetensors","url":"https://huggingface.co/nynxz/Hy-Nomas/resolve/e8ddc4bfa664d69213930552493c220c3af56f41/nomas_dit_distilled_bf16.safetensors","pinnedUrl":"https://huggingface.co/nynxz/Hy-Nomas/resolve/e8ddc4bfa664d69213930552493c220c3af56f41/nomas_dit_distilled_bf16.safetensors","sizeBytes":17107123184,"gated":false,"presence":"list"},+ "diffusion_models/nomas_dit_distilled_int8_convrot.safetensors": {"folder":"diffusion_models","file":"nomas_dit_distilled_int8_convrot.safetensors","url":"https://huggingface.co/nynxz/Hy-Nomas/resolve/e8ddc4bfa664d69213930552493c220c3af56f41/nomas_dit_distilled_int8_convrot.safetensors","pinnedUrl":"https://huggingface.co/nynxz/Hy-Nomas/resolve/e8ddc4bfa664d69213930552493c220c3af56f41/nomas_dit_distilled_int8_convrot.safetensors","sizeBytes":8966889488,"gated":false,"presence":"loader","loaders":[["UNETLoader","unet_name"]]},"diffusion_models/pixal3d_int8_convrot.safetensors": {"folder":"diffusion_models","file":"pixal3d_int8_convrot.safetensors","url":"https://huggingface.co/Comfy-Org/Pixal3D/resolve/main/diffusion_models/pixal3d_int8_convrot.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Pixal3D/resolve/f37641be376725d324c56626007cc477f1249a69/diffusion_models/pixal3d_int8_convrot.safetensors","sizeBytes":5584555824,"gated":false,"presence":"loader","loaders":[["UNETLoader","unet_name"]]},"diffusion_models/pixal3d_multiview_int8_convrot.safetensors": {"folder":"diffusion_models","file":"pixal3d_multiview_int8_convrot.safetensors","url":"https://huggingface.co/Comfy-Org/Pixal3D/resolve/main/diffusion_models/pixal3d_multiview_int8_convrot.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Pixal3D/resolve/f37641be376725d324c56626007cc477f1249a69/diffusion_models/pixal3d_multiview_int8_convrot.safetensors","sizeBytes":5584555824,"gated":false,"presence":"loader","loaders":[["UNETLoader","unet_name"]]},"diffusion_models/qwen_image_2.1_int8_convrot.safetensors": {"folder":"diffusion_models","file":"qwen_image_2.1_int8_convrot.safetensors","url":"https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/diffusion_models/qwen_image_2.1_int8_convrot.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/aacf31a6d48e707f352ecba714cee0680da3479b/diffusion_models/qwen_image_2.1_int8_convrot.safetensors","sizeBytes":7256783064,"gated":false,"presence":"loader","loaders":[["UNETLoader","unet_name"]]},@@ -256,7 +259,7 @@"text_encoders/qwen3vl_4b_int8_convrot.safetensors": {"folder":"text_encoders","file":"qwen3vl_4b_int8_convrot.safetensors","url":"https://huggingface.co/Comfy-Org/Fibo-2.0/resolve/main/text_encoders/qwen3vl_4b_int8_convrot.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Fibo-2.0/resolve/4742d4bec410034142c8e65559e5f00c6f29eccb/text_encoders/qwen3vl_4b_int8_convrot.safetensors","sizeBytes":4858559240,"gated":false,"presence":"loader","loaders":[["CLIPLoader","clip_name"]]},"text_encoders/qwen3vl_8b_fp8_scaled.safetensors": {"folder":"text_encoders","file":"qwen3vl_8b_fp8_scaled.safetensors","url":"https://huggingface.co/Comfy-Org/Ideogram-4/resolve/main/text_encoders/qwen3vl_8b_fp8_scaled.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Ideogram-4/resolve/2aa6c75ce6d5fabded0ca4d0f76abbfaf8edc87d/text_encoders/qwen3vl_8b_fp8_scaled.safetensors","sizeBytes":10588637512,"gated":false,"presence":"loader","loaders":[["CLIPLoader","clip_name"]]},"text_encoders/qwen3vl_8b_int8_convrot.safetensors": {"folder":"text_encoders","file":"qwen3vl_8b_int8_convrot.safetensors","url":"https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/text_encoders/qwen3vl_8b_int8_convrot.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/aacf31a6d48e707f352ecba714cee0680da3479b/text_encoders/qwen3vl_8b_int8_convrot.safetensors","sizeBytes":9350798360,"gated":false,"presence":"loader","loaders":[["CLIPLoader","clip_name"]]},- "text_encoders/qwen_2.5_vl_7b.safetensors": {"folder":"text_encoders","file":"qwen_2.5_vl_7b.safetensors","url":"https://huggingface.co/Comfy-Org/Qwen-Image/resolve/1f12b17be14c89b026c51a91d67c32f84bb047bc/split_files/text_encoders/qwen_2.5_vl_7b.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Qwen-Image/resolve/1f12b17be14c89b026c51a91d67c32f84bb047bc/split_files/text_encoders/qwen_2.5_vl_7b.safetensors","sizeBytes":16584415576,"gated":false,"presence":"loader","loaders":[["DualCLIPLoader","clip_name1"]]},+ "text_encoders/qwen_2.5_vl_7b.safetensors": {"folder":"text_encoders","file":"qwen_2.5_vl_7b.safetensors","url":"https://huggingface.co/Comfy-Org/Qwen-Image/resolve/1f12b17be14c89b026c51a91d67c32f84bb047bc/split_files/text_encoders/qwen_2.5_vl_7b.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Qwen-Image/resolve/1f12b17be14c89b026c51a91d67c32f84bb047bc/split_files/text_encoders/qwen_2.5_vl_7b.safetensors","sizeBytes":16584415576,"gated":false,"presence":"loader","loaders":[["CLIPLoader","clip_name"],["DualCLIPLoader","clip_name1"]]},"text_encoders/qwen_2.5_vl_7b_fp8_scaled.safetensors": {"folder":"text_encoders","file":"qwen_2.5_vl_7b_fp8_scaled.safetensors","url":"https://huggingface.co/Comfy-Org/Qwen-Image_ComfyUI/resolve/main/split_files/text_encoders/qwen_2.5_vl_7b_fp8_scaled.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Qwen-Image_ComfyUI/resolve/1f12b17be14c89b026c51a91d67c32f84bb047bc/split_files/text_encoders/qwen_2.5_vl_7b_fp8_scaled.safetensors","sizeBytes":9384670680,"gated":false,"presence":"loader","loaders":[["CLIPLoader","clip_name"],["DualCLIPLoader","clip_name1"]]},"text_encoders/qwen_3_4b.safetensors": {"folder":"text_encoders","file":"qwen_3_4b.safetensors","url":"https://huggingface.co/Comfy-Org/z_image_turbo/resolve/main/split_files/text_encoders/qwen_3_4b.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/z_image_turbo/resolve/6fc90a3b1b653e935a0d175e260736de25b84df5/split_files/text_encoders/qwen_3_4b.safetensors","sizeBytes":8044982048,"gated":false,"presence":"loader","loaders":[["CLIPLoader","clip_name"]]},"text_encoders/t5-base.safetensors": {"folder":"text_encoders","file":"t5-base.safetensors","url":"https://huggingface.co/ComfyUI-Wiki/t5-base/resolve/main/t5-base.safetensors","pinnedUrl":"https://huggingface.co/ComfyUI-Wiki/t5-base/resolve/6cd5e6887a033dee7a1bad4e5ea9ed43d83681f4/t5-base.safetensors","sizeBytes":891646390,"gated":false,"presence":"loader","loaders":[["CLIPLoader","clip_name"]]},@@ -287,6 +290,7 @@"vae/minimax_h3_video_vae_fp16.safetensors": {"folder":"vae","file":"minimax_h3_video_vae_fp16.safetensors","url":"https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/1c41cfca8ebba91d0af792a05c5761fb2c3a7975/vae/minimax_h3_video_vae_fp16.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/1c41cfca8ebba91d0af792a05c5761fb2c3a7975/vae/minimax_h3_video_vae_fp16.safetensors","sizeBytes":5207808496,"gated":false,"presence":"loader","loaders":[["VAELoader","vae_name"]]},"vae/minimax_h3_video_vae_int8_convrot.safetensors": {"folder":"vae","file":"minimax_h3_video_vae_int8_convrot.safetensors","url":"https://huggingface.co/Kijai/MiniMax-H3-experimental/resolve/f5c3b1d5a63e008a691fca1b6096fd57a5307536/minimax_h3_video_vae_int8_convrot.safetensors","pinnedUrl":"https://huggingface.co/Kijai/MiniMax-H3-experimental/resolve/f5c3b1d5a63e008a691fca1b6096fd57a5307536/minimax_h3_video_vae_int8_convrot.safetensors","sizeBytes":3171670912,"gated":false,"presence":"loader","loaders":[["VAELoader","vae_name"]]},"vae/minimax_music3_dav.safetensors": {"folder":"vae","file":"minimax_music3_dav.safetensors","url":"https://huggingface.co/Comfy-Org/MiniMax-Music-3/resolve/main/vae/minimax_music3_dav.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/MiniMax-Music-3/resolve/9e364ccd290a401561091fb441ed19cd7de92550/vae/minimax_music3_dav.safetensors","sizeBytes":216696128,"gated":false,"presence":"loader","loaders":[["VAELoader","vae_name"]]},+ "vae/nomas_pixelumm_vae_bf16.safetensors": {"folder":"vae","file":"nomas_pixelumm_vae_bf16.safetensors","url":"https://huggingface.co/nynxz/Hy-Nomas/resolve/e8ddc4bfa664d69213930552493c220c3af56f41/nomas_pixelumm_vae_bf16.safetensors","pinnedUrl":"https://huggingface.co/nynxz/Hy-Nomas/resolve/e8ddc4bfa664d69213930552493c220c3af56f41/nomas_pixelumm_vae_bf16.safetensors","sizeBytes":15776972360,"gated":false,"presence":"loader","loaders":[["VAELoader","vae_name"]]},"vae/qwen_image_2.1_vae_bf16.safetensors": {"folder":"vae","file":"qwen_image_2.1_vae_bf16.safetensors","url":"https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/vae/qwen_image_2.1_vae_bf16.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/aacf31a6d48e707f352ecba714cee0680da3479b/vae/qwen_image_2.1_vae_bf16.safetensors","sizeBytes":675509688,"gated":false,"presence":"loader","loaders":[["VAELoader","vae_name"]]},"vae/qwen_image_layered_vae.safetensors": {"folder":"vae","file":"qwen_image_layered_vae.safetensors","url":"https://huggingface.co/Comfy-Org/Qwen-Image-Layered_ComfyUI/resolve/main/split_files/vae/qwen_image_layered_vae.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Qwen-Image-Layered_ComfyUI/resolve/02130716aaf54a36f84c9fcfa8a373ab06284e2b/split_files/vae/qwen_image_layered_vae.safetensors","sizeBytes":253816616,"gated":false,"presence":"loader","loaders":[["VAELoader","vae_name"]]},"vae/qwen_image_vae.safetensors": {"folder":"vae","file":"qwen_image_vae.safetensors","url":"https://huggingface.co/Comfy-Org/Qwen-Image_ComfyUI/resolve/main/split_files/vae/qwen_image_vae.safetensors","pinnedUrl":"https://huggingface.co/Comfy-Org/Qwen-Image_ComfyUI/resolve/1f12b17be14c89b026c51a91d67c32f84bb047bc/split_files/vae/qwen_image_vae.safetensors","sizeBytes":253806246,"gated":false,"presence":"loader","loaders":[["VAELoader","vae_name"]]},@@ -538,6 +542,7 @@"wan22-t2v-14b-lightx2v": {"core":["CLIPLoader","CLIPTextEncode","CreateVideo","EmptyHunyuanLatentVideo","KSamplerAdvanced","LoraLoaderModelOnly","ModelSamplingSD3","PrimitiveFloat","PrimitiveInt","SaveVideo","UNETLoader","VAEDecode","VAELoader"],"packs":{},"files":["diffusion_models/wan2.2_t2v_high_noise_14B_fp8_scaled.safetensors","diffusion_models/wan2.2_t2v_low_noise_14B_fp8_scaled.safetensors","loras/wan2.2_t2v_lightx2v_4steps_lora_v1.1_high_noise.safetensors","loras/wan2.2_t2v_lightx2v_4steps_lora_v1.1_low_noise.safetensors","text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors","vae/wan_2.1_vae.safetensors"],"optional":[],"vramGb":24,"isolated":false,"firstRun":[],"validated":true},"wan22-ti2v-5b": {"core":["CLIPLoader","CLIPTextEncode","CreateVideo","KSampler","ModelSamplingSD3","SaveVideo","UNETLoader","VAEDecode","VAELoader","Wan22ImageToVideoLatent"],"packs":{},"files":["diffusion_models/wan2.2_ti2v_5B_fp16.safetensors","text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors","vae/wan2.2_vae.safetensors"],"optional":[],"vramGb":12,"isolated":false,"firstRun":[],"validated":true},"wan22-ti2v-5b-i2v": {"core":["CLIPLoader","CLIPTextEncode","CreateVideo","KSampler","LoadImage","ModelSamplingSD3","SaveVideo","UNETLoader","VAEDecode","VAELoader","Wan22ImageToVideoLatent"],"packs":{},"files":["diffusion_models/wan2.2_ti2v_5B_fp16.safetensors","text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors","vae/wan2.2_vae.safetensors"],"optional":[],"vramGb":12,"isolated":false,"firstRun":[],"validated":true},+ "world-hy-nomas-turn": {"core":["CLIPLoader","CreateVideo","SaveVideo","TrimVideoLatent","UNETLoader","VAEDecode","VAELoader"],"packs":{"ComfyUI-HyNomas":["NomasCameraPath","NomasWorldContinue","NomasWorldGenerate","NomasWorldPrompt"]},"files":["diffusion_models/nomas_dit_distilled_int8_convrot.safetensors","text_encoders/qwen_2.5_vl_7b.safetensors","vae/nomas_pixelumm_vae_bf16.safetensors"],"optional":["diffusion_models/nomas_dit_distilled_bf16.safetensors"],"vramGb":24,"isolated":false,"firstRun":[]},"z-image-turbo-i2i": {"core":["CLIPLoader","CLIPTextEncode","ConditioningZeroOut","ImageScaleToTotalPixels","KSampler","LoadImage","ModelSamplingAuraFlow","SaveImage","UNETLoader","VAEDecode","VAEEncode","VAELoader"],"packs":{},"files":["diffusion_models/z_image_turbo_bf16.safetensors","text_encoders/qwen_3_4b.safetensors","vae/ae.safetensors"],"optional":[],"vramGb":12,"isolated":false,"firstRun":[],"validated":true},"z-image-turbo-t2i": {"core":["CLIPLoader","CLIPTextEncode","ConditioningZeroOut","EmptySD3LatentImage","KSampler","ModelSamplingAuraFlow","SaveImage","UNETLoader","VAEDecode","VAELoader"],"packs":{},"files":["diffusion_models/z_image_turbo_bf16.safetensors","text_encoders/qwen_3_4b.safetensors","vae/ae.safetensors"],"optional":[],"vramGb":12,"isolated":false,"firstRun":[],"validated":true}}diff --git a/workflows/comfyui/world-hy-nomas-turn.json b/workflows/comfyui/world-hy-nomas-turn.jsonnew file mode 100644index 00000000..5384c945--- /dev/null+++ b/workflows/comfyui/world-hy-nomas-turn.json@@ -0,0 +1,182 @@+{+ "1": {+ "class_type": "UNETLoader",+ "inputs": {+ "unet_name": "nomas_dit_distilled_int8_convrot.safetensors",+ "weight_dtype": "default"+ },+ "_meta": {+ "title": "Hy-Nomas DiT (distilled, int8 ConvRot)"+ }+ },+ "2": {+ "class_type": "CLIPLoader",+ "inputs": {+ "clip_name": "qwen_2.5_vl_7b.safetensors",+ "type": "qwen_image",+ "device": "default"+ },+ "_meta": {+ "title": "Qwen2.5-VL 7B text encoder"+ }+ },+ "3": {+ "class_type": "VAELoader",+ "inputs": {+ "vae_name": "nomas_pixelumm_vae_bf16.safetensors"+ },+ "_meta": {+ "title": "PixelUMM decoder"+ }+ },+ "4": {+ "class_type": "NomasWorldPrompt",+ "inputs": {+ "perspective": "third-person follow",+ "style": "real-world footage",+ "subject": "a small orange fox",+ "subject_details": "Orange fur, a white chest and a fluffy tail.",+ "scene": "<|Subject1|> stands on a stone path in a luminous forest at dusk. Blue fireflies drift between tall mossy trees, and soft mist hangs over the ground.",+ "action": "<|Subject1|> walks slowly along the path.",+ "seconds": 5+ },+ "_meta": {+ "title": "Opening turn"+ }+ },+ "5": {+ "class_type": "NomasCameraPath",+ "inputs": {+ "script": "w 2\nw+left 1.5\nw 1.5"+ },+ "_meta": {+ "title": "Opening camera move"+ }+ },+ "6": {+ "class_type": "NomasWorldGenerate",+ "inputs": {+ "model": [+ "1",+ 0+ ],+ "clip": [+ "2",+ 0+ ],+ "turn": [+ "4",+ 0+ ],+ "camera": [+ "5",+ 0+ ],+ "seed": 42,+ "width": 1280,+ "height": 704,+ "steps": 8,+ "history": "window"+ },+ "_meta": {+ "title": "World: opening"+ }+ },+ "7": {+ "class_type": "NomasCameraPath",+ "inputs": {+ "script": "right 1\nw 2"+ },+ "_meta": {+ "title": "Turn 1 camera move"+ }+ },+ "8": {+ "class_type": "NomasWorldContinue",+ "inputs": {+ "model": [+ "1",+ 0+ ],+ "clip": [+ "2",+ 0+ ],+ "world": [+ "6",+ 1+ ],+ "change": "a wooden bridge crosses a glowing stream ahead",+ "action": "<|Subject1|> trots onto the bridge.",+ "camera": [+ "7",+ 0+ ],+ "seconds": 5,+ "steps": 8+ },+ "_meta": {+ "title": "World: turn 1"+ }+ },+ "9": {+ "class_type": "TrimVideoLatent",+ "inputs": {+ "samples": [+ "8",+ 0+ ],+ "trim_amount": 31+ },+ "_meta": {+ "title": "This turn only (the earlier turns' latents left out)"+ }+ },+ "10": {+ "class_type": "VAEDecode",+ "inputs": {+ "samples": [+ "9",+ 0+ ],+ "vae": [+ "3",+ 0+ ]+ },+ "_meta": {+ "title": "Decode the turn"+ }+ },+ "11": {+ "class_type": "CreateVideo",+ "inputs": {+ "images": [+ "10",+ 0+ ],+ "fps": 24,+ "bit_depth": "auto",+ "color_space": "sRGB"+ },+ "_meta": {+ "title": "24 fps"+ }+ },+ "12": {+ "class_type": "SaveVideo",+ "inputs": {+ "video": [+ "11",+ 0+ ],+ "filename_prefix": "fuobe/world-hy-nomas-turn",+ "format": "auto",+ "format.codec": "auto",+ "codec": "auto"+ },+ "_meta": {+ "title": "Save the turn"+ }+ }+}