mirror of
https://github.com/jamiepine/voicebox.git
synced 2026-10-03 17:15:19 -07:00
Fix infinite HF retry storm when loading a cached model offline
model_load_progress() already received is_cached but never forwarded it to force_offline_if_cached(), which is fully unit-tested but had zero callers. A fully-cached model still resolved every config file against huggingface.co, eating the default 5-retry backoff per file offline.
This commit is contained in:
@@ -14,6 +14,7 @@ from typing import Callable, List, Optional, Tuple
|
||||
import numpy as np
|
||||
|
||||
from ..utils.audio import normalize_audio, load_audio
|
||||
from ..utils.hf_offline_patch import force_offline_if_cached
|
||||
from ..utils.progress import get_progress_manager
|
||||
from ..utils.hf_progress import HFProgressTracker, create_hf_progress_callback
|
||||
from ..utils.tasks import get_task_manager
|
||||
@@ -280,7 +281,8 @@ def model_load_progress(
|
||||
)
|
||||
|
||||
try:
|
||||
yield tracker_context
|
||||
with force_offline_if_cached(is_cached, model_name):
|
||||
yield tracker_context
|
||||
except Exception as e:
|
||||
# Report error to both managers
|
||||
progress_manager.mark_error(model_name, str(e))
|
||||
|
||||
Reference in New Issue
Block a user