From 036a1cc8874436ea7ec22729b06a8aca30077f41 Mon Sep 17 00:00:00 2001 From: Kazuyoshi Kato Date: Wed, 29 Jul 2026 11:47:13 -0700 Subject: [PATCH] Pin huggingface_hub==0.25.2 in sd-turbo example The sd-turbo truss fails to deploy: the model server crash-loops with "Exception while loading model" a few seconds into model.load(), and the deployment never becomes healthy. The root cause is an import error. huggingface_hub is not pinned, and the pinned diffusers==0.23.1 imports symbols that were removed from newer huggingface_hub releases (resolved 0.36.x at build time): File "diffusers/utils/dynamic_modules_utils.py", line 28, in from huggingface_hub import HfFolder, cached_download, hf_hub_download, model_info ImportError: cannot import name 'cached_download' from 'huggingface_hub' huggingface_hub 0.25.2 is the last release that still provides cached_download and HfFolder, and it satisfies the constraints of the pinned transformers==4.35.2 (<1.0) and diffusers==0.23.1 (>=0.13.2). Verified on Baseten: with this pin the model loads in ~37s and inference returns a valid image. Co-Authored-By: Claude Fable 5 --- stable-diffusion/sd-turbo/config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/stable-diffusion/sd-turbo/config.yaml b/stable-diffusion/sd-turbo/config.yaml index 5dc69b64..b46f445e 100644 --- a/stable-diffusion/sd-turbo/config.yaml +++ b/stable-diffusion/sd-turbo/config.yaml @@ -22,6 +22,7 @@ requirements: - transformers==4.35.2 - diffusers==0.23.1 - accelerate==0.24.1 +- huggingface_hub==0.25.2 resources: accelerator: T4 use_gpu: true