AI media harness for planning, generating, and editing locally
TypeScript
Use FL2VA fallback for First Last Frame
Bittib0edbe16ce50
diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.mdindex 4a450dc..9f6b9aa 100644--- a/RELEASE_NOTES.md+++ b/RELEASE_NOTES.md@@ -24,6 +24,8 @@ This alpha update adds Prompt video scenes, agent image drafts, Sol attention an## Fixes and improvements+- First/Last Frame now uses Winnougan's FL2VA W4A8 fallback. Saved fallback selections migrate to the correct model; References retains its REF2VA fallback.+- FastH3 Omni always downloads its Omni transformer. Removed its inherited W4A8 fallback and migrate saved selections to Omni, reusing an existing Omni download when available.- Renamed Draw edit to Edit Box with a box icon. Hold Ctrl when releasing a lasso stroke to combine overlapping areas, or Alt to subtract. Cursor indicators show the active operation; holes and split areas persist in saved projects and generation masks.diff --git a/docs/generator-weights.md b/docs/generator-weights.mdindex 6ad627e..811df3e 100644--- a/docs/generator-weights.md+++ b/docs/generator-weights.md@@ -180,8 +180,8 @@ All four text encoder downloads use the original Qwen3-VL 32B encoder on all GPUThe incompatible 4B INT4 ConvRot option is removed from saved Minimax templates;templates using its downloaded file switch back to the original encoder, whichmay need downloading. The old file is left on disk.-First/Last Frame and References use the hybrid W4A8 transformer at 20 GB or less-and their respective INT8 transformer above 20 GB; unknown hardware uses the W4A8 fallback.+First/Last Frame uses Winnougan's `minimax_h3_fl2va_pruned-w4a8_convrot_pruned.safetensors` fallback at 20 GB or less; References uses the hybrid REF2VA W4A8 model.+Both use their respective INT8 transformer above 20 GB; unknown hardware uses the W4A8 fallback.FastH3 Omni uses its Omni transformer on all GPUs, without a W4A8 fallback.Saved Fast templates using the old fallback switch to Omni; an existing Omni download is reused when available.Other local weights and customized download variants are preserved.diff --git a/src/lib/settings.test.ts b/src/lib/settings.test.tsindex a3e9277..b135a9a 100644--- a/src/lib/settings.test.ts+++ b/src/lib/settings.test.ts@@ -143,14 +143,14 @@ describe("generator templates", () => {expect(engineProviderSetting(custom.paths, { enabled: true, model: null, options }, "sage2", [], "prompt").options).not.toHaveProperty("promptEmbedding");});- it("adds References with the same settings and VRAM variants except for the main transformer URL", () => {+ it("keeps References on REF2VA for both VRAM tiers", () => {const original = minimaxOriginalTemplate();const references = minimaxReferencesTemplate();const transformer = "https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/main/diffusion_models/minimax_h3_ref2va_pruned_int8_convrot.safetensors";expect(original.name).toBe("First/Last Frame");expect(references).toEqual({ ...original, id: "minimax-h3-references", name: "References",paths: { ...original.paths, transformer },- sources: { ...original.sources, transformer: [{ ...original.sources!.transformer![0], url: transformer }, original.sources!.transformer![1]] },+ sources: { ...original.sources, transformer: [{ ...original.sources!.transformer![0], url: transformer }, { url: "https://huggingface.co/koongrizzly/MiniMax_H3_int4_W4A8_ConvRot_Pruned/resolve/main/diffusion_models/minimax_h3_ref2va_hybrid_b20-49_pruned_w4a8_mixed.safetensors", gpuModel: "", minVramGb: 0 }] },});expect(loadGeneratorTemplateSettings().templates.map(({ name }) => name)).toEqual(["Default", "First/Last Frame", "References", "FastH3 Omni", "Singularity", "Animate", "MOSS Image"]);});@@ -169,7 +169,7 @@ describe("generator templates", () => {expect(settings.templates[2]).toEqual(minimaxFastTemplate());expect(settings.templates[3]).toEqual(minimaxSingularityTemplate());expect(settings.defaultTemplateId).toBe(template.id);- expect(settings.catalogVersion).toBe(12);+ expect(settings.catalogVersion).toBe(13);expect(loadGeneratorTemplateSettings()).toEqual(settings);saveGeneratorTemplateSettings({ ...settings, templates: [settings.templates[0]] });expect(loadGeneratorTemplateSettings().templates).toHaveLength(1);@@ -190,7 +190,7 @@ describe("generator templates", () => {const settings = loadGeneratorTemplateSettings();expect(settings.templates).toEqual([expect.objectContaining(custom), minimaxSingularityTemplate(), viggleAnimateTemplate(), mossImageTemplate()]);expect(settings.defaultTemplateId).toBe(custom.id);- expect(settings.catalogVersion).toBe(12);+ expect(settings.catalogVersion).toBe(13);expect(loadGeneratorTemplateSettings()).toEqual(settings);saveGeneratorTemplateSettings({ ...settings, templates: [custom] });expect(loadGeneratorTemplateSettings().templates).toEqual([expect.objectContaining(custom)]);@@ -255,7 +255,7 @@ describe("generator templates", () => {localStorage.setItem("slopus.generator-templates.v1", JSON.stringify({ templates: [template], catalogVersion: 8 }));const settings = loadGeneratorTemplateSettings();expect(settings.templates).toEqual([minimaxFastTemplate(), mossImageTemplate()]);- expect(settings.catalogVersion).toBe(12);+ expect(settings.catalogVersion).toBe(13);expect(templateNeedsDownload(settings.templates[0])).toBe(true);expect(loadGeneratorTemplateSettings()).toEqual(settings);});@@ -270,7 +270,7 @@ describe("generator templates", () => {const otherPaths = { ...template.paths };localStorage.setItem("slopus.generator-templates.v1", JSON.stringify({ templates: [template], catalogVersion: 10 }));const settings = loadGeneratorTemplateSettings();- expect(settings.catalogVersion).toBe(12);+ expect(settings.catalogVersion).toBe(13);expect(settings.templates).toHaveLength(1);expect(settings.templates[0]).toMatchObject({ id: template.id, name: "FastH3 Omni", defaultSteps: 8,paths: { ...otherPaths, transformer: minimaxFastTemplate().paths.transformer },@@ -279,10 +279,33 @@ describe("generator templates", () => {expect(loadGeneratorTemplateSettings()).toEqual(settings);});+ it.each(["url", "downloaded", "primary", "custom"])("migrates the First/Last Frame fallback from %s without changing other generators", (selection) => {+ const template = minimaxOriginalTemplate();+ const expectedUrl = "https://huggingface.co/Winnougan/MiniMax-H3-INT4_Convrot_ComfyUI/resolve/main/minimax_h3_fl2va_pruned-w4a8_convrot_pruned.safetensors";+ const oldFallback = { ...minimaxReferencesTemplate().sources!.transformer![1], downloadedPath: "D:/weights/ref2va.safetensors" };+ template.sources!.transformer = [template.sources!.transformer![0], oldFallback];+ template.paths.transformer = selection === "url" ? oldFallback.url.replace("/resolve/", "/blob/")+ : selection === "downloaded" ? oldFallback.downloadedPath : selection === "custom" ? "D:/custom.safetensors" : template.paths.transformer;+ const previousPath = template.paths.transformer;+ template.name = "My first/last generator";+ template.defaultSteps = 12;+ const references = minimaxReferencesTemplate(), fast = minimaxFastTemplate();+ localStorage.setItem("slopus.generator-templates.v1", JSON.stringify({ templates: [template, references, fast], catalogVersion: 12 }));+ const settings = loadGeneratorTemplateSettings();+ const migrated = settings.templates[0];+ expect(migrated.sources!.transformer).toContainEqual({ url: expectedUrl, gpuModel: "", minVramGb: 0 });+ expect(migrated.sources!.transformer!.some((source) => source.url.includes("ref2va") || source.downloadedPath === oldFallback.downloadedPath)).toBe(false);+ expect(migrated.paths.transformer).toBe(selection === "url" || selection === "downloaded" ? expectedUrl : previousPath);+ expect(migrated.name).toBe(template.name);+ expect(migrated.defaultSteps).toBe(12);+ expect(settings.templates.slice(1)).toEqual([references, fast]);+ expect(loadGeneratorTemplateSettings()).toEqual(settings);+ });+it.each(["url", "downloaded", "cached omni", "custom", "fallback only"])("removes the FastH3 fallback from saved settings using %s", (selection) => {const template = minimaxFastTemplate();const omniUrl = template.paths.transformer;- const fallback = { ...minimaxOriginalTemplate().sources!.transformer![1], downloadedPath: "D:/weights/ref2va.safetensors" };+ const fallback = { ...minimaxReferencesTemplate().sources!.transformer![1], downloadedPath: "D:/weights/ref2va.safetensors" };template.name = "My Omni";template.defaultSteps = 12;template.paths = { transformer: selection === "url" ? fallback.url.replace("/resolve/", "/blob/") : selection === "custom" ? "D:/custom.safetensors" : fallback.downloadedPath,@@ -343,7 +366,7 @@ describe("generator templates", () => {template.paths[field] = downloadedPath;localStorage.setItem("slopus.generator-templates.v1", JSON.stringify({ templates: [template], catalogVersion: 1 }));const settings = loadGeneratorTemplateSettings();- expect(settings.catalogVersion).toBe(12);+ expect(settings.catalogVersion).toBe(13);expect(settings.templates[0].paths[field]).toBe(downloadedPath);expect(settings.templates[0].sources![field]).toEqual(minimaxOriginalTemplate().sources![field]!.map((source, index) =>index === 0 ? { ...source, downloadedPath } : source));@@ -378,7 +401,7 @@ describe("generator templates", () => {localStorage.setItem("slopus.generator-templates.v1", JSON.stringify({ templates: [template], defaultTemplateId: template.id, catalogVersion: 2 }));const settings = loadGeneratorTemplateSettings();const migrated = settings.templates[0];- expect(settings.catalogVersion).toBe(12);+ expect(settings.catalogVersion).toBe(13);expect(migrated.sources!.textEncoder).toEqual([{ url: originalUrl, gpuModel: "", minVramGb: 0, ...(selection === "cached original" ? { downloadedPath: cachedOriginal } : {}) },custom,diff --git a/src/lib/settings.ts b/src/lib/settings.tsindex b8b57c6..b0975ca 100644--- a/src/lib/settings.ts+++ b/src/lib/settings.ts@@ -248,6 +248,9 @@ export function mossImageTemplate(): GeneratorTemplate {return { id: "moss-image", name: "MOSS Image", modelType: MOSS_MODEL_TYPE, defaultSteps: 50, attention: "flash2", paths, sources };}+const MINIMAX_REF2VA_W4A8_URL = "https://huggingface.co/koongrizzly/MiniMax_H3_int4_W4A8_ConvRot_Pruned/resolve/main/diffusion_models/minimax_h3_ref2va_hybrid_b20-49_pruned_w4a8_mixed.safetensors";+const MINIMAX_FL2VA_W4A8_URL = "https://huggingface.co/Winnougan/MiniMax-H3-INT4_Convrot_ComfyUI/resolve/main/minimax_h3_fl2va_pruned-w4a8_convrot_pruned.safetensors";+export function minimaxOriginalTemplate(): GeneratorTemplate {const root = "https://huggingface.co/Comfy-Org/MiniMax-H3/blob/main/";const paths = {@@ -259,7 +262,7 @@ export function minimaxOriginalTemplate(): GeneratorTemplate {const sources: GeneratorTemplate["sources"] = Object.fromEntries(ENGINE_PATH_FIELDS.filter(({ id }) => paths[id]).map(({ id }) => [id, [{ url: paths[id], gpuModel: "", minVramGb: 0 }]]));sources.transformer = [{ url: paths.transformer, gpuModel: "", minVramGb: 21 },- { url: "https://huggingface.co/koongrizzly/MiniMax_H3_int4_W4A8_ConvRot_Pruned/resolve/main/diffusion_models/minimax_h3_ref2va_hybrid_b20-49_pruned_w4a8_mixed.safetensors", gpuModel: "", minVramGb: 0 },+ { url: MINIMAX_FL2VA_W4A8_URL, gpuModel: "", minVramGb: 0 },];return { id: "minimax-h3-original", name: "First/Last Frame", modelType: MINIMAX_H3_MODEL_TYPE, defaultSteps: 20, attention: "sage2", paths, sources };}@@ -274,8 +277,12 @@ function minimaxVariantTemplate(id: string, name: string, transformer: string, d}export function minimaxReferencesTemplate(): GeneratorTemplate {- return minimaxVariantTemplate("minimax-h3-references", "References",+ const template = minimaxVariantTemplate("minimax-h3-references", "References","https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/main/diffusion_models/minimax_h3_ref2va_pruned_int8_convrot.safetensors");+ return { ...template, sources: { ...template.sources, transformer: [+ { url: template.paths.transformer, gpuModel: "", minVramGb: 21 },+ { url: MINIMAX_REF2VA_W4A8_URL, gpuModel: "", minVramGb: 0 },+ ] } };}export function minimaxFastTemplate(): GeneratorTemplate {@@ -314,7 +321,7 @@ export function viggleAnimateTemplate(): GeneratorTemplate {const initialTemplateSettings = (paths = EMPTY_ENGINE_SETTINGS): GeneratorTemplateSettings => ({templates: [{ id: "default", name: "Default", modelType: MINIMAX_H3_MODEL_TYPE, defaultSteps: DEFAULT_GENERATION_STEPS, attention: "sage2", paths: copyPaths(paths) }, minimaxOriginalTemplate(), minimaxReferencesTemplate(), minimaxFastTemplate(), minimaxSingularityTemplate(), viggleAnimateTemplate(), mossImageTemplate()],defaultTemplateId: "default",- catalogVersion: 12,+ catalogVersion: 13,});const normalizeTemplateSettings = (value: unknown): GeneratorTemplateSettings | null => {@@ -376,7 +383,7 @@ const normalizeTemplateSettings = (value: unknown): GeneratorTemplateSettings |templates,defaultTemplateId: templates.find((template) => template.id === requestedDefault && templateUsable(template))?.id?? templates.find(templateUsable)?.id ?? "",- catalogVersion: typeof record.catalogVersion === "number" && [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].includes(record.catalogVersion) ? record.catalogVersion : 0,+ catalogVersion: typeof record.catalogVersion === "number" && [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13].includes(record.catalogVersion) ? record.catalogVersion : 0,};};@@ -520,7 +527,7 @@ export function loadGeneratorTemplateSettings(): GeneratorTemplateSettings {const fast = normalized.templates.find(({ id }) => id === "minimax-h3-fast");if (fast) {const bundled = minimaxFastTemplate();- const fallbackUrl = "https://huggingface.co/koongrizzly/MiniMax_H3_int4_W4A8_ConvRot_Pruned/resolve/main/diffusion_models/minimax_h3_ref2va_hybrid_b20-49_pruned_w4a8_mixed.safetensors";+ const fallbackUrl = MINIMAX_REF2VA_W4A8_URL;const canonical = (url: string) => url.trim().replace("/blob/", "/resolve/");const sources = fast.sources?.transformer ?? [];const removed = sources.filter((source) => canonical(source.url) === fallbackUrl);@@ -541,6 +548,23 @@ export function loadGeneratorTemplateSettings(): GeneratorTemplateSettings {normalized = normalizeTemplateSettings({ ...normalized, catalogVersion: 12 })!;localStorage.setItem(GENERATOR_TEMPLATES_KEY, JSON.stringify(normalized));}+ if ((normalized.catalogVersion ?? 0) < 13) {+ const original = normalized.templates.find(({ id }) => id === "minimax-h3-original");+ if (original) {+ const isOldFallback = (url: string) => url.trim().replace("/blob/", "/resolve/") === MINIMAX_REF2VA_W4A8_URL;+ const sources = original.sources?.transformer;+ if (isOldFallback(original.paths.transformer) || sources?.some((source) => isOldFallback(source.url) && source.downloadedPath === original.paths.transformer)) {+ original.paths.transformer = sources?.find((source) => source.url === MINIMAX_FL2VA_W4A8_URL)?.downloadedPath || MINIMAX_FL2VA_W4A8_URL;+ }+ if (sources) original.sources!.transformer = sources.map((source) => {+ if (!isOldFallback(source.url)) return source;+ const { downloadedPath: _downloadedPath, ...updated } = source;+ return { ...updated, url: MINIMAX_FL2VA_W4A8_URL };+ });+ }+ normalized = normalizeTemplateSettings({ ...normalized, catalogVersion: 13 })!;+ localStorage.setItem(GENERATOR_TEMPLATES_KEY, JSON.stringify(normalized));+ }return normalized;}}diff --git a/src/lib/weightDownloads.test.ts b/src/lib/weightDownloads.test.tsindex c8373d2..16ce70a 100644--- a/src/lib/weightDownloads.test.ts+++ b/src/lib/weightDownloads.test.ts@@ -280,11 +280,11 @@ it.each([8, 11.4, 12, 12.01, 16, 19.4, 20, 20.01, 24, 32])("selects the Minimaxexpect(invoke).toHaveBeenCalledWith("download_weight", expect.objectContaining({url: minimaxOriginalTemplate().paths.textEncoder,}));- const transformer = vram <= 20 ? "minimax_h3_ref2va_hybrid_b20-49_pruned_w4a8_mixed.safetensors" : "minimax_h3_fl2va_pruned_int8_convrot.safetensors";+ const transformer = vram <= 20 ? "minimax_h3_fl2va_pruned-w4a8_convrot_pruned.safetensors" : "minimax_h3_fl2va_pruned_int8_convrot.safetensors";expect(saved().paths.transformer).toBe(`C:/Slopus/weights/${transformer}`);expect(invoke).toHaveBeenCalledWith("download_weight", expect.objectContaining({url: vram <= 20- ? "https://huggingface.co/koongrizzly/MiniMax_H3_int4_W4A8_ConvRot_Pruned/resolve/main/diffusion_models/minimax_h3_ref2va_hybrid_b20-49_pruned_w4a8_mixed.safetensors"+ ? "https://huggingface.co/Winnougan/MiniMax-H3-INT4_Convrot_ComfyUI/resolve/main/minimax_h3_fl2va_pruned-w4a8_convrot_pruned.safetensors": minimaxOriginalTemplate().paths.transformer,}));});