Skip to content

🎥 Make videos programmatically with React

Remove asset selection model descriptions

JonnyBurger91f1a2df4551
diff --git a/packages/studio/src/components/ModelManager.tsx b/packages/studio/src/components/ModelManager.tsx
index ebd2dce9be..0b5fe07e16 100644
--- a/packages/studio/src/components/ModelManager.tsx
+++ b/packages/studio/src/components/ModelManager.tsx
@@ -101,7 +101,7 @@ export const ModelManager = <Model extends string>({
}: {
readonly ariaLabel: string;
readonly availableModels: readonly ModelInfo<Model>[];
- readonly description: string;
+ readonly description: string | null;
readonly indent: boolean;
readonly isModelCached: (model: Model) => Promise<boolean>;
readonly loadModel: (
@@ -235,7 +235,9 @@ export const ModelManager = <Model extends string>({
className={VERTICAL_SCROLLBAR_CLASSNAME}
>
<div style={indent ? container : flushContainer}>
- <p style={descriptionStyle}>{description}</p>
+ {description === null ? null : (
+ <p style={descriptionStyle}>{description}</p>
+ )}
{cacheCheckError ? (
<ValidationMessage
align="flex-start"
@@ -243,7 +245,11 @@ export const ModelManager = <Model extends string>({
type="error"
/>
) : null}
- <div style={list} role="list" aria-label={ariaLabel}>
+ <div
+ style={description === null ? undefined : list}
+ role="list"
+ aria-label={ariaLabel}
+ >
{availableModels.map((model, index) => {
const cached = cachedModels?.has(model.name) ?? false;
const processingThisModel =
diff --git a/packages/studio/src/components/ModelsSettings.tsx b/packages/studio/src/components/ModelsSettings.tsx
index 00fc2ae44f..70eaf25b90 100644
--- a/packages/studio/src/components/ModelsSettings.tsx
+++ b/packages/studio/src/components/ModelsSettings.tsx
@@ -161,22 +161,14 @@ export const ModelsSettings: React.FC = () => {
packageName={WHISPER_WEBGPU_PACKAGE}
style={section}
>
- <LazyWhisperModels
- description="Select an audio or video asset to transcribe it."
- indent={false}
- visible
- />
+ <LazyWhisperModels description={null} indent={false} visible />
</OptionalModelPackage>
<OptionalModelPackage
label="Video matting"
packageName={VIDEO_MATTING_PACKAGE}
style={lastSection}
>
- <LazyVideoMattingModels
- description="Select a video asset to separate background and foreground."
- indent={false}
- visible
- />
+ <LazyVideoMattingModels description={null} indent={false} visible />
</OptionalModelPackage>
</div>
);
diff --git a/packages/studio/src/components/Transcription/Models.tsx b/packages/studio/src/components/Transcription/Models.tsx
index e7d303288a..7493a3aeb7 100644
--- a/packages/studio/src/components/Transcription/Models.tsx
+++ b/packages/studio/src/components/Transcription/Models.tsx
@@ -12,7 +12,7 @@ import {ModelManager} from '../ModelManager';
const AVAILABLE_MODELS = getAvailableModels();
export const Models: React.FC<{
- readonly description: string;
+ readonly description: string | null;
readonly indent: boolean;
readonly visible: boolean;
}> = ({description, indent, visible}) => {
diff --git a/packages/studio/src/components/Transcription/TranscriptionModal.tsx b/packages/studio/src/components/Transcription/TranscriptionModal.tsx
index 9075fd0ba9..606057570f 100644
--- a/packages/studio/src/components/Transcription/TranscriptionModal.tsx
+++ b/packages/studio/src/components/Transcription/TranscriptionModal.tsx
@@ -940,7 +940,7 @@ export const TranscriptionModal: React.FC<TranscriptionModalState> = ({
/>
</div>
<Models
- description="Select an audio or video asset to transcribe it. Models are downloaded automatically when needed. You can also manage the browser cache here."
+ description="Models are downloaded automatically when needed. You can also manage the browser cache here."
indent
visible={tab === 'models'}
/>
diff --git a/packages/studio/src/components/VideoMatting/Models.tsx b/packages/studio/src/components/VideoMatting/Models.tsx
index ca88c0e690..b2f3e5fca1 100644
--- a/packages/studio/src/components/VideoMatting/Models.tsx
+++ b/packages/studio/src/components/VideoMatting/Models.tsx
@@ -11,7 +11,7 @@ import {ModelManager} from '../ModelManager';
const AVAILABLE_MODELS = getAvailableModels();
export const Models: React.FC<{
- readonly description: string;
+ readonly description: string | null;
readonly indent: boolean;
readonly visible: boolean;
}> = ({description, indent, visible}) => {
diff --git a/packages/studio/src/components/VideoMatting/VideoMattingModal.tsx b/packages/studio/src/components/VideoMatting/VideoMattingModal.tsx
index 3090524531..7b79faedfe 100644
--- a/packages/studio/src/components/VideoMatting/VideoMattingModal.tsx
+++ b/packages/studio/src/components/VideoMatting/VideoMattingModal.tsx
@@ -384,7 +384,7 @@ export const VideoMattingModal: React.FC<VideoMattingModalState> = ({
</div>
</div>
<Models
- description="Select a video asset to separate background and foreground. Models are downloaded automatically when needed. You can also manage the browser cache here."
+ description="Models are downloaded automatically when needed. You can also manage the browser cache here."
indent
visible={tab === 'models'}
/>