Skip to content

AI media harness for planning, generating, and editing locally

TypeScript

Use SeedVR2 FP16 weights

Bitti09c3fc47acb4
diff --git a/src-tauri/core/src/worker/protocol.rs b/src-tauri/core/src/worker/protocol.rs
index 2aaf81e..ea3bf0c 100644
--- a/src-tauri/core/src/worker/protocol.rs
+++ b/src-tauri/core/src/worker/protocol.rs
@@ -22,7 +22,7 @@ pub struct StartUpscale {
pub height: u32,
pub segment_frames: u32,
}
-pub const SEEDVR2_MODEL: &str = "https://huggingface.co/Comfy-Org/SeedVR2/resolve/main/diffusion_models/seedvr2_3b_int8_convrot.safetensors";
+pub const SEEDVR2_MODEL: &str = "https://huggingface.co/Comfy-Org/SeedVR2/resolve/main/diffusion_models/seedvr2_3b_fp16.safetensors";
pub const SEEDVR2_VAE: &str = "https://huggingface.co/Comfy-Org/SeedVR2/resolve/main/vae/seedvr2_ema_vae_fp16.safetensors";
pub const DEFAULT_PORT: u16 = 47321;
pub const TOKEN_HEADER: &str = "x-slopus-token";
diff --git a/src/components/OtherWeightsSettings.test.tsx b/src/components/OtherWeightsSettings.test.tsx
index 19bcb32..327a082 100644
--- a/src/components/OtherWeightsSettings.test.tsx
+++ b/src/components/OtherWeightsSettings.test.tsx
@@ -1,27 +1,30 @@
// @vitest-environment jsdom
import "@testing-library/jest-dom/vitest";
-import { cleanup, fireEvent, render, screen, waitFor } from "@testing-library/react";
+import { cleanup, fireEvent, render, screen, waitFor, within } from "@testing-library/react";
import { afterEach, expect, it, vi } from "vitest";
import { invoke } from "@tauri-apps/api/core";
import { OtherWeightsSettings } from "./OtherWeightsSettings";
-import { OTHER_WEIGHT_TEMPLATES, upscaleConfig } from "../lib/upscalers";
+import { OTHER_WEIGHT_TEMPLATES, otherWeightPaths, upscaleConfig } 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 }));
afterEach(() => { cleanup(); localStorage.clear(); vi.clearAllMocks(); });
-it("downloads the SeedVR2 model and VAE as one template and resolves both export paths", async () => {
+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;
if (name === "download_weight") return `C:/weights/${(args as { url: string }).url.split("/").at(-1)}` as never;
return undefined as never;
});
- expect(() => upscaleConfig("seedvr2")).toThrow("Other weights");
+ expect(() => upscaleConfig("seedvr2")).toThrow("Select a worker");
render(<OtherWeightsSettings desktop />);
await waitFor(() => expect(invoke).toHaveBeenCalledWith("find_downloaded_weights", expect.anything()));
- fireEvent.click(screen.getByRole("button", { name: "Download SeedVR2" }));
+ fireEvent.click(within(screen.getByText("SeedVR2").closest(".ui-settings-card") as HTMLElement).getByRole("button", { name: "Download" }));
await waitFor(() => expect(screen.getByRole("button", { name: "Downloaded" })).toBeDisabled());
for (const file of OTHER_WEIGHT_TEMPLATES[1].files) expect(invoke).toHaveBeenCalledWith("download_weight", expect.objectContaining({ url: file.url }));
- expect(upscaleConfig("seedvr2")).toEqual({ method: "seedvr2", modelPath: "C:/weights/seedvr2_3b_int8_convrot.safetensors", vaePath: "C:/weights/seedvr2_ema_vae_fp16.safetensors" });
+ expect(otherWeightPaths()).toEqual({
+ [OTHER_WEIGHT_TEMPLATES[1].files[0].url]: "C:/weights/seedvr2_3b_fp16.safetensors",
+ [OTHER_WEIGHT_TEMPLATES[1].files[1].url]: "C:/weights/seedvr2_ema_vae_fp16.safetensors",
+ });
expect(upscaleConfig("none")).toBeUndefined();
});
diff --git a/src/lib/upscalers.ts b/src/lib/upscalers.ts
index 1332f5c..a070ab1 100644
--- a/src/lib/upscalers.ts
+++ b/src/lib/upscalers.ts
@@ -13,7 +13,7 @@ export const OTHER_WEIGHT_TEMPLATES = [
{ id: "model", name: "RealESRGAN x4plus", url: "https://huggingface.co/Comfy-Org/Real-ESRGAN_repackaged/resolve/main/RealESRGAN_x4plus.safetensors" },
] },
{ id: "seedvr2", name: "SeedVR2", files: [
- { id: "model", name: "SeedVR2 3B INT8", url: "https://huggingface.co/Comfy-Org/SeedVR2/resolve/main/diffusion_models/seedvr2_3b_int8_convrot.safetensors" },
+ { id: "model", name: "SeedVR2 3B FP16", url: "https://huggingface.co/Comfy-Org/SeedVR2/resolve/main/diffusion_models/seedvr2_3b_fp16.safetensors" },
{ id: "vae", name: "SeedVR2 VAE", url: "https://huggingface.co/Comfy-Org/SeedVR2/resolve/main/vae/seedvr2_ema_vae_fp16.safetensors" },
] },
] as const;