From c426847cb691b51e3f16c19d3ec00b9ab6e6beaf Mon Sep 17 00:00:00 2001 From: SolitaryThinker Date: Thu, 9 Jul 2026 13:17:18 -0700 Subject: [PATCH] =?UTF-8?q?[bugfix]:=20FastWan-QAD=20weights=20moved=20to?= =?UTF-8?q?=20transformer/=20on=20HF=20=E2=80=94=20try=20both=20paths?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The pinned generator_inference_transformer/ path now 404s; the repo ships transformer/diffusion_pytorch_model.safetensors. Found during the GB200 FLASHINFER_SAGE_ATTN3 shape-collection run. --- .../inference/optimizations/FastWan_QAD_TAEHV.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/examples/inference/optimizations/FastWan_QAD_TAEHV.py b/examples/inference/optimizations/FastWan_QAD_TAEHV.py index aa4b6840d..83bca7180 100644 --- a/examples/inference/optimizations/FastWan_QAD_TAEHV.py +++ b/examples/inference/optimizations/FastWan_QAD_TAEHV.py @@ -46,8 +46,11 @@ OUTPUT_PATH = "video_samples" # guidance 1.0). Loaded on top of the base Wan2.1 pipeline; pass # ``--distilled_model ''`` to run the base weights instead. DEFAULT_DISTILLED_MODEL = "FastVideo/FastWan-QAD-1.3B" -DISTILLED_WEIGHTS_FILE = ( - "generator_inference_transformer/diffusion_pytorch_model.safetensors" +# The HF repo moved the transformer weights; try current layout first, +# then the legacy path (pre-2026-07 uploads). +DISTILLED_WEIGHTS_FILES = ( + "transformer/diffusion_pytorch_model.safetensors", + "generator_inference_transformer/diffusion_pytorch_model.safetensors", ) # TAEHV checkpoint for Wan2.1. Clone https://github.com/madebyollin/taehv to get @@ -101,7 +104,14 @@ def resolve_distilled_weights(hf_id: str) -> str: if os.path.exists(hf_id): return hf_id from huggingface_hub import hf_hub_download - return hf_hub_download(repo_id=hf_id, filename=DISTILLED_WEIGHTS_FILE) + from huggingface_hub.errors import EntryNotFoundError + for filename in DISTILLED_WEIGHTS_FILES: + try: + return hf_hub_download(repo_id=hf_id, filename=filename) + except EntryNotFoundError: + continue + raise FileNotFoundError( + f"None of {DISTILLED_WEIGHTS_FILES} found in {hf_id!r}") @contextlib.contextmanager