Skip to content

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.

Merge branch 'feat/ltx2-two-stage' into feat/ltx2-audio-conditioning

Lincoln Stein771fc78b0920
diff --cc invokeai/frontend/webv2/public/locales/en.json
index efc38e520f,f13c7925b6..cd9e8f7be9
--- a/invokeai/frontend/webv2/public/locales/en.json
+++ b/invokeai/frontend/webv2/public/locales/en.json
@@@ -3865,9 -3877,13 +3877,14 @@@
"aspect-ratio": "from the aspect-ratio preset",
"first-frame": "from the first frame",
"last-frame": "from the last frame",
- "source-video": "from the initial video"
+ "source-video": "from the initial video",
+ "conditioning-clip": "from the conditioning clip"
},
+ "dimensionSourceValue": {
+ "first-frame": "From the first frame",
+ "last-frame": "From the last frame",
+ "source-video": "From the initial video"
+ },
"firstFrame": "First Frame",
"firstFrameBlocked": "Clear the initial video to start from a frame instead.",
"firstFrameHelp": "The video starts on this image.",
diff --cc invokeai/frontend/webv2/src/features/video/ui/VideoWidgetView.tsx
index 5c1965435d,f72373924f..49234d7f30
--- a/invokeai/frontend/webv2/src/features/video/ui/VideoWidgetView.tsx
+++ b/invokeai/frontend/webv2/src/features/video/ui/VideoWidgetView.tsx
@@@ -518,23 -482,26 +518,41 @@@ export const VideoWidgetView = () =>
const initialVideoCapBlocked =
referenceExtend &&
!canPlaceReferenceExtendAnchor(values.references, values.sourceVideo?.video_name, maxVideoReferences);
- const hasConditioningMedia = Boolean(values.firstFrameImage || values.lastFrameImage || values.sourceVideo);
+ // The aspect-ratio control is locked by media that pins the frame. A clip in the `audio` role
+ // does not: its picture is what gets generated, so the ratio is still the user's to choose.
+ const hasConditioningMedia = Boolean(
+ values.firstFrameImage || values.lastFrameImage || values.sourceVideo || values.conditioningClip?.role === 'video'
+ );
+ const otherMediaSet = Boolean(
+ values.firstFrameImage || values.lastFrameImage || values.sourceVideo || values.references.length > 0
+ );
+ const conditioningDerivedText = values.conditioningClip
+ ? t(
+ values.conditioningClip.role === 'audio'
+ ? 'widgets.video.conditioningDerivedAudio'
+ : 'widgets.video.conditioningDerivedVideo',
+ { fps: timing.fps, frames: timing.numFrames }
+ )
+ : undefined;
const derivedSourceText = dimensions ? t(`widgets.video.dimensionSource.${dimensions.source}`) : undefined;
+ // Media pins the canvas to its own proportions, so the stored preset is not what the output will
+ // be: leaving it on the trigger of a disabled control states a ratio the render will not use. The
+ // preset itself is kept, not rewritten -- it is what the panel goes back to when the media is
+ // removed -- and the trigger names the source instead. Deliberately not the nearest standard
+ // preset: media rarely lands exactly on one, so that would swap one wrong ratio for another.
+ // Truncating, like the Generate panel's own aspect-ratio trigger: the slot clips its value text
+ // rather than wrapping it, so a phrase wider than the control ends mid-word in a docked panel
+ // instead of in an ellipsis.
+ const dimensionSource = dimensions?.source;
+ const derivedSourceValueText = useMemo(
+ () =>
+ dimensionSource && dimensionSource !== 'aspect-ratio' ? (
+ <Text as="span" fontSize="xs" truncate>
+ {t(`widgets.video.dimensionSourceValue.${dimensionSource}`)}
+ </Text>
+ ) : undefined,
+ [dimensionSource, t]
+ );
const derivedSizeText = dimensions
? `${t('widgets.video.derivedSize', { height: dimensions.height, width: dimensions.width })}${
derivedSourceText ? ` — ${derivedSourceText}` : ''