AI media harness for planning, generating, and editing locally
TypeScript
Group generator dropdowns by model
Bittif57544bc9f31
diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.mdindex 7fc4283..420511c 100644--- a/RELEASE_NOTES.md+++ b/RELEASE_NOTES.md@@ -4,6 +4,8 @@ This alpha update adds Prompt video scenes, agent image drafts, Sol attention an## What's new+- **Generator dropdown sections.** Generator choices are grouped by model in image, video and reference-icon selectors.+- **Centered inspector actions.** Generate, Debug prompt, Export and other panel actions keep a compact default width and shrink to fit narrower panels.- **Inspector sliders and editable effect values.** Numeric settings such as Steps, sigma shifts, CFG, placement and clip transforms now pair draggable sliders with compact number fields. Timeline and generation effect values can also be typed directly, with defined ranges, reset support and synchronized controls. Seed remains a plain number field.diff --git a/src/components/SettingsView.tsx b/src/components/SettingsView.tsxindex b3f6ce7..b5b6880 100644--- a/src/components/SettingsView.tsx+++ b/src/components/SettingsView.tsx@@ -1,3 +1,4 @@+import { generatorOptions } from "./generatorOptions";import { DEFAULT_VIDEO_SIGMA_SHIFT, DEFAULT_AUDIO_SIGMA_SHIFT, MIN_SIGMA_SHIFT, MAX_SIGMA_SHIFT, isSigmaShift } from "../lib/sampling";import { AdditionalSafetensorsEditor } from "./AdditionalSafetensorsEditor";import { GeneratorSharing } from "./GeneratorSharing";@@ -119,7 +120,7 @@ function ReferenceIconSetting({ templates }: { templates: GeneratorTemplateSetti</SettingsCard><SettingsCard icon={<Image20 />} header="Reference icon generator"><ComboBox aria-label="Reference icon generator" disabled={!available.length} value={selected?.id ?? ""} placeholder="No available generators"- onChange={saveReferenceIconGeneratorId} options={available.map((template) => ({ value: template.id, label: template.name }))} />+ onChange={saveReferenceIconGeneratorId} options={generatorOptions(available)} /></SettingsCard></SettingsGroup>;}diff --git a/src/components/generatorOptions.ts b/src/components/generatorOptions.tsnew file mode 100644index 0000000..cc1b98d--- /dev/null+++ b/src/components/generatorOptions.ts@@ -0,0 +1,18 @@+import { GENERATOR_MODELS } from "../lib/generatorModels";+import type { GeneratorTemplate } from "../lib/settings";+import type { ComboGroup, ComboOption } from "./ui/ComboBox";++/** Group already-filtered choices so each picker keeps its compatibility rules. */+export function generatorOptions(templates: readonly GeneratorTemplate[], details: (template: GeneratorTemplate) => Partial<ComboOption> = () => ({})): ComboGroup[] {+ const groups = new Map<string, ComboOption[]>();+ for (const template of templates) {+ const options = groups.get(template.modelType) ?? [];+ options.push({ ...details(template), value: template.id, label: template.name });+ groups.set(template.modelType, options);+ }+ const order = [...new Set([...GENERATOR_MODELS.map(model => model.value), ...groups.keys()])];+ return order.flatMap(model => {+ const options = groups.get(model);+ return options ? [{ label: GENERATOR_MODELS.find(item => item.value === model)?.label ?? model, options }] : [];+ });+}diff --git a/src/components/workspace/GeneratorView.tsx b/src/components/workspace/GeneratorView.tsxindex 55ceb59..2930f75 100644--- a/src/components/workspace/GeneratorView.tsx+++ b/src/components/workspace/GeneratorView.tsx@@ -1,3 +1,4 @@+import { generatorOptions } from "../generatorOptions";import { duplicateScene, makeSceneGenerationPrimary, saveSceneDrafts, selectSceneGeneration } from "../../lib/sceneHistory";import { sceneGenerationRequest, sendBlocker, templateSceneBlocker } from "../../lib/sceneGeneration";import { longShotBlocker, longShotDependencies, longShotPosition } from "../../lib/longShot";@@ -535,7 +536,7 @@ export function GeneratorView({ config, folderPath, runtime = null, generationCodata-tooltip={selectedTemplate.name}value={selectedTemplate.id}disabled={availableTemplates.length === 0}- options={availableTemplates.map((template) => ({ value: template.id, label: template.name }))}+ options={generatorOptions(availableTemplates)}onChange={chooseGeneratorTemplate}/></span>diff --git a/src/components/workspace/ImageEditor.tsx b/src/components/workspace/ImageEditor.tsxindex de4c1f1..2683ba8 100644--- a/src/components/workspace/ImageEditor.tsx+++ b/src/components/workspace/ImageEditor.tsx@@ -1,5 +1,6 @@import { activeGenerationEffects } from "../../lib/generationEffects";import { GenerationEffects } from "./GenerationEffects";+import { generatorOptions } from "../generatorOptions";import { SliderNumberInput, GENERATION_STEPS_RANGE, CFG_RANGE } from "./SliderNumberInput";import { applyLassoStroke } from "../../lib/imageLasso";import { EditBox16 } from "../ui/icons";@@ -634,7 +635,7 @@ export function ImageEditor({ config, folderPath, onChange: changeConfig, onGenevalue={template?.id ?? ""}disabled={Boolean(active) || !imageTemplates.length}placeholder="No image generators"- options={imageTemplates.map((item) => ({ value: item.id, label: item.name, disabled: !templateUsable(item) || (imageRoot && !templateSupportsEditing(item)), description: imageRoot && !templateSupportsEditing(item) ? "Does not support editing" : !templateUsable(item) ? "Download in Settings" : undefined }))}+ options={generatorOptions(imageTemplates, (item) => ({ disabled: !templateUsable(item) || (imageRoot && !templateSupportsEditing(item)), description: imageRoot && !templateSupportsEditing(item) ? "Does not support editing" : !templateUsable(item) ? "Download in Settings" : undefined }))}onChange={(id) => { setTemplateId(id); localStorage.setItem("slopus.image-generator-template.v1", id); const next = imageTemplates.find((candidate) => candidate.id === id); if (next) commit({ ...scene, steps: next.defaultSteps }); }}/></span>