mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 17:24:32 +02:00
fix(modelloader): convert ModelCardData to dict before saving model_info.json
This commit is contained in:
@@ -99,7 +99,8 @@ def download_diffusers_model(hub_id: str, cache_dir: str | None = None, download
|
||||
shared.state.end(jobid)
|
||||
return None
|
||||
try:
|
||||
model_info_dict = hf.model_info(hub_id).cardData if pipeline_dir is not None else None
|
||||
card = hf.model_info(hub_id).cardData
|
||||
model_info_dict = card.to_dict() if hasattr(card, 'to_dict') else card
|
||||
except Exception:
|
||||
model_info_dict = None
|
||||
if model_info_dict is not None and "prior" in model_info_dict: # some checkpoints need to be downloaded as "hidden" as they just serve as pre- or post-pipelines of other pipelines
|
||||
|
||||
Reference in New Issue
Block a user