Browse Source

Move definition of clip_model_name (#52)

pull/63/head
starovoitovs 2 years ago committed by GitHub
parent
commit
a0f278c4a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      clip_interrogator/clip_interrogator.py

3
clip_interrogator/clip_interrogator.py

@ -93,11 +93,12 @@ class Interrogator():
start_time = time.time() start_time = time.time()
config = self.config config = self.config
clip_model_name, clip_model_pretrained_name = config.clip_model_name.split('/', 2)
if config.clip_model is None: if config.clip_model is None:
if not config.quiet: if not config.quiet:
print("Loading CLIP model...") 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( self.clip_model, _, self.clip_preprocess = open_clip.create_model_and_transforms(
clip_model_name, clip_model_name,
pretrained=clip_model_pretrained_name, pretrained=clip_model_pretrained_name,

Loading…
Cancel
Save