mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-22 16:17:57 +01:00
9 lines
328 B
Python
9 lines
328 B
Python
|
from nataili_blip.model_manager import BlipModelManager
|
||
|
from nataili_blip.caption import Caption
|
||
|
|
||
|
def load_model():
|
||
|
model_name = "BLIP"
|
||
|
mm = BlipModelManager()
|
||
|
mm.download_model(model_name)
|
||
|
mm.load_blip(model_name)
|
||
|
return Caption(mm.loaded_models[model_name]["model"], mm.loaded_models[model_name]["device"])
|