From 107e9f78a7a951d4e809597dcb6cffcff3f51908 Mon Sep 17 00:00:00 2001 From: vladmandic Date: Fri, 27 Mar 2026 07:55:12 +0100 Subject: [PATCH] safe loader Signed-off-by: vladmandic --- modules/loader.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/modules/loader.py b/modules/loader.py index e38fe3e4d..1fefe5e55 100644 --- a/modules/loader.py +++ b/modules/loader.py @@ -229,11 +229,12 @@ class _tqdm_old(tqdm_lib.tqdm): kwargs['ncols'] = 80 super().__init__(*args, **kwargs) - -transformers.utils.logging.tqdm = _tqdm_cls() -diffusers.pipelines.pipeline_utils.logging.tqdm = _tqdm_cls() -huggingface_hub._snapshot_download.hf_tqdm = _tqdm_old # pylint: disable=protected-access - +try: + transformers.utils.logging.tqdm = _tqdm_cls() + diffusers.pipelines.pipeline_utils.logging.tqdm = _tqdm_cls() + huggingface_hub._snapshot_download.hf_tqdm = _tqdm_old # pylint: disable=protected-access +except Exception as e: + pass def get_packages(): return {