cleanup hf download

Signed-off-by: vladmandic <mandic00@live.com>
This commit is contained in:
vladmandic
2025-10-26 12:02:20 -04:00
parent 0271e0830c
commit eba33bda70
2 changed files with 17 additions and 25 deletions
+6
View File
@@ -4,6 +4,11 @@
### Highlights for 2025-10-26
- Reorganization of **Reference Models** into *Base, Quantized, Distilled and Community* sections for easier navigation
- New **Tencent HunyuanImage 2.1** model capable of generating 2K images natively
- New **offline mode** to use previously downloaded models without internet connection
- Fixes, fixes, fixes... too many to list here!
### Details for 2025-10-26
- **Reference** networks section is now split into actual *Base* models plus:
@@ -23,6 +28,7 @@
- **Backend**
- switch to `torch==2.9` for *ipex, rocm and openvino*
- switch to `rocm==7.0` for nightlies
- log `triton` availability on startup
- **Quantization**
- improved **SDNQ SVD** and low-bit matmul performance
- **Other**
+11 -25
View File
@@ -84,32 +84,18 @@ def download_diffusers_model(hub_id: str, cache_dir: str = None, download_config
if token is not None and len(token) > 2:
hf_login(token)
pipeline_dir = None
ok = False
err = None
"""
if not ok:
try:
pipeline_dir = DiffusionPipeline.download(hub_id, **download_config)
ok = True
except Exception as e:
err = e
ok = False
debug(f'HF download error: id="{hub_id}" {e}')
"""
if not ok and 'Repository Not Found' not in str(err):
try:
download_config.pop('load_connected_pipeline', None)
download_config.pop('variant', None)
pipeline_dir = hf.snapshot_download(hub_id, **download_config)
except Exception as e:
debug(f'HF download error: id="{hub_id}" {e}')
if 'gated' in str(e):
shared.log.error(f'HF download error: id="{hub_id}" model access requires login')
shared.state.end(jobid)
return None
try:
download_config.pop('load_connected_pipeline', None)
download_config.pop('variant', None)
pipeline_dir = hf.snapshot_download(hub_id, **download_config)
except Exception as e:
debug(f'HF download error: id="{hub_id}" {e}')
if 'gated' in str(e):
shared.log.error(f'HF download error: id="{hub_id}" model access requires login')
shared.state.end(jobid)
return None
if pipeline_dir is None:
shared.log.error(f'HF download error: id="{hub_id}" {err}')
shared.log.error(f'HF download error: id="{hub_id}" no data')
shared.state.end(jobid)
return None
try: