Merge branch 'dev' into dev

This commit is contained in:
Alejandro Gil 2022-09-30 13:17:08 -07:00 committed by GitHub
commit ebbd65a52c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -69,10 +69,14 @@ def load_blip_model():
with server_state_lock['blip_model']:
if "blip_model" not in server_state:
blip_model = blip_decoder(pretrained="models/blip/model__base_caption.pth",
server_state["blip_model"] = blip_decoder(pretrained="models/blip/model__base_caption.pth",
image_size=blip_image_eval_size, vit='base', med_config="configs/blip/med_config.json")
blip_model.eval()
blip_model = blip_model.to(device).half()
if not st.session_state["defaults"].general.optimized:
blip_model = blip_model.to(device).half()
else:
blip_model = blip_model.to("cpu")
print ("BLIP Model Loaded")
st.session_state["log_message"].code("BLIP Model Loaded", language='')