AI media harness for planning, generating, and editing locally
TypeScript
Add TAEH3 download and preview preference
Bitti5864f35ec22e
diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.mdindex e7cbcf9..d2bc9a0 100644--- a/RELEASE_NOTES.md+++ b/RELEASE_NOTES.md@@ -4,6 +4,8 @@ Changes since 0.3.2.## What's new+- **TAEH3 preview weights.** Added the MiniMax H3 tiny VAE under Other weights and a saved generation-preview preference in Settings.+- **Pika H3 Flex.** Added FL2VA and Ref2VA LoRA downloads with Pika's fixed six-step re-noising recipe and video/audio sigma shifts of 12/3.- **MiniMax H3 dependencies.** Added named Video and Audio VAE templates, including Sol H3 VAE, and a shared default Text Encoder. Generators link to VAEs and automatically download missing dependencies; existing custom paths and downloads are preserved.diff --git a/src/components/GenerationPreviewSetting.tsx b/src/components/GenerationPreviewSetting.tsxnew file mode 100644index 0000000..e1a971b--- /dev/null+++ b/src/components/GenerationPreviewSetting.tsx@@ -0,0 +1,12 @@+import { useSyncExternalStore } from "react";+import { loadGenerationPreviewsEnabled, saveGenerationPreviewsEnabled, subscribeGenerationPreviews } from "../lib/generationPreviewSettings";+import { SettingsCard, SettingsGroup, ToggleSwitch } from "./ui";++export function GenerationPreviewSetting() {+ const enabled = useSyncExternalStore(subscribeGenerationPreviews, loadGenerationPreviewsEnabled);+ return <SettingsGroup heading="Generation previews">+ <SettingsCard header="Show generation previews" description="Play MiniMax H3 previews in scene cards during generation. Requires TAEH3 from Other weights and a runtime with preview support.">+ <ToggleSwitch checked={enabled} aria-label="Enable generation previews" onChange={saveGenerationPreviewsEnabled} />+ </SettingsCard>+ </SettingsGroup>;+}diff --git a/src/components/OtherWeightsSettings.test.tsx b/src/components/OtherWeightsSettings.test.tsxindex ca2e642..b61b3c0 100644--- a/src/components/OtherWeightsSettings.test.tsx+++ b/src/components/OtherWeightsSettings.test.tsx@@ -6,12 +6,29 @@ import { invoke } from "@tauri-apps/api/core";import { OtherWeightsSettings } from "./OtherWeightsSettings";import { OTHER_WEIGHT_TEMPLATES, localOtherWeightPaths, otherWeightPaths, refreshOtherWeights, upscaleConfig, latentUpscalerPath } from "../lib/upscalers";import { chooseEnginePath } from "../lib/runtime";+import { TAEH3_URL } from "../lib/upscalers";vi.mock("@tauri-apps/api/core", () => ({ invoke: vi.fn() }));vi.mock("@tauri-apps/api/event", () => ({ listen: vi.fn().mockResolvedValue(() => {}) }));vi.mock("../lib/persistence", () => ({ isTauri: () => true }));vi.mock("../lib/runtime", () => ({ chooseEnginePath: vi.fn() }));afterEach(() => { cleanup(); localStorage.clear(); vi.clearAllMocks(); });+it("downloads the pinned TAEH3 checkpoint as a separate optional weight", async () => {+ vi.mocked(invoke).mockImplementation(async (name) => {+ if (name === "find_downloaded_weights") return {} as never;+ if (name === "download_weight") return "C:/weights/taeh3.safetensors" as never;+ return undefined as never;+ });+ render(<OtherWeightsSettings desktop />);+ await waitFor(() => expect(invoke).toHaveBeenCalledWith("find_downloaded_weights", expect.anything()));+ const card = screen.getByText("TAEH3 generation previews").closest(".ui-settings-card") as HTMLElement;+ fireEvent.click(within(card).getByRole("button", { name: "Download" }));+ await waitFor(() => expect(within(card).getByRole("button", { name: "Downloaded" })).toBeDisabled());+ expect(invoke).toHaveBeenCalledWith("download_weight", expect.objectContaining({ url: TAEH3_URL }));+ expect(otherWeightPaths()[TAEH3_URL]).toBe("C:/weights/taeh3.safetensors");+ expect(within(card).getByText("Preview VAE available")).toBeInTheDocument();+});+it("downloads the SeedVR2 model and VAE as one template and remembers both paths", async () => {vi.mocked(invoke).mockImplementation(async (name, args) => {if (name === "find_downloaded_weights") return {} as never;@@ -52,6 +69,7 @@ it.each(OTHER_WEIGHT_TEMPLATES.flatMap((template) => [false, true].map((remote)await waitFor(() => expect(screen.queryByRole("dialog")).toBeNull());await refreshOtherWeights();if (template.id === "latent-upscale") expect(latentUpscalerPath()).toBe("D:/custom/model.safetensors");+ else if (template.id === "taeh3") expect(otherWeightPaths()[template.files[0].url]).toBe("D:/custom/model.safetensors");else expect(upscaleConfig(template.id)).toEqual({ method: template.id, modelPath: "D:/custom/model.safetensors",...(template.id === "seedvr2" ? { vaePath: "D:/custom/vae.safetensors" } : {}) });fireEvent.click(screen.getByRole("button", { name: `Edit ${template.name} weights` }));diff --git a/src/components/OtherWeightsSettings.tsx b/src/components/OtherWeightsSettings.tsxindex d826e0d..e4019b8 100644--- a/src/components/OtherWeightsSettings.tsx+++ b/src/components/OtherWeightsSettings.tsx@@ -26,7 +26,7 @@ export function OtherWeightsSettings({ desktop }: { desktop: boolean }) {const waiting = queued.find((item) => item.otherWeightId === template.id);return <OpenableCard key={template.id} icon={<Image20 />} header={template.name}openLabel={`Edit ${template.name} weights`} onOpen={() => setEditing(template.id)}- description={waiting ? "Queued for download" : active ? `Downloading ${download.currentFile ?? template.name}` : ready ? template.id === "latent-upscale" ? "Ready for scene generation" : "Ready for image and video export" : template.files.map((file) => file.name).join(" · ")}+ description={waiting ? "Queued for download" : active ? `Downloading ${download.currentFile ?? template.name}` : ready ? template.id === "taeh3" ? "Preview VAE available" : template.id === "latent-upscale" ? "Ready for scene generation" : "Ready for image and video export" : template.files.map((file) => file.name).join(" · ")}actions={<>{waiting ? <button type="button" onClick={() => cancelQueuedWeightDownload(waiting.templateId)}>Cancel</button>: active ? <><ProgressBar value={weightDownloadProgress(download)} aria-label={`Downloading ${template.name} weights`} />@@ -82,6 +82,7 @@ function OtherWeightEditor({ template, desktop, busy, onDone }: {<button className="secondary-button" type="button" disabled={!desktop} aria-label={`Browse for ${file.name}`} onClick={() => void browse(file)}>Browse…</button></span></label>)}{template.id === "latent-upscale" && <p>Upscale saved scene Takes from the Generate menu. Workers receive local files or download the standard weights.</p>}+ {template.id === "taeh3" && <p>A lightweight MiniMax H3 VAE for generation previews. Final videos use the Video VAE selected in the generator.</p>}{template.id === "seedvr2" && <p>SeedVR2 runs locally or on the selected worker. Workers receive local files and download any weights without a local path.</p>}{error && <InfoBar severity="error" message={error} />}</fieldset>diff --git a/src/components/SettingsView.test.tsx b/src/components/SettingsView.test.tsxindex 5dbb574..e750038 100644--- a/src/components/SettingsView.test.tsx+++ b/src/components/SettingsView.test.tsx@@ -7,6 +7,7 @@ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";import { middleEllipsis, SettingsView } from "./SettingsView";import { createGeneratorTemplate, mossImageTemplate, loadGeneratorTemplateSettings, saveGeneratorTemplateSettings } from "../lib/settings";import { loadReferenceIconGeneratorId } from "../lib/referenceIconSettings";+import { loadGenerationPreviewsEnabled } from "../lib/generationPreviewSettings";import { loadLoras, saveLoras } from "../lib/loras";vi.mock("@tauri-apps/api/core", () => ({ invoke: vi.fn() }));@@ -46,6 +47,18 @@ const enterPath = (label: string, value: string) => {};describe("the settings page", () => {+ it("persists the generation previews switch across settings visits", () => {+ const view = open(null);+ expect(toggle("Enable generation previews").getAttribute("aria-checked")).toBe("true");+ fireEvent.click(toggle("Enable generation previews"));+ expect(loadGenerationPreviewsEnabled()).toBe(false);+ view.unmount();+ open(null);+ expect(toggle("Enable generation previews").getAttribute("aria-checked")).toBe("false");+ fireEvent.click(toggle("Enable generation previews"));+ expect(loadGenerationPreviewsEnabled()).toBe(true);+ });+it("opens a focused page with a navigation pane and a Back action", () => {const onClose = vi.fn();render(<SettingsView onClose={onClose} />);diff --git a/src/components/SettingsView.tsx b/src/components/SettingsView.tsxindex d73bef5..c5cf0a7 100644--- a/src/components/SettingsView.tsx+++ b/src/components/SettingsView.tsx@@ -3,6 +3,7 @@ import { DEFAULT_VIDEO_SIGMA_SHIFT, DEFAULT_AUDIO_SIGMA_SHIFT, MIN_SIGMA_SHIFT,import { AdditionalSafetensorsEditor } from "./AdditionalSafetensorsEditor";import { GeneratorSharing } from "./GeneratorSharing";import { OtherWeightsSettings } from "./OtherWeightsSettings";+import { GenerationPreviewSetting } from "./GenerationPreviewSetting";import { H3ComponentSettings } from "./H3ComponentSettings";import { AgentDock } from "./workspace/AgentDock";import { useAgentPane } from "../lib/useAgentPane";@@ -656,6 +657,7 @@ export function SettingsView({ onClose, updates, initialTab = "engine", titleBar{downloadStatus}{modelPage === null ? <><ReferenceIconSetting templates={templateSettings} />+ <GenerationPreviewSetting /><div className="settings-card-list" role="list" aria-label="Generator models">{[...new Set([...GENERATOR_MODELS.map(({ value }) => value), ...templateSettings.templates.map(({ modelType }) => modelType)]), "other"].map((model) =><OpenableCard key={model} icon={model === "other" ? <ModelFile20 /> : generatorModel(model).musicGeneration ? <Audio22 /> : !generatorModel(model).videoGeneration ? <Image20 /> : <Video20 />} header={modelPageLabel(model)}diff --git a/src/lib/generationPreviewSettings.ts b/src/lib/generationPreviewSettings.tsnew file mode 100644index 0000000..f78989d--- /dev/null+++ b/src/lib/generationPreviewSettings.ts@@ -0,0 +1,27 @@+const KEY = "slopus.generation-previews.v1";+const EVENT = "slopus:generation-previews-changed";+let sessionOverride: boolean | undefined;++export function loadGenerationPreviewsEnabled(): boolean {+ if (sessionOverride !== undefined) return sessionOverride;+ try { return localStorage.getItem(KEY) !== "false"; }+ catch { return true; }+}++export function saveGenerationPreviewsEnabled(enabled: boolean) {+ try { localStorage.setItem(KEY, String(enabled)); sessionOverride = undefined; }+ catch { sessionOverride = enabled; }+ window.dispatchEvent(new Event(EVENT));+}++export function subscribeGenerationPreviews(listener: () => void) {+ const onStorage = (event: StorageEvent) => {+ if (event.key === KEY || event.key === null) listener();+ };+ window.addEventListener(EVENT, listener);+ window.addEventListener("storage", onStorage);+ return () => {+ window.removeEventListener(EVENT, listener);+ window.removeEventListener("storage", onStorage);+ };+}diff --git a/src/lib/upscalers.ts b/src/lib/upscalers.tsindex 0ff47ca..e66acc1 100644--- a/src/lib/upscalers.ts+++ b/src/lib/upscalers.ts@@ -9,6 +9,7 @@ export const UPSCALERS = [{ value: "seedvr2", label: "SeedVR2" },] as const;export const LATENT_UPSCALER_URL = "https://huggingface.co/LBH-123-AI/Minimax_h3_latent_Upscaler/resolve/main/minimax_h3_latent_upscaler_3d_conv_v1/minimax_h3_latent_upscaler_3d_conv_v1_fp16.safetensors";+export const TAEH3_URL = "https://raw.githubusercontent.com/madebyollin/taehv/62f7591f59dfbb4c3c02b7a621d180a9eeaba26c/safetensors/taeh3.safetensors";export const OTHER_WEIGHT_TEMPLATES = [{ id: "realesrgan", name: "Real-ESRGAN", files: [{ id: "model", name: "RealESRGAN x4plus", url: "https://huggingface.co/Comfy-Org/Real-ESRGAN_repackaged/resolve/main/RealESRGAN_x4plus.safetensors" },@@ -20,6 +21,9 @@ export const OTHER_WEIGHT_TEMPLATES = [{ id: "latent-upscale", name: "Latent upscale", files: [{ id: "model", name: "MiniMax H3 latent upscaler", url: LATENT_UPSCALER_URL },] },+ { id: "taeh3", name: "TAEH3 generation previews", files: [+ { id: "model", name: "TAEH3 preview VAE", url: TAEH3_URL },+ ] },] as const;const KEY = "slopus.other-weights.v1";const LOCAL_KEY = "slopus.other-weights-local.v1";