Skip to content

armgit / fuobe

Public Imported from GitHub
0

The open creative studio on ComfyUI: images, video, 3D and audio on open weights, on your own GPU or the cloud. Camera motions, effects, apps, Cinema, Layers, Image to 3D and an AI agent.

MiniMax H3: a FastH3 build run by name loads the card's own file

Claude0618ba6815e6
diff --git a/src/server/h3-gpu.ts b/src/server/h3-gpu.ts
index 3768047e..4dbd9176 100644
--- a/src/server/h3-gpu.ts
+++ b/src/server/h3-gpu.ts
@@ -1,5 +1,5 @@
import "server-only";
-import { deviceOf, H3_TIER_GRAPH, H3_TIER_MODEL, h3TierFor, H3_TIER_PARAM, TIER_BEST_NOTE, TIER_DECODER_NOTE, TIER_NOTES, tierGraphFor, SOL_VAE, type H3TierChoice } from "@/lib/gpu/h3-tier";
+import { deviceOf, H3_TIER_GRAPH, H3_TIER_MODEL, h3TierFor, H3_TIER_PARAM, TIER_BEST_NOTE, TIER_DECODER_NOTE, TIER_NOTES, tierChoice, tierGraphFor, tierOfGraph, SOL_VAE, type H3TierChoice } from "@/lib/gpu/h3-tier";
import { getModel } from "@/lib/catalog";
import { preflightOn } from "./gpu/index-file";
import { readSnapshot } from "./gpu/snapshots";
@@ -39,9 +39,13 @@ function lastCard() {
/**
* Options → GPU tier for a MiniMax H3 run on `endpoint` (the route's graph before variants), or undefined when the run takes no
- * tier either way (another model, an orbit, a graph with no smaller build). `has`: is a graph in the library.
+ * tier either way (another model, an orbit, a graph with no smaller build). A FastH3 graph itself keeps its own tier. `has`: is a graph in the library.
*/
export function h3Gpu(endpoint: string, extra: Record<string, unknown>, has: (id: string) => boolean): H3GpuChoice | undefined {
+ // A FastH3 graph run directly (its hidden model named in the request): its build is fixed, and the file is still the card's,
+ // chosen here, never one the request names.
+ const own = tierOfGraph(endpoint);
+ if (own) return { gpuTier: own, unet: tierChoice(own, deviceOf(lastCard())).unet, note: TIER_NOTES[own] };
if (!H3_TIER_GRAPH[endpoint] || extra.orbit === true) return undefined;
const asked = extra[H3_TIER_PARAM];
const inv = lastCard();
diff --git a/tests/h3-any-gpu.test.ts b/tests/h3-any-gpu.test.ts
index 0f48f4bf..7d380333 100644
--- a/tests/h3-any-gpu.test.ts
+++ b/tests/h3-any-gpu.test.ts
@@ -220,6 +220,11 @@ describe("Auto and Options → GPU tier, decided once per run", () => {
const full = run({ unet: "something-else.safetensors" });
expect(full.h3).toEqual({ gpuTier: "standard" });
expect(full.notes ?? []).not.toContain(T.TIER_NOTES.trim);
+ // A FastH3 build named directly (its hidden model): its own tier, and the card's file, never the request's.
+ checked({ gb: 16, name: RTX5060 });
+ const direct = previewGeneration({ feature: "video", modelId: "oss-minimax-h3-trim", prompt: "a lighthouse at dusk", params: { aspectRatio: "16:9", duration: 5, extra: { unet: "something-else.safetensors" } } });
+ expect(direct).toMatchObject({ h3: { gpuTier: "trim", unet: T.TRIM_FILES.nvfp4.file }, route: { provider: "comfyui", endpoint: "minimax-h3-trim-t2v" } });
+ expect(h3Gpu("minimax-h3-fast-i2v", { unet: "something-else.safetensors", gpuTier: "trim" }, has)).toMatchObject({ gpuTier: "fast", unet: T.FAST_FILES.nvfp4.file });
} finally {
g.__fuobeComfyReach = before;
setSetting("demoMode", "auto");