Invoke is a leading creative engine that uses image and video generation models to empower professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry-leading application interface, and serves as the foundation for multiple commercial products.
TypeScript ai-artartificial-intelligencegenerative-artimage-generationimg2imginpaintinglatent-diffusionlinuxmacosoutpaintingstable-diffusiontxt2imgwindows
feat(webv2): let the LTX-2 frames slider reach 481
Lincoln Stein4ec3af752ee1
diff --git a/docs/src/content/docs/concepts/video-generation.mdx b/docs/src/content/docs/concepts/video-generation.mdxindex 8c6d114bee..e722224dc0 100644--- a/docs/src/content/docs/concepts/video-generation.mdx+++ b/docs/src/content/docs/concepts/video-generation.mdx@@ -265,7 +265,7 @@ Both builds support every LTX-2 mode — text, first frame, last frame, first-toWhat to know in practice:-* **Frames are 8·n + 1** (the video VAE encodes the first frame alone, then groups of eight): 9 to 481, default 121 — five seconds at the default 24 fps. The slider stops at 241; the field accepts more for a deliberate long render, but cost grows linearly with the frame count.+* **Frames are 8·n + 1** (the video VAE encodes the first frame alone, then groups of eight): 9 to 481, default 121 — five seconds at the default 24 fps, up to twenty. Time and memory grow roughly linearly with the frame count, so a 481-frame clip costs about four times a default one.* **Frame rate is yours to set** (1–60 fps). It changes the clip's duration, and with it how much audio is generated — the two streams share one clock.* **Canvas presets pin the short edge**, with the long edge following your aspect ratio: 512p, 704p (default) and 768p render in one pass and snap to a multiple of 32; 1024p and 1536p are [two-stage](#two-stage-presets) and snap to 64, because the first pass runs at half of them.* **Image-to-video re-compresses your frame** as a single H.264 frame before encoding it. That is deliberate: the model was trained on frames that had been through a video codec, and a pristine PNG is far enough out of that distribution that the clip visibly drifts away from it over the first second.diff --git a/invokeai/frontend/webv2/src/features/video/core/dimensions.ts b/invokeai/frontend/webv2/src/features/video/core/dimensions.tsindex dcaed8a2a2..27328709d9 100644--- a/invokeai/frontend/webv2/src/features/video/core/dimensions.ts+++ b/invokeai/frontend/webv2/src/features/video/core/dimensions.ts@@ -257,12 +257,10 @@ export const getLtx2StageCanvases = (// LTX-2's causal VAE encodes the first frame alone and then groups of 8, so// (n - 1) % 8 == 0. 121 frames is 5 s at the model's 24 fps default, the length-// the released pipeline generates; the slider stops at 241 (10 s) because the-// sequence length — and with it both time and VRAM — grows linearly past it,-// while the field still accepts up to 481 for a deliberate long render.+// the released pipeline generates; 481 is 20 s, the longest clip the family+// generates. Time and VRAM grow roughly linearly with the frame count.export const LTX2_NUM_FRAMES_MIN = 9;export const LTX2_NUM_FRAMES_MAX = 481;-export const LTX2_NUM_FRAMES_SLIDER_MAX = 241;export const LTX2_NUM_FRAMES_STEP = 8;export const LTX2_NUM_FRAMES_DEFAULT = 121;diff --git a/invokeai/frontend/webv2/src/features/video/core/videoPolicies.ts b/invokeai/frontend/webv2/src/features/video/core/videoPolicies.tsindex 1179a6aee2..885c532160 100644--- a/invokeai/frontend/webv2/src/features/video/core/videoPolicies.ts+++ b/invokeai/frontend/webv2/src/features/video/core/videoPolicies.ts@@ -35,7 +35,6 @@ import {LTX2_NUM_FRAMES_DEFAULT,LTX2_NUM_FRAMES_MAX,LTX2_NUM_FRAMES_MIN,- LTX2_NUM_FRAMES_SLIDER_MAX,LTX2_EXTEND_CONTEXT_FRAMES,ltx2MaxExtendContextFrames,ltx2NewFramesForExtend,@@ -95,11 +94,6 @@ export interface VideoTargetResolutionOption {*/export interface VideoFramesGridPolicy extends VideoFramesGrid {kind: 'grid';- /**- * Where the slider stops, when that is below `max`. The field still accepts- * anything up to `max`: the cap is a recommendation about cost, not a limit.- */- sliderMax?: number;}export interface VideoFramesChoicesPolicy extends VideoFramesChoices {@@ -354,7 +348,6 @@ const LTX2_FRAMES: VideoFramesGridPolicy = {kind: 'grid',max: LTX2_NUM_FRAMES_MAX,min: LTX2_NUM_FRAMES_MIN,- sliderMax: LTX2_NUM_FRAMES_SLIDER_MAX,step: LTX2_NUM_FRAMES_STEP,};diff --git a/invokeai/frontend/webv2/src/features/video/ui/VideoWidgetView.tsx b/invokeai/frontend/webv2/src/features/video/ui/VideoWidgetView.tsxindex 7b04848dc9..d865ace803 100644--- a/invokeai/frontend/webv2/src/features/video/ui/VideoWidgetView.tsx+++ b/invokeai/frontend/webv2/src/features/video/ui/VideoWidgetView.tsx@@ -424,7 +424,7 @@ export const VideoWidgetView = () => {policy.frames.kind === 'grid'? {inputMax: policy.frames.max,- max: policy.frames.sliderMax ?? policy.frames.max,+ max: policy.frames.max,min: policy.frames.min,step: policy.frames.step,}