From a0f278c4a9fb23a0d6ff0e486e82de1ec33775aa Mon Sep 17 00:00:00 2001 From: starovoitovs Date: Wed, 22 Feb 2023 03:55:19 +0100 Subject: [PATCH] Move definition of clip_model_name (#52) --- clip_interrogator/clip_interrogator.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/clip_interrogator/clip_interrogator.py b/clip_interrogator/clip_interrogator.py index cb7b0a0..284ef94 100644 --- a/clip_interrogator/clip_interrogator.py +++ b/clip_interrogator/clip_interrogator.py @@ -93,11 +93,12 @@ class Interrogator(): start_time = time.time() config = self.config + clip_model_name, clip_model_pretrained_name = config.clip_model_name.split('/', 2) + if config.clip_model is None: if not config.quiet: print("Loading CLIP model...") - clip_model_name, clip_model_pretrained_name = config.clip_model_name.split('/', 2) self.clip_model, _, self.clip_preprocess = open_clip.create_model_and_transforms( clip_model_name, pretrained=clip_model_pretrained_name,