mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Merge branch 'development' into asymmetric-tiling
This commit is contained in:
commit
15aa7593f6
@ -29,7 +29,7 @@ work fine.
|
|||||||
|
|
||||||
import torch
|
import torch
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from models.clipseg import CLIPDensePredT
|
from clipseg import CLIPDensePredT
|
||||||
from einops import rearrange, repeat
|
from einops import rearrange, repeat
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
from torchvision import transforms
|
from torchvision import transforms
|
||||||
|
@ -117,7 +117,7 @@ try:
|
|||||||
with zipfile.ZipFile(model_dest,'r') as zip:
|
with zipfile.ZipFile(model_dest,'r') as zip:
|
||||||
zip.extractall('src/clipseg')
|
zip.extractall('src/clipseg')
|
||||||
os.rename('src/clipseg/clipseg_weights','src/clipseg/weights')
|
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 = CLIPDensePredT(version='ViT-B/16', reduce_dim=64, )
|
||||||
model.eval()
|
model.eval()
|
||||||
model.load_state_dict(
|
model.load_state_dict(
|
||||||
@ -126,6 +126,7 @@ try:
|
|||||||
map_location=torch.device('cpu'),
|
map_location=torch.device('cpu'),
|
||||||
strict=False,
|
strict=False,
|
||||||
)
|
)
|
||||||
|
)
|
||||||
except Exception:
|
except Exception:
|
||||||
print('Error installing clipseg model:')
|
print('Error installing clipseg model:')
|
||||||
print(traceback.format_exc())
|
print(traceback.format_exc())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user