diff --git a/ldm/invoke/txt2mask.py b/ldm/invoke/txt2mask.py index f9a731d1f6..01d93546e3 100644 --- a/ldm/invoke/txt2mask.py +++ b/ldm/invoke/txt2mask.py @@ -29,7 +29,7 @@ work fine. import torch import numpy as np -from clipseg import CLIPDensePredT +from models.clipseg import CLIPDensePredT from einops import rearrange, repeat from PIL import Image from torchvision import transforms diff --git a/scripts/preload_models.py b/scripts/preload_models.py index 2da39c5680..97b79e1845 100644 --- a/scripts/preload_models.py +++ b/scripts/preload_models.py @@ -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 clipseg import CLIPDensePredT + from models.clipseg import CLIPDensePredT model = CLIPDensePredT(version='ViT-B/16', reduce_dim=64, ) model.eval() model.load_state_dict(