Browse Source

When blip_offload enabled keep BLIP model on CPU to start.

pull/46/merge
pharmapsychotic 2 years ago
parent
commit
bf7404d7fa
  1. 3
      clip_interrogator/clip_interrogator.py

3
clip_interrogator/clip_interrogator.py

@ -89,7 +89,8 @@ class Interrogator():
med_config=med_config
)
blip_model.eval()
blip_model = blip_model.to(config.device)
if not self.config.blip_offload:
blip_model = blip_model.to(config.device)
self.blip_model = blip_model
else:
self.blip_model = config.blip_model

Loading…
Cancel
Save