Skip to content

Commit c6c0530

Browse files
Fix Huggingface environment variable s|HF_HUB_CACHE_DIR|HF_HUB_CACHE (#1069)
Co-authored-by: Steve McClain <steve@marmalade.co>
1 parent 7fefd0e commit c6c0530

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

06_gpu_and_ml/sam/segment_anything.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262

6363

6464
@app.cls(
65-
image=image.env({"HF_HUB_CACHE_DIR": cache_dir}),
65+
image=image.env({"HF_HUB_CACHE": cache_dir}),
6666
volumes={"/root/videos": video_vol, cache_dir: cache_vol},
6767
gpu="A100",
6868
)

06_gpu_and_ml/stable_diffusion/flux.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
f"git+https://github.com/huggingface/diffusers.git@{diffusers_commit_sha}",
5858
"numpy<2",
5959
)
60-
.env({"HF_HUB_ENABLE_HF_TRANSFER": "1", "HF_HUB_CACHE_DIR": "/cache"})
60+
.env({"HF_HUB_ENABLE_HF_TRANSFER": "1", "HF_HUB_CACHE": "/cache"})
6161
)
6262

6363
# Later, we'll also use `torch.compile` to increase the speed further.

06_gpu_and_ml/stable_diffusion/image_to_image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
.env(
4141
{
4242
"HF_HUB_ENABLE_HF_TRANSFER": "1", # Allows faster model downloads
43-
"HF_HUB_CACHE_DIR": CACHE_DIR, # Points the Hugging Face cache to a Volume
43+
"HF_HUB_CACHE": CACHE_DIR, # Points the Hugging Face cache to a Volume
4444
}
4545
)
4646
)

06_gpu_and_ml/stable_diffusion/text_to_image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
.env(
5959
{
6060
"HF_HUB_ENABLE_HF_TRANSFER": "1", # faster downloads
61-
"HF_HUB_CACHE_DIR": CACHE_DIR,
61+
"HF_HUB_CACHE": CACHE_DIR,
6262
}
6363
)
6464
)

misc/trellis3d.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def clone_repository():
110110

111111

112112
@app.cls(
113-
image=trellis_image.env({"HF_HUB_CACHE_DIR": cache_dir}),
113+
image=trellis_image.env({"HF_HUB_CACHE": cache_dir}),
114114
gpu="L4",
115115
timeout=1 * HOURS,
116116
container_idle_timeout=1 * MINUTES,

0 commit comments

Comments
 (0)