From 57259ded0a81ce01b7f17b9ec9704fa7ebec6945 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Mon, 6 Jul 2026 15:53:52 +0000 Subject: [PATCH] Match Wan generation-defaults key as a name segment, not a raw substring --- .../backend/core/inference/video_families.py | 7 ++++++- studio/backend/tests/test_video_families.py | 18 ++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/studio/backend/core/inference/video_families.py b/studio/backend/core/inference/video_families.py index 835b968bc3..ca9cc4a914 100644 --- a/studio/backend/core/inference/video_families.py +++ b/studio/backend/core/inference/video_families.py @@ -292,6 +292,11 @@ def default_video_generation_params( for identifier in identifiers: needle = (identifier or "").lower() for key, steps, guidance in _VIDEO_GENERATION_DEFAULTS: - if key in needle: + # Match the key as a name segment, not a raw substring: reject a + # preceding ASCII letter so an opaque path/repo like "user/swan-video" + # or "taiwan-clips" does not false-match "wan" and silently apply Wan's + # 50-step/CFG-5 schedule to a non-Wan model. Trailing chars stay free so + # "wan2.2-ti2v", "ltxv-2.3" and "...-distilled-..." still match. + if re.search(r"(?