mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix syntax errors in preload
This commit is contained in:
parent
a488b14373
commit
66f6ef1b35
@ -117,7 +117,7 @@ try:
|
||||
with zipfile.ZipFile(model_dest,'r') as zip:
|
||||
zip.extractall('src/clipseg')
|
||||
os.rename('src/clipseg/clipseg_weights','src/clipseg/weights')
|
||||
from models.clipseg import CLIPDensePredT
|
||||
from clipseg import CLIPDensePredT
|
||||
model = CLIPDensePredT(version='ViT-B/16', reduce_dim=64, )
|
||||
model.eval()
|
||||
model.load_state_dict(
|
||||
@ -126,6 +126,7 @@ try:
|
||||
map_location=torch.device('cpu'),
|
||||
strict=False,
|
||||
)
|
||||
)
|
||||
except Exception:
|
||||
print('Error installing clipseg model:')
|
||||
print(traceback.format_exc())
|
||||
|
Loading…
Reference in New Issue
Block a user