Skip to content

AI media harness for planning, generating, and editing locally

TypeScript

Add Music3 precision variants

Bitti66c1d647f76f
diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
index f94379a..2808f9e 100644
--- a/RELEASE_NOTES.md
+++ b/RELEASE_NOTES.md
@@ -4,6 +4,8 @@ Changes since 0.3.2.
## What's new
+- **MiniMax Music3 precision.** Added FP16 transformer downloads for GPUs with at least 5 GB VRAM and FP32 for at least 10 GB, alongside the 3 GB INT8 variant.
+
- **Download memory warnings.** MiniMax generators and shared weights now have minimum VRAM limits. Downloads warn when no variant of a needed weight fits the detected GPU, with Cancel and Download anyway options. Existing downloads and custom limits are preserved.
- **Single Shot continuity.** With Context video, use the Clown Context overlap recipe: hold the first 22 frames of Previous video's 39-frame tail, regenerate the final 17, and replace the overlap in joined video and audio. Keystone and Capstone remain sampling context; original source files stay intact. Requires updated workers.
diff --git a/docs/generator-weights.md b/docs/generator-weights.md
index f5363f4..34fd1f9 100644
--- a/docs/generator-weights.md
+++ b/docs/generator-weights.md
@@ -199,7 +199,13 @@ Bundled MiniMax weights declare these minimum GPU memory capacities:
| H3 video VAE FP16 / INT8 | 6 / 3 |
| Sol H3 VAE | 6 |
| H3 audio VAE FP32 | 1 |
-| MiniMax Music3 transformer / text encoder / audio VAE | 3 / 9 / 1 |
+| MiniMax Music3 transformer INT8 / FP16 / FP32 | 3 / 5 / 10 |
+| MiniMax Music3 text encoder / audio VAE | 9 / 1 |
+
+MiniMax Music3 selects FP32 at 10 GB or more, FP16 at 5 GB or more, and INT8
+below 5 GB. Its text encoder still requires 9 GB; smaller GPUs receive the
+download warning even if the transformer fits. Existing Music3 templates gain
+the new variants once, preserving downloaded files and customized sources.
Before a generator or shared-component download starts transferring files, Slopus
warns if all GPU-compatible variants for any needed weight exceed the detected
diff --git a/src/lib/settings.test.ts b/src/lib/settings.test.ts
index 9adb4e0..e49ac4f 100644
--- a/src/lib/settings.test.ts
+++ b/src/lib/settings.test.ts
@@ -58,6 +58,36 @@ describe("generator templates", () => {
expect(generatorPathFields(template).map(({ id }) => id)).toEqual(["transformer", "textEncoder", "audioVae"]);
});
+ it.each([[3, "int8_convrot"], [4, "int8_convrot"], [4.7, "fp16"], [5, "fp16"], [8, "fp16"], [9, "fp16"], [9.7, "fp32"], [10, "fp32"], [24, "fp32"]] as const)("selects Music3 %s GB transformer as %s", (gib, precision) => {
+ const sources = musicTemplates()[1].sources!.transformer!;
+ expect(chooseWeightSource(sources, [{ name: "GPU", memoryBytes: gib * 1024 ** 3 }])?.url)
+ .toBe(`https://huggingface.co/Comfy-Org/MiniMax-Music-3/resolve/main/diffusion_models/minimax_music3_dit_${precision}.safetensors`);
+ });
+
+ it("adds Music3 precision variants once, preserving downloads and custom variants", () => {
+ const template = musicTemplates()[1];
+ const [fp32, fp16, int8] = template.sources!.transformer!;
+ const cached = "D:/weights/music-int8.safetensors";
+ const customFp16 = { ...fp16, url: fp16.url.replace("/resolve/", "/blob/"), minVramGb: 7 };
+ const custom = { url: "https://example.com/custom.safetensors", gpuModel: "Custom GPU", minVramGb: 6 };
+ const previous = { ...template, name: "My music", paths: { ...template.paths, transformer: cached },
+ sources: { ...template.sources, transformer: [{ ...int8, downloadedPath: cached }, customFp16, custom] } };
+ saveGeneratorTemplateSettings({ templates: [previous], defaultTemplateId: previous.id, catalogVersion: 18 });
+ const upgraded = loadGeneratorTemplateSettings();
+ expect(upgraded.catalogVersion).toBe(19);
+ expect(upgraded.templates[0]).toMatchObject({ name: "My music", paths: { transformer: cached },
+ sources: { transformer: [fp32, { ...int8, downloadedPath: cached }, customFp16, custom] } });
+ expect(loadGeneratorTemplateSettings()).toEqual(upgraded);
+ // Removing an alternative after the migration is a persistent user choice.
+ upgraded.templates[0].sources!.transformer = [int8];
+ saveGeneratorTemplateSettings(upgraded);
+ expect(loadGeneratorTemplateSettings().templates[0].sources!.transformer).toEqual([int8]);
+
+ const customTemplate = { ...previous, sources: { transformer: [custom] } };
+ saveGeneratorTemplateSettings({ templates: [customTemplate], defaultTemplateId: customTemplate.id, catalogVersion: 18 });
+ expect(loadGeneratorTemplateSettings().templates[0].sources!.transformer).toEqual([custom]);
+ });
+
it("upgrades existing YuE2 sources once while preserving downloaded and custom choices", () => {
const template = musicTemplates()[0];
const int8 = template.sources!.transformer![1];
@@ -66,7 +96,7 @@ describe("generator templates", () => {
sources: { transformer: [{ ...int8, downloadedPath: cached }] } };
saveGeneratorTemplateSettings({ templates: [previous], defaultTemplateId: previous.id, catalogVersion: 16 });
const upgraded = loadGeneratorTemplateSettings();
- expect(upgraded.catalogVersion).toBe(18);
+ expect(upgraded.catalogVersion).toBe(19);
expect(upgraded.templates[0]).toMatchObject({ name: "My music", paths: { transformer: cached },
sources: { transformer: [template.sources!.transformer![0], { ...int8, downloadedPath: cached }] } });
expect(loadGeneratorTemplateSettings()).toEqual(upgraded);
@@ -271,7 +301,7 @@ describe("generator templates", () => {
expect(generatorOwned(settings.templates[2])).toEqual(generatorOwned(minimaxFastTemplate()));
expect(generatorOwned(settings.templates[3])).toEqual(generatorOwned(minimaxSingularityTemplate()));
expect(settings.defaultTemplateId).toBe(template.id);
- expect(settings.catalogVersion).toBe(18);
+ expect(settings.catalogVersion).toBe(19);
expect(loadGeneratorTemplateSettings()).toEqual(settings);
saveGeneratorTemplateSettings({ ...settings, templates: [settings.templates[0]] });
expect(loadGeneratorTemplateSettings().templates).toHaveLength(1);
@@ -292,7 +322,7 @@ describe("generator templates", () => {
const settings = loadGeneratorTemplateSettings();
expect(generatorOwned(settings.templates)).toEqual(generatorOwned([custom, minimaxSingularityTemplate(), viggleAnimateTemplate(), mossImageTemplate(), fiboImageTemplate(), fiboBaseTemplate(), ...musicTemplates()]));
expect(settings.defaultTemplateId).toBe(custom.id);
- expect(settings.catalogVersion).toBe(18);
+ expect(settings.catalogVersion).toBe(19);
expect(loadGeneratorTemplateSettings()).toEqual(settings);
saveGeneratorTemplateSettings({ ...settings, templates: [custom] });
expect(generatorOwned(loadGeneratorTemplateSettings().templates)).toEqual(generatorOwned([custom]));
@@ -357,7 +387,7 @@ describe("generator templates", () => {
localStorage.setItem("slopus.generator-templates.v1", JSON.stringify({ templates: [template], catalogVersion: 8 }));
const settings = loadGeneratorTemplateSettings();
expect(generatorOwned(settings.templates)).toEqual(generatorOwned([minimaxFastTemplate(), mossImageTemplate(), fiboImageTemplate(), fiboBaseTemplate(), ...musicTemplates()]));
- expect(settings.catalogVersion).toBe(18);
+ expect(settings.catalogVersion).toBe(19);
expect(templateNeedsDownload(settings.templates[0])).toBe(true);
expect(loadGeneratorTemplateSettings()).toEqual(settings);
});
@@ -372,7 +402,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(18);
+ expect(settings.catalogVersion).toBe(19);
expect(settings.templates).toHaveLength(5);
expect(settings.templates[0]).toMatchObject({ id: template.id, name: "FastH3 Omni", defaultSteps: 8,
paths: { ...otherPaths, transformer: minimaxFastTemplate().paths.transformer },
@@ -468,7 +498,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(18);
+ expect(settings.catalogVersion).toBe(19);
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));
@@ -503,7 +533,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(18);
+ expect(settings.catalogVersion).toBe(19);
expect(migrated.sources!.textEncoder).toEqual([
{ url: originalUrl, gpuModel: "", minVramGb: 16, ...(selection === "cached original" ? { downloadedPath: cachedOriginal } : {}) },
custom,
diff --git a/src/lib/settings.ts b/src/lib/settings.ts
index 740fa3b..7083bac 100644
--- a/src/lib/settings.ts
+++ b/src/lib/settings.ts
@@ -275,6 +275,10 @@ export function musicTemplates(): GeneratorTemplate[] {
// Selection rounds detected GiB up: a minimum tier of 9 means strictly
// more than 8 GiB, keeping 8 GiB cards on the INT8 fallback.
...(modelType === "yue2" && id === "transformer" ? [{ url: "https://huggingface.co/Comfy-Org/YuE2/resolve/main/checkpoints/yue2_3b_bf16.safetensors", gpuModel: "", minVramGb: 9 }] : []),
+ ...(modelType === "minimax_music3" && id === "transformer" ? [
+ { url: root + "diffusion_models/minimax_music3_dit_fp32.safetensors", gpuModel: "", minVramGb: 10 },
+ { url: root + "diffusion_models/minimax_music3_dit_fp16.safetensors", gpuModel: "", minVramGb: 5 },
+ ] : []),
{ url, gpuModel: "", minVramGb: modelType === "minimax_music3" ? id === "transformer" ? 3 : id === "textEncoder" ? 9 : 1 : 0 },
]])) };
});
@@ -385,7 +389,7 @@ export function viggleAnimateTemplate(): GeneratorTemplate {
const initialTemplateSettings = (paths = EMPTY_ENGINE_SETTINGS): GeneratorTemplateSettings => normalizeTemplateSettings({
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(), fiboImageTemplate(), fiboBaseTemplate(), ...musicTemplates()],
defaultTemplateId: "default",
- catalogVersion: 18,
+ catalogVersion: 19,
})!;
const normalizeTemplateSettings = (value: unknown, shareComponents = true): GeneratorTemplateSettings | null => {
@@ -452,7 +456,7 @@ const normalizeTemplateSettings = (value: unknown, shareComponents = true): Gene
...shared,
defaultTemplateId: !shareComponents ? requestedDefault : shared.templates.find((template) => template.id === requestedDefault && templateUsable(template))?.id
?? shared.templates.find(templateUsable)?.id ?? "",
- catalogVersion: typeof record.catalogVersion === "number" && [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18].includes(record.catalogVersion) ? record.catalogVersion : 0,
+ catalogVersion: typeof record.catalogVersion === "number" && [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19].includes(record.catalogVersion) ? record.catalogVersion : 0,
};
};
@@ -687,6 +691,20 @@ export function loadGeneratorTemplateSettings(): GeneratorTemplateSettings {
normalized = normalizeTemplateSettings({ ...normalized, catalogVersion: 18 }, false)!;
localStorage.setItem(GENERATOR_TEMPLATES_KEY, JSON.stringify(normalized));
}
+ if ((normalized.catalogVersion ?? 0) < 19) {
+ const music = musicTemplates()[1];
+ const canonical = (url: string) => url.trim().replace("/blob/", "/resolve/");
+ normalized.templates = normalized.templates.map((template) => {
+ const sources = template.sources?.transformer ?? [];
+ if (template.id !== music.id || template.modelType !== music.modelType
+ || !sources.some((source) => canonical(source.url) === music.paths.transformer)) return template;
+ const missing = music.sources!.transformer!.filter((source) =>
+ !sources.some((existing) => canonical(existing.url) === source.url));
+ return { ...template, sources: { ...template.sources, transformer: [...missing, ...sources] } };
+ });
+ normalized = normalizeTemplateSettings({ ...normalized, catalogVersion: 19 }, false)!;
+ localStorage.setItem(GENERATOR_TEMPLATES_KEY, JSON.stringify(normalized));
+ }
const shared = normalizeTemplateSettings(normalized)!;
if (!normalized.h3Components) localStorage.setItem(GENERATOR_TEMPLATES_KEY, JSON.stringify(shared));
return shared;
diff --git a/src/lib/weightDownloadVram.test.ts b/src/lib/weightDownloadVram.test.ts
index 3ec11d3..664f5a8 100644
--- a/src/lib/weightDownloadVram.test.ts
+++ b/src/lib/weightDownloadVram.test.ts
@@ -141,7 +141,7 @@ it("seeds all agreed minimums and upgrades old defaults once without losing cust
const limits = Object.fromEntries(settings.templates.filter(({ modelType, id }) => id !== "default" && ["minimax-h3", "minimax_music3"].includes(modelType))
.map((template) => [template.id, template.sources!.transformer!.map(({ minVramGb }) => minVramGb)]));
expect(limits).toEqual({ "minimax-h3-original": [21, 12], "minimax-h3-references": [21, 12],
- "minimax-h3-fast": [22], "minimax-h3-singularity": [21], "viggle-animate": [21], minimax_music3: [3] });
+ "minimax-h3-fast": [22], "minimax-h3-singularity": [21], "viggle-animate": [21], minimax_music3: [10, 5, 3] });
expect(Object.fromEntries(settings.h3Components!.templates.map((entry) => [entry.id, entry.sources[0].minVramGb]))).toEqual({
"h3-video-vae": 6, "sol-h3-vae": 6, "h3-fast-video-vae": 3, "h3-audio-vae": 1, "h3-text-encoder": 16,
});
@@ -163,7 +163,7 @@ it("seeds all agreed minimums and upgrades old defaults once without losing cust
localStorage.setItem("slopus.generator-templates.v1", JSON.stringify({ ...settings, catalogVersion: 17 }));
const migrated = loadGeneratorTemplateSettings();
const updated = migrated.templates.find(({ id }) => id === original.id)!;
- expect(migrated.catalogVersion).toBe(18);
+ expect(migrated.catalogVersion).toBe(19);
expect(updated.paths.transformer).toBe(original.paths.transformer);
expect(updated.sources!.transformer!.map(({ minVramGb }) => minVramGb)).toEqual([21, 10, 0]);
expect(updated.sources!.transformer![0].downloadedPath).toBe(original.paths.transformer);