From 98ea64943f97f1c209ae3657f8ed5b990d8a4ffb Mon Sep 17 00:00:00 2001 From: CalamitousFelicitousness Date: Thu, 21 May 2026 03:11:05 +0100 Subject: [PATCH] fix(modelloader): convert ModelCardData to dict before saving model_info.json --- modules/modelloader.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/modelloader.py b/modules/modelloader.py index 8146620c5..a50d4818f 100644 --- a/modules/modelloader.py +++ b/modules/modelloader.py @@ -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