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.

Pin qwen-image-layered's VAE config for the seam guard, and check coverage in Backend CI (#12843)

Daniel Han192fe85e88b7
diff --git a/studio/backend/tests/fixtures/vae_tile_configs.json b/studio/backend/tests/fixtures/vae_tile_configs.json
index 0dde930c257..378a9799c2e 100644
--- a/studio/backend/tests/fixtures/vae_tile_configs.json
+++ b/studio/backend/tests/fixtures/vae_tile_configs.json
@@ -175,6 +175,68 @@
"use_quant_conv": false
}
},
+ "qwen-image-layered": {
+ "kind": "image",
+ "repo": "Qwen/Qwen-Image-Layered",
+ "revision": "8f0ca708dfff6ba1dd5f2d85d78f8c108a040bcf",
+ "config": {
+ "_class_name": "AutoencoderKLQwenImage",
+ "_diffusers_version": "0.36.0.dev0",
+ "attn_scales": [],
+ "base_dim": 96,
+ "dim_mult": [
+ 1,
+ 2,
+ 4,
+ 4
+ ],
+ "dropout": 0.0,
+ "input_channels": 4,
+ "latents_mean": [
+ -0.7571,
+ -0.7089,
+ -0.9113,
+ 0.1075,
+ -0.1745,
+ 0.9653,
+ -0.1517,
+ 1.5508,
+ 0.4134,
+ -0.0715,
+ 0.5517,
+ -0.3632,
+ -0.1922,
+ -0.9497,
+ 0.2503,
+ -0.2921
+ ],
+ "latents_std": [
+ 2.8184,
+ 1.4541,
+ 2.3275,
+ 2.6558,
+ 1.2196,
+ 1.7708,
+ 2.6052,
+ 2.0743,
+ 3.2687,
+ 2.1526,
+ 2.8652,
+ 1.5579,
+ 1.6382,
+ 1.1253,
+ 2.8251,
+ 1.916
+ ],
+ "num_res_blocks": 2,
+ "temperal_downsample": [
+ false,
+ true,
+ true
+ ],
+ "z_dim": 16
+ }
+ },
"qwen-image-edit": {
"kind": "image",
"repo": "Qwen/Qwen-Image-Edit-2511",
diff --git a/studio/backend/tests/test_vae_tile_fixture_coverage.py b/studio/backend/tests/test_vae_tile_fixture_coverage.py
new file mode 100644
index 00000000000..7422ab6f8d3
--- /dev/null
+++ b/studio/backend/tests/test_vae_tile_fixture_coverage.py
@@ -0,0 +1,54 @@
+# SPDX-License-Identifier: AGPL-3.0-only
+# Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0
+
+"""Every image / video family has a pinned VAE config in the seam guard's fixture.
+
+test_vae_tile_geometry.py checks this too, but it needs torch and diffusers, so it only runs in the
+path-filtered seam-guard job. #12775 / #12777 added qwen-image-layered after the guard (#12766) had
+been tested, and nothing on their PRs read the fixture: the seam guard went red on main. This copy
+needs neither, so Backend CI catches a new family without its VAE config on the PR that adds it.
+"""
+
+from __future__ import annotations
+
+import json
+import re
+import sys
+from pathlib import Path
+
+import pytest
+
+_BACKEND = Path(__file__).resolve().parent.parent
+if str(_BACKEND) not in sys.path:
+ sys.path.insert(0, str(_BACKEND))
+
+from core.inference import diffusion_families as DF
+from core.inference import video_families as VF
+
+FIXTURE = Path(__file__).resolve().parent / "fixtures" / "vae_tile_configs.json"
+
+
+def _families() -> dict:
+ return json.loads(FIXTURE.read_text(encoding = "utf-8"))["families"]
+
+
+def test_every_registry_family_has_a_pinned_vae_config():
+ fixture = _families()
+ missing = [f.name for f in (*DF._FAMILIES, *VF._FAMILIES) if f.name not in fixture]
+ assert not missing, (
+ f"families without a VAE config in {FIXTURE.name}: {missing}. Add each one's vae/config.json "
+ "(base repo, pinned revision) so the seam guard checks the tile geometry Studio decodes it with."
+ )
+
+
[email protected]("name", sorted(_families()))
+def test_each_entry_is_pinned_and_complete(name):
+ entry = _families()[name]
+ assert entry.get("kind") in ("image", "video"), f"{name}: kind {entry.get('kind')!r}"
+ assert entry.get("repo"), f"{name}: no base repo"
+ assert re.fullmatch(
+ r"[0-9a-f]{40}", entry.get("revision", "")
+ ), f"{name}: revision is not a commit sha"
+ assert isinstance(entry.get("config"), dict) and entry["config"].get(
+ "_class_name"
+ ), f"{name}: config is not a diffusers vae/config.json"