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.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
studio: offer the undistilled z-image base for lora training (#8291)
Maheswar Kumar26154d580cd8
diff --git a/studio/backend/core/inference/diffusion.py b/studio/backend/core/inference/diffusion.pyindex 983459e0e1c..7ac7d5d5072 100644--- a/studio/backend/core/inference/diffusion.py+++ b/studio/backend/core/inference/diffusion.py@@ -482,6 +482,10 @@ _TRUSTED_NON_GGUF_REPOS = frozenset("black-forest-labs/flux.2-klein-base-4b","black-forest-labs/flux.2-klein-base-9b","tongyi-mai/z-image-turbo",+ # The undistilled Z-Image: the base the upstream DreamBooth recipe trains on, and the+ # base_model tag of unsloth/Z-Image-GGUF. Leaving it out made that tag untrusted, so the+ # GGUF fell back to the Turbo companions and denoised on its shift 3.0 scheduler.+ "tongyi-mai/z-image","qwen/qwen-image","qwen/qwen-image-2512","qwen/qwen-image-edit-2511",diff --git a/studio/backend/core/inference/diffusion_auto_policy.py b/studio/backend/core/inference/diffusion_auto_policy.pyindex ff6b437aa40..c2c190ba52f 100644--- a/studio/backend/core/inference/diffusion_auto_policy.py+++ b/studio/backend/core/inference/diffusion_auto_policy.py@@ -37,7 +37,7 @@ _QUANT_STEADY_FACTOR: dict[str, float] = {}# bf16-RESIDENT component sizes in decimal GB: (transformer, text encoders, VAE). What they occupy on device after the dtype-# cast, NOT the download size (Z-Image ships fp32: 24.6 GB of shards -> 12.3 GB bf16). From HF sibling metadata.+# cast, NOT the download size (Z-Image-Turbo ships fp32: 24.6 GB of shards -> 12.3 GB bf16). From HF sibling metadata._FAMILY_BF16_GB: dict[str, tuple[float, float, float]] = {"flux.1": (23.8, 9.8, 0.2),"flux.1-kontext": (23.8, 9.8, 0.2),@@ -59,7 +59,7 @@ _FAMILY_BF16_GB: dict[str, tuple[float, float, float]] = {# Hub DOWNLOAD bytes relative to the bf16-resident sizes above, for families whose published checkpoints are not stored at# bf16. The free-disk gate needs what lands in the HF cache, which differs by 2x in either direction here. From HF metadata:-# z-image transformer/ 23,479 MiB fp32 -> 11,730 MiB resident (2.00x)+# z-image Turbo transformer/ 23,479 MiB fp32 -> 11,730 MiB resident (2.00x)# lumina-2 transformer/ 9,956 MiB fp32 -> 4,959 MiB resident (2.01x)# ideogram-4 transformer/ + unconditional_transformer/ 17,718 MiB fp8 -> 35,477 MiB resident (0.50x)# Anything absent ships bf16 and downloads what it occupies (measured 0.99-1.07x).@@ -69,14 +69,43 @@ _FAMILY_HUB_DOWNLOAD_FACTOR: dict[str, float] = {"ideogram-4": 0.5,}+# Per-base overrides of the factor above, for a checkpoint stored at a different precision from its+# family default. Only Tongyi-MAI/Z-Image needs one: the family key exists because the distilled+# Turbo publishes fp32 (23,479 MiB), while the undistilled base ships bf16 (11,740 MiB) and so+# downloads exactly what it occupies. Without it the free-disk gate demands twice the real size.+_BASE_REPO_HUB_DOWNLOAD_FACTOR: dict[str, float] = {+ "tongyi-mai/z-image": 1.0,+}+++def _base_key(base_repo: Optional[str]) -> str:+ """The key both per-base tables below are written against: canonical upstream id, lowercased.++ ``canonical_base`` maps a mirror back to its upstream but preserves the caller's casing for+ everything else, and a base repo reaches here however the user typed it: the trust gate and+ every other base-keyed table compare case-insensitively, so these must too or a lowercase+ custom base silently misses its override and gets sized as the family default.+ """+ from .diffusion_families import canonical_base+ return canonical_base(base_repo).strip().lower()+++def hub_download_factor(fam: Any, base_repo: Optional[str] = None) -> float:+ """Download bytes per bf16-resident byte for this pick, defaulting to 1.0."""+ override = _BASE_REPO_HUB_DOWNLOAD_FACTOR.get(_base_key(base_repo)) if base_repo else None+ if override is not None:+ return override+ return _FAMILY_HUB_DOWNLOAD_FACTOR.get(getattr(fam, "name", None), 1.0)++# Base-repo overrides for families offering multiple sizes under one entry (the table carries the family default).# flux.2-klein ships FOUR checkpoints under one entry: 4B / base-4B (the family default, Qwen3-4B encoder) and# 9B / base-9B (18.2 GB transformer, Qwen3-8B encoder). The 9B pair needs an override on BOTH ids: sizing# klein-BASE-9B off the family default understates it by 2.3x, and the base variants are the ones the upstream# guidance points fine-tuning at, so it is the likelier of the two to be loaded._BASE_REPO_BF16_GB: dict[str, tuple[float, float, float]] = {- "black-forest-labs/FLUX.2-klein-9B": (18.2, 16.4, 0.2),- "black-forest-labs/FLUX.2-klein-base-9B": (18.2, 16.4, 0.2),+ "black-forest-labs/flux.2-klein-9b": (18.2, 16.4, 0.2),+ "black-forest-labs/flux.2-klein-base-9b": (18.2, 16.4, 0.2),}@@ -88,10 +117,7 @@ def base_repo_bf16_components_gb(base_repo: Optional[str]) -> Optional[tuple[floactually named in the table, not receive the family figure back."""if not base_repo:return None- # Keyed on UPSTREAM ids, so mirrors have to be normalised before the lookup.- from .diffusion_families import canonical_base-- return _BASE_REPO_BF16_GB.get(canonical_base(base_repo))+ return _BASE_REPO_BF16_GB.get(_base_key(base_repo))def family_bf16_components_gb(@@ -114,8 +140,8 @@ class DenseQuantEstimate:``transient_transformer_mib`` is the build peak (dense bf16 when quantising on the fly, or thequantised size when a prequant checkpoint loads via meta). ``steady_transformer_mib`` is whatstays resident for generation. ``download_transformer_mib`` is what the base-repo transformer- costs on DISK, which is not the same number whenever the family publishes something other than- bf16 (see ``_FAMILY_HUB_DOWNLOAD_FACTOR``)."""+ costs on DISK, which is not the same number whenever the checkpoint publishes something other+ than bf16 (see ``hub_download_factor``)."""scheme: strsteady_transformer_mib: int@@ -155,7 +181,7 @@ def estimate_dense_quant(steady = int(transformer_gb * factor * _MIB_PER_GB)transient = steady if prequant_available else int(transformer_gb * _MIB_PER_GB)companions = int((text_encoders_gb + vae_gb) * _MIB_PER_GB)- hub_factor = _FAMILY_HUB_DOWNLOAD_FACTOR.get(getattr(fam, "name", None), 1.0)+ hub_factor = hub_download_factor(fam, base_repo)return DenseQuantEstimate(scheme = scheme,steady_transformer_mib = steady,diff --git a/studio/backend/core/inference/diffusion_families.py b/studio/backend/core/inference/diffusion_families.pyindex 7ab161112b6..327d671842d 100644--- a/studio/backend/core/inference/diffusion_families.py+++ b/studio/backend/core/inference/diffusion_families.py@@ -65,6 +65,10 @@ class DiffusionFamily:# Hosted checkpoints for NON-DEFAULT bases as (base_repo, scheme, repo_id), base_repo lowercased: one family entry covers# variants whose weights differ. Resolution prefers an exact variant match, then falls back to ``prequant_repos``.prequant_variant_repos: tuple[tuple[str, str, str], ...] = field(default_factory = tuple)+ # Bases (lowercased) with NO hosted checkpoint, which must not inherit ``prequant_repos``: the family+ # fallback names an artifact baked from different weights, and planning acts on it before the load's+ # base_model_id check can refuse it. Only for a base whose weights genuinely differ from the default.+ prequant_excluded_bases: tuple[str, ...] = field(default_factory = tuple)# Preferred checkpoint FILENAME for a scheme, as (scheme, filename), overriding the# ``<Model>-<SCHEME>.pt`` name ``prequant_repo_filename`` derives. The derived name stays on as# the fallback, so a repo hosting BOTH an old and a new artifact serves the new one to a build@@ -250,12 +254,20 @@ _FAMILIES: tuple[DiffusionFamily, ...] = (("int8", "unsloth/Z-Image-Turbo-FP8"),("fp8", "unsloth/Z-Image-Turbo-FP8"),),- # Pre-cast Qwen3-4B TE (8.04 -> 4.41 GB). NOT shared with flux.2-klein-4B: klein TE retrained layer 35 MLP (up/down_proj maxdiff 0.86 vs this checkpoint).+ # Both hosted checkpoints are baked from the distilled Turbo transformer, so the undistilled base has none and must quantize its own dense weights.+ prequant_excluded_bases = ("tongyi-mai/z-image",),+ # Pre-cast Qwen3-4B TE (8.04 -> 4.41 GB), shared with the undistilled base (byte-identical encoder). NOT shared with flux.2-klein-4B: klein TE retrained layer 35 MLP (up/down_proj maxdiff 0.86 vs this checkpoint).te_prequant_repos = (("fp8", "text_encoder", "unsloth/Z-Image-Turbo-FP8"),),aliases = ("zimage", "z_image"),# LoRA training via the DiT trainer (bf16); defaults to the prequant nf4 repo for QLoRA.trainable = True,- train_base_repos = ("unsloth/Z-Image-Turbo-unsloth-bnb-4bit", "Tongyi-MAI/Z-Image-Turbo"),+ # The undistilled base is what the upstream DreamBooth recipe trains on. No deploy pairing:+ # its adapters preview on the base itself at the 20-step / guidance 4 recipe.+ train_base_repos = (+ "unsloth/Z-Image-Turbo-unsloth-bnb-4bit",+ "Tongyi-MAI/Z-Image-Turbo",+ "Tongyi-MAI/Z-Image",+ ),img2img_pipeline_class = "ZImageImg2ImgPipeline",inpaint_pipeline_class = "ZImageInpaintPipeline",# Z-Image's MLP down-projections peak near 9e5, which overflows float16.@@ -780,11 +792,19 @@ def family_prequant_repo(``base_repo`` (when known) selects a variant-specific checkpoint first: a checkpoint isbaked from ONE base's weights and the loader refuses it for any other base, so a variant- without its own entry still returns the family default (harmless: the base_model_id- validation then falls back to dense-quantise, exactly as before this table existed)."""- # prequant_variant_repos is keyed on upstream ids.+ without its own entry still returns the family default. That is harmless only while the+ default is close enough that planning around it costs nothing, since the base_model_id+ validation refuses the artifact well after the plan was made. A base whose weights really+ differ belongs in ``prequant_excluded_bases``, which returns None here instead."""+ # Both tables are keyed on lowercased upstream ids.base = canonical_base(base_repo).lower()if base:+ # getattr, because the video loader calls this with a VideoFamily, which has no such+ # field. A plain attribute read raises AttributeError, resolve_prequant_source swallows it+ # in its bare except and hands back None, and every video family silently loses its hosted+ # prequant checkpoint to the dense path whenever a base_repo is passed.+ if base in (getattr(fam, "prequant_excluded_bases", ()) or ()):+ return Nonefor entry_base, entry_scheme, repo_id in fam.prequant_variant_repos:if entry_base == base and entry_scheme == scheme:return repo_iddiff --git a/studio/backend/core/inference/diffusion_te_prequant.py b/studio/backend/core/inference/diffusion_te_prequant.pyindex 72ca0543447..8e0ec8a86f5 100644--- a/studio/backend/core/inference/diffusion_te_prequant.py+++ b/studio/backend/core/inference/diffusion_te_prequant.py@@ -108,6 +108,13 @@ _TE_EQUIVALENT_BASES: tuple[frozenset[str], ...] = ("hidream-ai/hidream-i1-full",}),+ # Qwen3-4B text encoder: 3 shards, 8,044,982,000 bytes, identical sha256 set across the distilled Z-Image-Turbo and the undistilled base (only their transformers differ).+ frozenset(+ {+ "tongyi-mai/z-image-turbo",+ "tongyi-mai/z-image",+ }+ ),)diff --git a/studio/backend/core/inference/tools.py b/studio/backend/core/inference/tools.pyindex 01b7b747fb3..9632737e062 100644--- a/studio/backend/core/inference/tools.py+++ b/studio/backend/core/inference/tools.py@@ -12088,8 +12088,7 @@ def _volume_timestamps_finely(workdir: str) -> bool:if stat.st_dev in _fine_mtime_devices:return Trueif not any(- stamp % 1_000_000_000- for stamp in (stat.st_mtime_ns, stat.st_ctime_ns, stat.st_atime_ns)+ stamp % 1_000_000_000 for stamp in (stat.st_mtime_ns, stat.st_ctime_ns, stat.st_atime_ns)):return False_fine_mtime_devices.add(stat.st_dev)diff --git a/studio/backend/tests/test_diffusion_auto_policy.py b/studio/backend/tests/test_diffusion_auto_policy.pyindex 2ac4acf9120..e11dc386300 100644--- a/studio/backend/tests/test_diffusion_auto_policy.py+++ b/studio/backend/tests/test_diffusion_auto_policy.py@@ -48,6 +48,26 @@ def test_family_table_unknown_family_returns_none():assert family_bf16_components_gb(_fam("not-a-family")) is None+def test_zimage_base_downloads_bf16_while_turbo_downloads_fp32():+ # The z-image family factor exists because the distilled Turbo publishes fp32 shards. The+ # undistilled base ships bf16 and downloads exactly what it occupies, so charging it the+ # family factor makes the free-disk gate demand twice the real size.+ assert ap.hub_download_factor(_fam("z-image")) == 2.0+ assert ap.hub_download_factor(_fam("z-image"), "Tongyi-MAI/Z-Image-Turbo") == 2.0+ assert ap.hub_download_factor(_fam("z-image"), "Tongyi-MAI/Z-Image") == 1.0+ # A family with no factor at all still defaults to 1.0, base repo or not.+ assert ap.hub_download_factor(_fam("flux.2-klein"), "black-forest-labs/FLUX.2-klein-4B") == 1.0+ # A base repo arrives however the user typed it, so the override cannot be case-sensitive.+ assert ap.hub_download_factor(_fam("z-image"), " tongyi-mai/Z-IMAGE ") == 1.0++ turbo = estimate_dense_quant(_fam("z-image"), "int8", base_repo = "Tongyi-MAI/Z-Image-Turbo")+ base = estimate_dense_quant(_fam("z-image"), "int8", base_repo = "Tongyi-MAI/Z-Image")+ assert turbo is not None and base is not None+ # Same architecture, so the resident footprint is identical and only the download differs.+ assert base.steady_transformer_mib == turbo.steady_transformer_mib+ assert base.download_transformer_mib * 2 == turbo.download_transformer_mib++def test_base_repo_override_wins_over_the_family_default():# flux.2-klein's family default is the 4B base; loading the 9B GGUF passes the 9B base repo, whose transformer is over twice the size.default = family_bf16_components_gb(_fam("flux.2-klein"))@@ -76,6 +96,13 @@ def test_klein_base_9b_is_sized_like_the_9b_not_the_4b():family_bf16_components_gb(_fam("flux.2-klein"), base_repo = "unsloth/FLUX.2-klein-base-9B")== base_9b)+ # Same case-insensitivity the trust gate applies: a typed-in base must not fall back to the 4B.+ assert (+ family_bf16_components_gb(+ _fam("flux.2-klein"), base_repo = " BLACK-FOREST-LABS/flux.2-klein-base-9b "+ )+ == base_9b+ )# ── the estimator ─────────────────────────────────────────────────────────────diff --git a/studio/backend/tests/test_diffusion_dit_trainer.py b/studio/backend/tests/test_diffusion_dit_trainer.pyindex 5e1efe6a6f0..546627f0df0 100644--- a/studio/backend/tests/test_diffusion_dit_trainer.py+++ b/studio/backend/tests/test_diffusion_dit_trainer.py@@ -157,6 +157,30 @@ def test_flux2_bases_pass_the_trusted_base_gate():_assert_trusted_base_model("someone/random-flux2-finetune")+def test_zimage_offers_the_undistilled_base_the_upstream_recipe_trains_on():+ # examples/dreambooth/README_z_image.md trains on Tongyi-MAI/Z-Image, not the distilled Turbo,+ # and the trust gate refused that id until it joined the allowlist. The nf4 Turbo stays first+ # so it remains the picker's default.+ from core.inference.diffusion_families import detect_family+ from core.training.diffusion_train_common import _assert_trusted_base_model++ fam = detect_family("Tongyi-MAI/Z-Image")+ assert fam is not None and fam.name == "z-image"+ assert fam.train_base_repos == (+ "unsloth/Z-Image-Turbo-unsloth-bnb-4bit",+ "Tongyi-MAI/Z-Image-Turbo",+ "Tongyi-MAI/Z-Image",+ )+ _assert_trusted_base_model("Tongyi-MAI/Z-Image")+ with pytest.raises(ValueError, match = "untrusted"):+ _assert_trusted_base_model("someone/random-z-image-finetune")+ # The upstream script's target list; the family spec must already match it.+ assert _SPECS["z-image"].lora_targets == ("to_q", "to_k", "to_v", "to_out.0")+ # No deploy pairing: an adapter previews on whichever checkpoint it trained on. A family-wide+ # one would also rewrite the nf4 Turbo base, sending a QLoRA run's preview to a dense fp32 load.+ assert fam.deploy_base_repo is None++def test_every_train_base_is_deployable_as_an_inference_pipeline():# "Deploy to Create" reloads the trained-on base (or the family's deploy_base) through /images/load as a PIPELINE, gated on# _is_trusted_diffusion_repo, so an advertised training base failing that gate makes Deploy 400 for every adapter.diff --git a/studio/backend/tests/test_diffusion_more_families.py b/studio/backend/tests/test_diffusion_more_families.pyindex d7349606958..29e06b25a0e 100644--- a/studio/backend/tests/test_diffusion_more_families.py+++ b/studio/backend/tests/test_diffusion_more_families.py@@ -84,6 +84,67 @@ def test_flux1_krea_dev_generation_defaults():assert default_generation_params("krea/Krea-2-Raw") == (52, 3.5)+# ── z-image: the undistilled base ────────────────────────────────────────────+def test_zimage_base_is_trusted_so_the_gguf_keeps_its_companion_base():+ # unsloth/Z-Image-GGUF carries base_model: Tongyi-MAI/Z-Image, and _resolve_base_repo drops a+ # tag that fails this gate. While it did, that pick fell back to the Turbo companions and+ # denoised on their shift 3.0 scheduler instead of the base's 6.0.+ assert _is_trusted_diffusion_repo("Tongyi-MAI/Z-Image")+ assert _is_trusted_diffusion_repo("Tongyi-MAI/Z-Image-Turbo")+ assert not _is_trusted_diffusion_repo("someone/Z-Image-finetune")+++def test_zimage_base_has_no_hosted_prequant_to_inherit():+ # Both hosted checkpoints are baked from the Turbo transformer. Falling back to them for the+ # undistilled base made planning treat an unrelated artifact as usable: auto declined the dense+ # path when it was uncached, and an explicit int8/fp8 request downloaded it, hit the+ # base_model_id refusal, then had no dense shards staged to fall back to.+ from core.inference.diffusion_families import family_prequant_repo++ fam = detect_family("Tongyi-MAI/Z-Image-Turbo")+ assert fam is not None and fam.name == "z-image"+ for scheme in ("int8", "fp8"):+ assert family_prequant_repo(fam, scheme) == "unsloth/Z-Image-Turbo-FP8"+ assert (+ family_prequant_repo(fam, scheme, base_repo = "Tongyi-MAI/Z-Image-Turbo")+ == "unsloth/Z-Image-Turbo-FP8"+ )+ assert family_prequant_repo(fam, scheme, base_repo = "Tongyi-MAI/Z-Image") is None+ # However the id was typed, and through the mirror the loader actually fetches.+ assert family_prequant_repo(fam, scheme, base_repo = " tongyi-mai/Z-IMAGE ") is None+++def test_prequant_exclusion_does_not_break_a_family_type_that_lacks_the_field():+ # family_prequant_repo is shared with the VIDEO loader, whose VideoFamily has no+ # prequant_excluded_bases. A plain attribute read raises AttributeError here, and the only+ # caller wraps this in a bare except that turns any raise into "no hosted checkpoint", so+ # every video family would quietly drop to the dense path whenever a base_repo is passed.+ from core.inference.diffusion_families import family_prequant_repo+ from core.inference.diffusion_prequant import resolve_prequant_source+ from core.inference.video_families import detect_video_family++ h3 = detect_video_family("MiniMaxAI/MiniMax-H3")+ assert h3 is not None+ assert not hasattr(h3, "prequant_excluded_bases")+ for scheme in ("int8", "fp8"):+ # The base_repo argument is the trigger: an empty base short-circuits before the read.+ assert (+ family_prequant_repo(h3, scheme, base_repo = "MiniMaxAI/MiniMax-H3")+ == "unsloth/MiniMax-H3-FP8"+ )+ source = resolve_prequant_source(h3, scheme, base_repo = "MiniMaxAI/MiniMax-H3")+ assert source is not None and source.location == "unsloth/MiniMax-H3-FP8"+++def test_zimage_base_generation_defaults_are_not_the_distilled_recipe():+ # The base is undistilled: 20 steps at guidance 4. The more specific "z-image-turbo" key sits+ # ahead of "z-image", so the 9-step CFG-free Turbo recipe must not swallow it.+ assert default_generation_params("Tongyi-MAI/Z-Image") == (20, 4.0)+ assert default_generation_params("unsloth/Z-Image-GGUF") == (20, 4.0)+ assert default_generation_params("Tongyi-MAI/Z-Image-Turbo") == (9, 0.0)+ assert default_generation_params("unsloth/Z-Image-Turbo-GGUF") == (9, 0.0)++# ── lumina-2 family ──────────────────────────────────────────────────────────@pytest.mark.parametrize("repo_id",diff --git a/studio/backend/tests/test_diffusion_te_prequant.py b/studio/backend/tests/test_diffusion_te_prequant.pyindex 50d6242a01c..2fabd4e10d7 100644--- a/studio/backend/tests/test_diffusion_te_prequant.py+++ b/studio/backend/tests/test_diffusion_te_prequant.py@@ -282,9 +282,14 @@ def test_te_base_equivalent_groups():assert te_base_equivalent("black-forest-labs/FLUX.1-Krea-dev", "black-forest-labs/FLUX.1-schnell")+ # Z-Image ships one Qwen3-4B encoder for the distilled Turbo and the undistilled base, so the+ # Turbo-baked artifact serves both and training on the base does not re-pull it dense.+ assert te_base_equivalent("Tongyi-MAI/Z-Image-Turbo", "Tongyi-MAI/Z-Image")+ assert te_base_equivalent("Tongyi-MAI/Z-Image", "Tongyi-MAI/Z-Image-Turbo")# Unrelated bases stay refused, including across groups.assert not te_base_equivalent("Qwen/Qwen-Image", "black-forest-labs/FLUX.1-schnell")assert not te_base_equivalent("Tongyi-MAI/Z-Image-Turbo", "black-forest-labs/FLUX.2-klein-4B")+ assert not te_base_equivalent("Tongyi-MAI/Z-Image", "Qwen/Qwen-Image")def test_validate_accepts_equivalent_base():diff --git a/studio/backend/tests/test_sandbox_files_and_storage_roots.py b/studio/backend/tests/test_sandbox_files_and_storage_roots.pyindex e0a0d6ad5be..94579e5a81b 100644--- a/studio/backend/tests/test_sandbox_files_and_storage_roots.py+++ b/studio/backend/tests/test_sandbox_files_and_storage_roots.py@@ -5790,7 +5790,8 @@ def test_a_finely_timestamped_volume_is_not_read_twice_per_call(tmp_path, monkeyread = []real_key = tools._content_keymonkeypatch.setattr(- tools, "_content_key",+ tools,+ "_content_key",lambda path, size: (read.append(path), real_key(path, size))[1],)snapshot = tools._snapshot_workdir_files(str(workdir))@@ -5813,9 +5814,11 @@ def test_one_whole_second_stamp_is_not_taken_for_a_coarse_volume(tmp_path, monketools._fine_mtime_devices.clear()real_stat = os.statmonkeypatch.setattr(- os, "stat",+ os,+ "stat",lambda p, *a, **k: (- _WholeSecondMtime(real_stat(p, *a, **k)) if str(p) == str(workdir)+ _WholeSecondMtime(real_stat(p, *a, **k))+ if str(p) == str(workdir)else real_stat(p, *a, **k)),)diff --git a/studio/frontend/src/features/images/train/diffusion-train-panel.tsx b/studio/frontend/src/features/images/train/diffusion-train-panel.tsxindex d6d4534008b..7caa9d494a7 100644--- a/studio/frontend/src/features/images/train/diffusion-train-panel.tsx+++ b/studio/frontend/src/features/images/train/diffusion-train-panel.tsx@@ -139,8 +139,12 @@ const FAMILY_PRESETS: FamilyPreset[] = [},{name: "z-image",- label: "Z-Image-Turbo (6B)",- base_repos: ["unsloth/Z-Image-Turbo-unsloth-bnb-4bit", "Tongyi-MAI/Z-Image-Turbo"],+ label: "Z-Image (6B)",+ base_repos: [+ "unsloth/Z-Image-Turbo-unsloth-bnb-4bit",+ "Tongyi-MAI/Z-Image-Turbo",+ "Tongyi-MAI/Z-Image",+ ],defaults: { rank: 16, lr: 0.0001, resolution: 768 },vram_note: "The smallest and fastest. A good first pick.",params: "6B",