AI media harness for planning, generating, and editing locally
TypeScript
Add LightX2V Turbo LoRA download
Bittib79c1dd02bd6
diff --git a/docs/generator-weights.md b/docs/generator-weights.mdindex bae69d6..10d2164 100644--- a/docs/generator-weights.md+++ b/docs/generator-weights.md@@ -6,7 +6,9 @@ Settings → Generators includes a separate **LoRAs** library. **TaoMate 3-Step*downloads [TaoMate-H3-3step-ComfyUI.safetensors](https://huggingface.co/CZMartin22/TaoMate-H3-3step-ComfyUI/resolve/main/TaoMate-H3-3step-ComfyUI.safetensors).**Turbo** downloads [minimax_h3_ref2v_turbo_4step_v0.1_comfyui_bf16.safetensors](https://huggingface.co/lightx2v/Minimax-h3-Turbo/resolve/main/minimax_h3_ref2v_turbo_4step_v0.1_comfyui_bf16.safetensors)and defaults to an editable **4-step override**.-Both use the same managed `weights` location, background transfer, progress,+**LightX2V Turbo** downloads [the silveroxides experimental adapter](https://huggingface.co/silveroxides/MiniMax-H3_tests/resolve/main/experimental/minimax_h3_fl2v_lightx2v_turbo_4to8step_v0.1-v1.0_768p_v4_step600_dareties.safetensors)+and defaults to an editable **6-step override** and **0.9 multiplier**.+These adapters use the same managed `weights` location, background transfer, progress,cancellation, retry, and Work Queue controls as model weights. Downloads areserialized with weight downloads, and video generation can continue while downloading.Missing managed files become downloadable again. Removing a downloaded LoRAdiff --git a/src/lib/loras.test.ts b/src/lib/loras.test.tsindex 3a3d4c9..0445efa 100644--- a/src/lib/loras.test.ts+++ b/src/lib/loras.test.ts@@ -1,6 +1,6 @@// @vitest-environment jsdomimport { beforeEach, expect, it } from "vitest";-import { downloadableTemplateLoras, loadLoras, MAX_LORA_MULTIPLIER, saveLoras, TAOMATE_LORA, TURBO_LORA, VIGGLE_ANIMATE_LORA } from "./loras";+import { downloadableTemplateLoras, LIGHTX2V_TURBO_LORA, loadLoras, MAX_LORA_MULTIPLIER, saveLoras, TAOMATE_LORA, TURBO_LORA, VIGGLE_ANIMATE_LORA } from "./loras";import { createGeneratorTemplate, engineProviderSetting, generationStepsWithLoras, loadGeneratorTemplateSettings, saveGeneratorTemplateSettings, withEngineSettings } from "./settings";import { createProjectConfig } from "./project";@@ -67,10 +67,10 @@ it.each([0, 1, -3, 2.5, NaN, Infinity, 2147483648])("rejects invalid step overriexpect(() => saveLoras([{ id: "bad", name: "Bad", path: "D:/bad.safetensors", stepOverride }])).toThrow("Step override must be a whole number");});-it("starts with TaoMate and Turbo and preserves the local library", () => {- expect(loadLoras()).toEqual([TAOMATE_LORA, TURBO_LORA, VIGGLE_ANIMATE_LORA]);+it("starts with the bundled adapters and preserves the local library", () => {+ expect(loadLoras()).toEqual([TAOMATE_LORA, TURBO_LORA, VIGGLE_ANIMATE_LORA, LIGHTX2V_TURBO_LORA]);saveLoras([{ ...TAOMATE_LORA, path: "C:/weights/TaoMate.safetensors" }, { id: "style", name: "Style", path: "D:/style.safetensors" }]);- expect(loadLoras().map(({ name }) => name)).toEqual(["TaoMate 3-Step", "Style", "Turbo", "Viggle Animate Distillation"]);+ expect(loadLoras().map(({ name }) => name)).toEqual(["TaoMate 3-Step", "Style", "Turbo", "Viggle Animate Distillation", "LightX2V Turbo"]);});it("round-trips template order, enabled flags and strengths, and sends only active adapters", () => {diff --git a/src/lib/loras.ts b/src/lib/loras.tsindex aa0f01e..755d871 100644--- a/src/lib/loras.ts+++ b/src/lib/loras.ts@@ -25,6 +25,12 @@ export const VIGGLE_ANIMATE_LORA: Lora = {url: "https://huggingface.co/DeepBeepMeep/MiniMax-H3/resolve/main/loras/viggle_animate_distillation_bf16.safetensors",stepOverride: 4,};+export const LIGHTX2V_TURBO_LORA: Lora = {+ id: "lightx2v-turbo-6step", name: "LightX2V Turbo", path: "",+ url: "https://huggingface.co/silveroxides/MiniMax-H3_tests/resolve/main/experimental/minimax_h3_fl2v_lightx2v_turbo_4to8step_v0.1-v1.0_768p_v4_step600_dareties.safetensors",+ stepOverride: 6,+ multiplier: 0.9,+};const KEY = "slopus.loras.v1";const EVENT = "slopus:loras-changed";export function loadLoras(): Lora[] {@@ -44,8 +50,9 @@ export function loadLoras(): Lora[] {if (!ids.has(TAOMATE_LORA.id)) entries.unshift({ ...TAOMATE_LORA });if (!ids.has(TURBO_LORA.id)) entries.push({ ...TURBO_LORA });if (!ids.has(VIGGLE_ANIMATE_LORA.id)) entries.push({ ...VIGGLE_ANIMATE_LORA });+ if (!ids.has(LIGHTX2V_TURBO_LORA.id)) entries.push({ ...LIGHTX2V_TURBO_LORA });return entries;- } catch { return [{ ...TAOMATE_LORA }, { ...TURBO_LORA }, { ...VIGGLE_ANIMATE_LORA }]; }+ } catch { return [{ ...TAOMATE_LORA }, { ...TURBO_LORA }, { ...VIGGLE_ANIMATE_LORA }, { ...LIGHTX2V_TURBO_LORA }]; }}export function saveLoras(loras: Lora[]): void {if (loras.some((lora) => lora.multiplier !== undefined && !isLoraMultiplier(lora.multiplier))) {diff --git a/src/lib/weightDownloads.test.ts b/src/lib/weightDownloads.test.tsindex fa7b129..377603e 100644--- a/src/lib/weightDownloads.test.ts+++ b/src/lib/weightDownloads.test.ts@@ -1,7 +1,7 @@// @vitest-environment jsdomimport { invoke } from "@tauri-apps/api/core";import { cancelWeightDownload, downloadLora, removeLora, refreshDownloadedLoras, retryWeightDownload } from "./weightDownloads";-import { loadLoras, saveLoras, TAOMATE_LORA, TURBO_LORA, VIGGLE_ANIMATE_LORA } from "./loras";+import { LIGHTX2V_TURBO_LORA, loadLoras, saveLoras, TAOMATE_LORA, TURBO_LORA, VIGGLE_ANIMATE_LORA } from "./loras";import { beforeEach, expect, it, vi } from "vitest";import { chooseWeightSource, downloadTemplateWeights, getWeightDownloadState, refreshDownloadedWeights, removeTemplateWeights, updateWeightPath, weightDownloadProgress, type DownloadState } from "./weightDownloads";import { ANIMATE_CONDITIONING_URL, engineProviderSetting, createGeneratorTemplate, defaultGeneratorTemplate, isDownloadUrl, loadGeneratorTemplateSettings, minimaxOriginalTemplate, minimaxSingularityTemplate, saveGeneratorTemplateSettings, templateNeedsDownload, type WeightSource } from "./settings";@@ -86,12 +86,16 @@ it("preserves additional file edits while a download is in flight and retries faexpect(getWeightDownloadState()).toMatchObject({ active: false, completed: 1, error: null });});-it.each([TAOMATE_LORA, TURBO_LORA, VIGGLE_ANIMATE_LORA])("downloads $name through the weight transfer and restores missing downloads", async (lora) => {+it.each([TAOMATE_LORA, TURBO_LORA, VIGGLE_ANIMATE_LORA, LIGHTX2V_TURBO_LORA])("downloads $name through the weight transfer and restores missing downloads", async (lora) => {const savedLora = () => loadLoras().find(({ id }) => id === lora.id)!;await downloadLora(lora.id);expect(invoke).toHaveBeenCalledWith("download_weight", { requestId: expect.any(String), url: lora.url });const path = `C:/Slopus/weights/${lora.url!.split('/').at(-1)}`;expect(savedLora()).toMatchObject({ path, stepOverride: lora.stepOverride });+ expect(savedLora().multiplier).toBe(lora.multiplier);+ const options = engineProviderSetting(createGeneratorTemplate().paths, undefined, "sage2", [{ loraId: lora.id, enabled: true, strength: 1 }]).options;+ expect(options.stepOverride).toBe(lora.stepOverride);+ expect(JSON.parse(options.loras as string)).toEqual([{ path, strength: lora.multiplier ?? 1 }]);expect(getWeightDownloadState()).toMatchObject({ loraId: lora.id, active: false, completed: 1, error: null });files.clear();await refreshDownloadedLoras();