Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

Studio: run Chroma's ComfyUI fp8 files in fp8, as ComfyUI does (#16872)

oobabooga6f0692aa2e7e
diff --git a/studio/backend/core/inference/diffusion_families.py b/studio/backend/core/inference/diffusion_families.py
index 89f292b66b6..ad624f9b97a 100644
--- a/studio/backend/core/inference/diffusion_families.py
+++ b/studio/backend/core/inference/diffusion_families.py
@@ -1205,8 +1205,11 @@ _FAMILIES: tuple[DiffusionFamily, ...] = (
name = "chroma",
comfy_shift_node = "sd3",
label = "Chroma",
- # Quantized activations drift Chroma (fp8 letterboxes some seeds): fp8 and GGUF weights widen to bf16.
- profile = FamilyProfile(scheme_deny = frozenset({"fp8", "int8", "nvfp4", "mxfp8"})),
+ # fp8 files compute in fp8 as in ComfyUI; auto never quantizes bf16 / GGUF weights, which ComfyUI runs unquantized.
+ profile = FamilyProfile(
+ scheme_deny = frozenset({"nvfp4", "mxfp8"}),
+ auto_scheme_skip = frozenset({"fp8", "int8"}),
+ ),
pipeline_class = "ChromaPipeline",
transformer_class = "ChromaTransformer2DModel",
base_repo = "lodestones/Chroma1-HD",
diff --git a/studio/backend/tests/fixtures/diffusion_family_data_freeze.json b/studio/backend/tests/fixtures/diffusion_family_data_freeze.json
index 995a01aa0a1..a15fa5fb19c 100644
--- a/studio/backend/tests/fixtures/diffusion_family_data_freeze.json
+++ b/studio/backend/tests/fixtures/diffusion_family_data_freeze.json
@@ -4531,8 +4531,6 @@
},
"family_scheme_deny": {
"chroma": [
- "fp8",
- "int8",
"mxfp8",
"nvfp4"
],
diff --git a/studio/backend/tests/test_diffusion_comfy_community_files.py b/studio/backend/tests/test_diffusion_comfy_community_files.py
index 49cd675d1ce..2a0df2491d5 100644
--- a/studio/backend/tests/test_diffusion_comfy_community_files.py
+++ b/studio/backend/tests/test_diffusion_comfy_community_files.py
@@ -401,7 +401,6 @@ def test_family_entries():
assert chroma.pipeline_class == "ChromaPipeline"
assert chroma.comfy_flow_shift == 1.0
assert dict(chroma.scheduler_overrides) == {"use_beta_sigmas": True}
- assert {"fp8", "int8", "nvfp4", "mxfp8"} <= chroma.profile.scheme_deny
anima = detect_family("", override = "anima")
assert anima.pipeline_class == "AnimaModularPipeline"
assert default_generation_params("oneObsession_anima29BV2.safetensors", anima.base_repo) == (
@@ -414,6 +413,28 @@ def test_family_entries():
) == (25, 7.0)
+def test_a_chroma_fp8_file_computes_in_fp8_and_auto_never_requantizes_chroma(monkeypatch):
+ import types
+
+ import core.inference.diffusion_transformer_quant as tq
+
+ for cap in ((8, 9), (9, 0), (10, 0), (12, 0)):
+ order = tq._auto_scheme_order("chroma", "cuda", cap)
+ assert tq.TQ_FP8 not in order and tq.TQ_INT8 not in order, cap
+ assert tq.TQ_FP8 in tq._auto_scheme_order("flux.1", "cuda", (8, 9))
+ assert tq._family_denied("chroma", tq.TQ_NVFP4) and tq._family_denied("chroma", tq.TQ_MXFP8)
+
+ monkeypatch.delenv(cq.COMFY_FP8_ENV, raising = False)
+ monkeypatch.setattr(tq, "native_quant_scheme", lambda *a, **k: None)
+ monkeypatch.setattr(tq, "dense_transformer_supported", lambda target: True)
+ monkeypatch.setattr(tq, "_scheme_supported", lambda scheme, device, unproven_ok = False: True)
+ monkeypatch.setattr(tq, "_capability", lambda *a: (8, 9))
+ target = types.SimpleNamespace(device = "cuda", dtype = torch.bfloat16)
+ assert cq.comfy_fp8_backend(target, "chroma") == "torchao"
+ assert tq.select_transformer_quant_scheme(target, tq.TQ_INT8, family = "chroma") == tq.TQ_INT8
+ assert tq.select_transformer_quant_scheme(target, tq.TQ_AUTO, family = "chroma") is None
+
+
def test_a_local_anima_load_gets_the_anima_defaults():
from core.inference.diffusion import _generation_defaults_for
from core.inference.diffusion_families import detect_family