ModuleNotFoundError: No module named 'models'

#6
by makisekurisu-jp - opened

(bgreplace) D:\AITech\background-replacement>pip list
Package Version


absl-py 2.0.0
accelerate 0.23.0
addict 2.4.0
aiofiles 23.2.1
altair 5.1.2
annotated-types 0.5.0
anyio 3.7.1
attrs 23.1.0
basicsr 1.4.2
cachetools 5.3.1
certifi 2023.7.22
charset-normalizer 3.3.0
click 8.1.7
colorama 0.4.6
contourpy 1.1.1
cycler 0.12.0
diffusers 0.21.4
exceptiongroup 1.1.3
facexlib 0.3.0
fastapi 0.103.2
ffmpy 0.3.1
filelock 3.12.4
filterpy 1.4.5
fonttools 4.43.0
fsspec 2023.9.2
future 0.18.3
gfpgan 1.3.8
google-auth 2.23.2
google-auth-oauthlib 1.1.0
gradio 3.46.1
gradio_client 0.5.3
grpcio 1.59.0
h11 0.14.0
httpcore 0.18.0
httpx 0.25.0
huggingface-hub 0.16.4
idna 3.4
imageio 2.31.5
importlib-metadata 6.8.0
importlib-resources 6.1.0
Jinja2 3.1.2
jsonschema 4.19.1
jsonschema-specifications 2023.7.1
kiwisolver 1.4.5
lazy_loader 0.3
llvmlite 0.41.0
lmdb 1.4.1
Markdown 3.4.4
MarkupSafe 2.1.3
matplotlib 3.8.0
mpmath 1.3.0
networkx 3.1
numba 0.58.0
numpy 1.25.2
oauthlib 3.2.2
opencv-python 4.8.1.78
orjson 3.9.7
packaging 23.2
pandas 2.1.1
Pillow 10.0.1
pip 23.2.1
platformdirs 3.11.0
protobuf 4.23.4
psutil 5.9.5
pyasn1 0.5.0
pyasn1-modules 0.3.0
pydantic 2.4.2
pydantic_core 2.10.1
pydub 0.25.1
pyparsing 3.1.1
python-dateutil 2.8.2
python-multipart 0.0.6
pytz 2023.3.post1
PyYAML 6.0.1
realesrgan 0.3.0
referencing 0.30.2
regex 2023.10.3
requests 2.31.0
requests-oauthlib 1.3.1
rpds-py 0.10.3
rsa 4.9
safetensors 0.3.3
scikit-image 0.22.0
scipy 1.11.3
semantic-version 2.10.0
setuptools 68.0.0
six 1.16.0
sniffio 1.3.0
starlette 0.27.0
sympy 1.12
tb-nightly 2.15.0a20231004
tensorboard-data-server 0.7.1
tifffile 2023.9.26
timm 0.9.7
tokenizers 0.14.0
tomli 2.0.1
toolz 0.12.0
torch 2.0.1+cu118
torchaudio 2.0.2+cu118
torchvision 0.15.2+cu118
tqdm 4.66.1
transformers 4.34.0
typing_extensions 4.8.0
tzdata 2023.3
urllib3 2.0.6
uvicorn 0.23.2
websockets 11.0.3
Werkzeug 3.0.0
wheel 0.41.2
xformers 0.0.22
yapf 0.40.2
zipp 3.17.0

(bgreplace) D:\AITech\background-replacement>pip install -r requirements.txt
Requirement already satisfied: gradio in d:\miniconda3\envs\bgreplace\lib\site-packages (from -r requirements.txt (line 1)) (3.46.1)
Requirement already satisfied: opencv-python in d:\miniconda3\envs\bgreplace\lib\site-packages (from -r requirements.txt (line 2)) (4.8.1.78)
Requirement already satisfied: diffusers[torch] in d:\miniconda3\envs\bgreplace\lib\site-packages (from -r requirements.txt (line 3)) (0.21.4)
Requirement already satisfied: transformers in d:\miniconda3\envs\bgreplace\lib\site-packages (from -r requirements.txt (line 4)) (4.34.0)
Requirement already satisfied: xformers in d:\miniconda3\envs\bgreplace\lib\site-packages (from -r requirements.txt (line 5)) (0.0.22)
Requirement already satisfied: accelerate in d:\miniconda3\envs\bgreplace\lib\site-packages (from -r requirements.txt (line 6)) (0.23.0)
Requirement already satisfied: safetensors in d:\miniconda3\envs\bgreplace\lib\site-packages (from -r requirements.txt (line 7)) (0.3.3)
Requirement already satisfied: timm in d:\miniconda3\envs\bgreplace\lib\site-packages (from -r requirements.txt (line 8)) (0.9.7)
Requirement already satisfied: scikit-image in d:\miniconda3\envs\bgreplace\lib\site-packages (from -r requirements.txt (line 9)) (0.22.0)
Requirement already satisfied: realesrgan in d:\miniconda3\envs\bgreplace\lib\site-packages (from -r requirements.txt (line 10)) (0.3.0)
Requirement already satisfied: basicsr>=1.4.2 in d:\miniconda3\envs\bgreplace\lib\site-packages (from -r requirements.txt (line 11)) (1.4.2)
Requirement already satisfied: scipy in d:\miniconda3\envs\bgreplace\lib\site-packages (from -r requirements.txt (line 12)) (1.11.3)
Requirement already satisfied: aiofiles<24.0,>=22.0 in d:\miniconda3\envs\bgreplace\lib\site-packages (from gradio->-r requirements.txt (line 1)) (23.2.1)
Requirement already satisfied: altair<6.0,>=4.2.0 in d:\miniconda3\envs\bgreplace\lib\site-packages (from gradio->-r requirements.txt (line 1)) (5.1.2)
Requirement already satisfied: fastapi in d:\miniconda3\envs\bgreplace\lib\site-packages (from gradio->-r requirements.txt (line 1)) (0.103.2)
Requirement already satisfied: ffmpy in d:\miniconda3\envs\bgreplace\lib\site-packages (from gradio->-r requirements.txt (line 1)) (0.3.1)
Requirement already satisfied: gradio-client==0.5.3 in d:\miniconda3\envs\bgreplace\lib\site-packages (from gradio->-r requirements.txt (line 1)) (0.5.3)
Requirement already satisfied: httpx in d:\miniconda3\envs\bgreplace\lib\site-packages (from gradio->-r requirements.txt (line 1)) (0.25.0)
Requirement already satisfied: huggingface-hub>=0.14.0 in d:\miniconda3\envs\bgreplace\lib\site-packages (from gradio->-r requirements.txt (line 1)) (0.16.4)
Requirement already satisfied: importlib-resources<7.0,>=1.3 in d:\miniconda3\envs\bgreplace\lib\site-packages (from gradio->-r requirements.txt (line 1)) (6.1.0)
Requirement already satisfied: jinja2<4.0 in d:\miniconda3\envs\bgreplace\lib\site-packages (from gradio->-r requirements.txt (line 1)) (3.1.2)
Requirement already satisfied: markupsafe=2.0 in d:\miniconda3\envs\bgreplace\lib\site-packages (from gradio->-r requirements.txt (line 1)) (2.1.3)
Requirement already satisfied: matplotlib
=3.0 in d:\miniconda3\envs\bgreplace\lib\site-packages (from gradio->-r requirements.txt (line 1)) (3.8.0)
Requirement already satisfied: numpy=1.0 in d:\miniconda3\envs\bgreplace\lib\site-packages (from gradio->-r requirements.txt (line 1)) (1.25.2)
Requirement already satisfied: orjson
=3.0 in d:\miniconda3\envs\bgreplace\lib\site-packages (from gradio->-r requirements.txt (line 1)) (3.9.7)
Requirement already satisfied: packaging in d:\miniconda3\envs\bgreplace\lib\site-packages (from gradio->-r requirements.txt (line 1)) (23.2)
Requirement already satisfied: pandas<3.0,>=1.0 in d:\miniconda3\envs\bgreplace\lib\site-packages (from gradio->-r requirements.txt (line 1)) (2.1.1)
Requirement already satisfied: pillow<11.0,>=8.0 in d:\miniconda3\envs\bgreplace\lib\site-packages (from gradio->-r requirements.txt (line 1)) (10.0.1)
Requirement already satisfied: pydantic!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,<3.0.0,>=1.7.4 in d:\miniconda3\envs\bgreplace\lib\site-packages (from gradio->-r requirements.txt (line 1)) (2.4.2)
Requirement already satisfied: pydub in d:\miniconda3\envs\bgreplace\lib\site-packages (from gradio->-r requirements.txt (line 1)) (0.25.1)
Requirement already satisfied: python-multipart in d:\miniconda3\envs\bgreplace\lib\site-packages (from gradio->-r requirements.txt (line 1)) (0.0.6)
Requirement already satisfied: pyyaml<7.0,>=5.0 in d:\miniconda3\envs\bgreplace\lib\site-packages (from gradio->-r requirements.txt (line 1)) (6.0.1)
Requirement already satisfied: requests=2.0 in d:\miniconda3\envs\bgreplace\lib\site-packages (from gradio->-r requirements.txt (line 1)) (2.31.0)
Requirement already satisfied: semantic-version
=2.0 in d:\miniconda3\envs\bgreplace\lib\site-packages (from gradio->-r requirements.txt (line 1)) (2.10.0)
Requirement already satisfied: typing-extensions=4.0 in d:\miniconda3\envs\bgreplace\lib\site-packages (from gradio->-r requirements.txt (line 1)) (4.8.0)
Requirement already satisfied: uvicorn>=0.14.0 in d:\miniconda3\envs\bgreplace\lib\site-packages (from gradio->-r requirements.txt (line 1)) (0.23.2)
Requirement already satisfied: websockets<12.0,>=10.0 in d:\miniconda3\envs\bgreplace\lib\site-packages (from gradio->-r requirements.txt (line 1)) (11.0.3)
Requirement already satisfied: fsspec in d:\miniconda3\envs\bgreplace\lib\site-packages (from gradio-client==0.5.3->gradio->-r requirements.txt (line 1)) (2023.9.2)
Requirement already satisfied: filelock in d:\miniconda3\envs\bgreplace\lib\site-packages (from diffusers[torch]->-r requirements.txt (line 3)) (3.12.4)
Requirement already satisfied: importlib-metadata in d:\miniconda3\envs\bgreplace\lib\site-packages (from diffusers[torch]->-r requirements.txt (line 3)) (6.8.0)
Requirement already satisfied: regex!=2019.12.17 in d:\miniconda3\envs\bgreplace\lib\site-packages (from diffusers[torch]->-r requirements.txt (line 3)) (2023.10.3)
Requirement already satisfied: torch>=1.4 in d:\miniconda3\envs\bgreplace\lib\site-packages (from diffusers[torch]->-r requirements.txt (line 3)) (2.0.1+cu118)
Requirement already satisfied: tokenizers<0.15,>=0.14 in d:\miniconda3\envs\bgreplace\lib\site-packages (from transformers->-r requirements.txt (line 4)) (0.14.0)
Requirement already satisfied: tqdm>=4.27 in d:\miniconda3\envs\bgreplace\lib\site-packages (from transformers->-r requirements.txt (line 4)) (4.66.1)
Requirement already satisfied: sympy in d:\miniconda3\envs\bgreplace\lib\site-packages (from torch>=1.4->diffusers[torch]->-r requirements.txt (line 3)) (1.12)
Requirement already satisfied: networkx in d:\miniconda3\envs\bgreplace\lib\site-packages (from torch>=1.4->diffusers[torch]->-r requirements.txt (line 3)) (3.1)
Requirement already satisfied: psutil in d:\miniconda3\envs\bgreplace\lib\site-packages (from accelerate->-r requirements.txt (line 6)) (5.9.5)
Requirement already satisfied: torchvision in d:\miniconda3\envs\bgreplace\lib\site-packages (from timm->-r requirements.txt (line 8)) (0.15.2+cu118)
Requirement already satisfied: imageio>=2.27 in d:\miniconda3\envs\bgreplace\lib\site-packages (from scikit-image->-r requirements.txt (line 9)) (2.31.5)
Requirement already satisfied: tifffile>=2022.8.12 in d:\miniconda3\envs\bgreplace\lib\site-packages (from scikit-image->-r requirements.txt (line 9)) (2023.9.26)
Requirement already satisfied: lazy_loader>=0.3 in d:\miniconda3\envs\bgreplace\lib\site-packages (from scikit-image->-r requirements.txt (line 9)) (0.3)
Requirement already satisfied: facexlib>=0.2.5 in d:\miniconda3\envs\bgreplace\lib\site-packages (from realesrgan->-r requirements.txt (line 10)) (0.3.0)
Requirement already satisfied: gfpgan>=1.3.5 in d:\miniconda3\envs\bgreplace\lib\site-packages (from realesrgan->-r requirements.txt (line 10)) (1.3.8)
Requirement already satisfied: addict in d:\miniconda3\envs\bgreplace\lib\site-packages (from basicsr>=1.4.2->-r requirements.txt (line 11)) (2.4.0)
Requirement already satisfied: future in d:\miniconda3\envs\bgreplace\lib\site-packages (from basicsr>=1.4.2->-r requirements.txt (line 11)) (0.18.3)
Requirement already satisfied: lmdb in d:\miniconda3\envs\bgreplace\lib\site-packages (from basicsr>=1.4.2->-r requirements.txt (line 11)) (1.4.1)
Requirement already satisfied: tb-nightly in d:\miniconda3\envs\bgreplace\lib\site-packages (from basicsr>=1.4.2->-r requirements.txt (line 11)) (2.15.0a20231004)
Requirement already satisfied: yapf in d:\miniconda3\envs\bgreplace\lib\site-packages (from basicsr>=1.4.2->-r requirements.txt (line 11)) (0.40.2)
Requirement already satisfied: jsonschema>=3.0 in d:\miniconda3\envs\bgreplace\lib\site-packages (from altair<6.0,>=4.2.0->gradio->-r requirements.txt (line 1)) (4.19.1)
Requirement already satisfied: toolz in d:\miniconda3\envs\bgreplace\lib\site-packages (from altair<6.0,>=4.2.0->gradio->-r requirements.txt (line 1)) (0.12.0)
Requirement already satisfied: filterpy in d:\miniconda3\envs\bgreplace\lib\site-packages (from facexlib>=0.2.5->realesrgan->-r requirements.txt (line 10)) (1.4.5)
Requirement already satisfied: numba in d:\miniconda3\envs\bgreplace\lib\site-packages (from facexlib>=0.2.5->realesrgan->-r requirements.txt (line 10)) (0.58.0)
Requirement already satisfied: contourpy>=1.0.1 in d:\miniconda3\envs\bgreplace\lib\site-packages (from matplotlib
=3.0->gradio->-r requirements.txt (line 1)) (1.1.1)
Requirement already satisfied: cycler>=0.10 in d:\miniconda3\envs\bgreplace\lib\site-packages (from matplotlib=3.0->gradio->-r requirements.txt (line 1)) (0.12.0)
Requirement already satisfied: fonttools>=4.22.0 in d:\miniconda3\envs\bgreplace\lib\site-packages (from matplotlib
=3.0->gradio->-r requirements.txt (line 1)) (4.43.0)
Requirement already satisfied: kiwisolver>=1.0.1 in d:\miniconda3\envs\bgreplace\lib\site-packages (from matplotlib=3.0->gradio->-r requirements.txt (line 1)) (1.4.5)
Requirement already satisfied: pyparsing>=2.3.1 in d:\miniconda3\envs\bgreplace\lib\site-packages (from matplotlib
=3.0->gradio->-r requirements.txt (line 1)) (3.1.1)
Requirement already satisfied: python-dateutil>=2.7 in d:\miniconda3\envs\bgreplace\lib\site-packages (from matplotlib=3.0->gradio->-r requirements.txt (line 1)) (2.8.2)
Requirement already satisfied: pytz>=2020.1 in d:\miniconda3\envs\bgreplace\lib\site-packages (from pandas<3.0,>=1.0->gradio->-r requirements.txt (line 1)) (2023.3.post1)
Requirement already satisfied: tzdata>=2022.1 in d:\miniconda3\envs\bgreplace\lib\site-packages (from pandas<3.0,>=1.0->gradio->-r requirements.txt (line 1)) (2023.3)
Requirement already satisfied: annotated-types>=0.4.0 in d:\miniconda3\envs\bgreplace\lib\site-packages (from pydantic!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,<3.0.0,>=1.7.4->gradio->-r requirements.txt (line 1)) (0.5.0)
Requirement already satisfied: pydantic-core==2.10.1 in d:\miniconda3\envs\bgreplace\lib\site-packages (from pydantic!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,<3.0.0,>=1.7.4->gradio->-r requirements.txt (line 1)) (2.10.1)
Requirement already satisfied: charset-normalizer<4,>=2 in d:\miniconda3\envs\bgreplace\lib\site-packages (from requests
=2.0->gradio->-r requirements.txt (line 1)) (3.3.0)
Requirement already satisfied: idna<4,>=2.5 in d:\miniconda3\envs\bgreplace\lib\site-packages (from requests=2.0->gradio->-r requirements.txt (line 1)) (3.4)
Requirement already satisfied: urllib3<3,>=1.21.1 in d:\miniconda3\envs\bgreplace\lib\site-packages (from requests
=2.0->gradio->-r requirements.txt (line 1)) (2.0.6)
Requirement already satisfied: certifi>=2017.4.17 in d:\miniconda3\envs\bgreplace\lib\site-packages (from requests~=2.0->gradio->-r requirements.txt (line 1)) (2023.7.22)
Requirement already satisfied: colorama in d:\miniconda3\envs\bgreplace\lib\site-packages (from tqdm>=4.27->transformers->-r requirements.txt (line 4)) (0.4.6)
Requirement already satisfied: click>=7.0 in d:\miniconda3\envs\bgreplace\lib\site-packages (from uvicorn>=0.14.0->gradio->-r requirements.txt (line 1)) (8.1.7)
Requirement already satisfied: h11>=0.8 in d:\miniconda3\envs\bgreplace\lib\site-packages (from uvicorn>=0.14.0->gradio->-r requirements.txt (line 1)) (0.14.0)
Requirement already satisfied: anyio<4.0.0,>=3.7.1 in d:\miniconda3\envs\bgreplace\lib\site-packages (from fastapi->gradio->-r requirements.txt (line 1)) (3.7.1)
Requirement already satisfied: starlette<0.28.0,>=0.27.0 in d:\miniconda3\envs\bgreplace\lib\site-packages (from fastapi->gradio->-r requirements.txt (line 1)) (0.27.0)
Requirement already satisfied: httpcore<0.19.0,>=0.18.0 in d:\miniconda3\envs\bgreplace\lib\site-packages (from httpx->gradio->-r requirements.txt (line 1)) (0.18.0)
Requirement already satisfied: sniffio in d:\miniconda3\envs\bgreplace\lib\site-packages (from httpx->gradio->-r requirements.txt (line 1)) (1.3.0)
Requirement already satisfied: zipp>=0.5 in d:\miniconda3\envs\bgreplace\lib\site-packages (from importlib-metadata->diffusers[torch]->-r requirements.txt (line 3)) (3.17.0)
Requirement already satisfied: absl-py>=0.4 in d:\miniconda3\envs\bgreplace\lib\site-packages (from tb-nightly->basicsr>=1.4.2->-r requirements.txt (line 11)) (2.0.0)
Requirement already satisfied: grpcio>=1.48.2 in d:\miniconda3\envs\bgreplace\lib\site-packages (from tb-nightly->basicsr>=1.4.2->-r requirements.txt (line 11)) (1.59.0)
Requirement already satisfied: google-auth<3,>=1.6.3 in d:\miniconda3\envs\bgreplace\lib\site-packages (from tb-nightly->basicsr>=1.4.2->-r requirements.txt (line 11)) (2.23.2)
Requirement already satisfied: google-auth-oauthlib<2,>=0.5 in d:\miniconda3\envs\bgreplace\lib\site-packages (from tb-nightly->basicsr>=1.4.2->-r requirements.txt (line 11)) (1.1.0)
Requirement already satisfied: markdown>=2.6.8 in d:\miniconda3\envs\bgreplace\lib\site-packages (from tb-nightly->basicsr>=1.4.2->-r requirements.txt (line 11)) (3.4.4)
Requirement already satisfied: protobuf<4.24,>=3.19.6 in d:\miniconda3\envs\bgreplace\lib\site-packages (from tb-nightly->basicsr>=1.4.2->-r requirements.txt (line 11)) (4.23.4)
Requirement already satisfied: setuptools>=41.0.0 in d:\miniconda3\envs\bgreplace\lib\site-packages (from tb-nightly->basicsr>=1.4.2->-r requirements.txt (line 11)) (68.0.0)
Requirement already satisfied: six>1.9 in d:\miniconda3\envs\bgreplace\lib\site-packages (from tb-nightly->basicsr>=1.4.2->-r requirements.txt (line 11)) (1.16.0)
Requirement already satisfied: tensorboard-data-server<0.8.0,>=0.7.0 in d:\miniconda3\envs\bgreplace\lib\site-packages (from tb-nightly->basicsr>=1.4.2->-r requirements.txt (line 11)) (0.7.1)
Requirement already satisfied: werkzeug>=1.0.1 in d:\miniconda3\envs\bgreplace\lib\site-packages (from tb-nightly->basicsr>=1.4.2->-r requirements.txt (line 11)) (3.0.0)
Requirement already satisfied: platformdirs>=3.5.1 in d:\miniconda3\envs\bgreplace\lib\site-packages (from yapf->basicsr>=1.4.2->-r requirements.txt (line 11)) (3.11.0)
Requirement already satisfied: tomli>=2.0.1 in d:\miniconda3\envs\bgreplace\lib\site-packages (from yapf->basicsr>=1.4.2->-r requirements.txt (line 11)) (2.0.1)
Requirement already satisfied: exceptiongroup in d:\miniconda3\envs\bgreplace\lib\site-packages (from anyio<4.0.0,>=3.7.1->fastapi->gradio->-r requirements.txt (line 1)) (1.1.3)
Requirement already satisfied: cachetools<6.0,>=2.0.0 in d:\miniconda3\envs\bgreplace\lib\site-packages (from google-auth<3,>=1.6.3->tb-nightly->basicsr>=1.4.2->-r requirements.txt (line 11)) (5.3.1)
Requirement already satisfied: pyasn1-modules>=0.2.1 in d:\miniconda3\envs\bgreplace\lib\site-packages (from google-auth<3,>=1.6.3->tb-nightly->basicsr>=1.4.2->-r requirements.txt (line 11)) (0.3.0)
Requirement already satisfied: rsa<5,>=3.1.4 in d:\miniconda3\envs\bgreplace\lib\site-packages (from google-auth<3,>=1.6.3->tb-nightly->basicsr>=1.4.2->-r requirements.txt (line 11)) (4.9)
Requirement already satisfied: requests-oauthlib>=0.7.0 in d:\miniconda3\envs\bgreplace\lib\site-packages (from google-auth-oauthlib<2,>=0.5->tb-nightly->basicsr>=1.4.2->-r requirements.txt (line 11)) (1.3.1)
Requirement already satisfied: attrs>=22.2.0 in d:\miniconda3\envs\bgreplace\lib\site-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio->-r requirements.txt (line 1)) (23.1.0)
Requirement already satisfied: jsonschema-specifications>=2023.03.6 in d:\miniconda3\envs\bgreplace\lib\site-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio->-r requirements.txt (line 1)) (2023.7.1)
Requirement already satisfied: referencing>=0.28.4 in d:\miniconda3\envs\bgreplace\lib\site-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio->-r requirements.txt (line 1)) (0.30.2)
Requirement already satisfied: rpds-py>=0.7.1 in d:\miniconda3\envs\bgreplace\lib\site-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio->-r requirements.txt (line 1)) (0.10.3)
Requirement already satisfied: llvmlite<0.42,>=0.41.0dev0 in d:\miniconda3\envs\bgreplace\lib\site-packages (from numba->facexlib>=0.2.5->realesrgan->-r requirements.txt (line 10)) (0.41.0)
Requirement already satisfied: mpmath>=0.19 in d:\miniconda3\envs\bgreplace\lib\site-packages (from sympy->torch>=1.4->diffusers[torch]->-r requirements.txt (line 3)) (1.3.0)
Requirement already satisfied: pyasn1<0.6.0,>=0.4.6 in d:\miniconda3\envs\bgreplace\lib\site-packages (from pyasn1-modules>=0.2.1->google-auth<3,>=1.6.3->tb-nightly->basicsr>=1.4.2->-r requirements.txt (line 11)) (0.5.0)
Requirement already satisfied: oauthlib>=3.0.0 in d:\miniconda3\envs\bgreplace\lib\site-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<2,>=0.5->tb-nightly->basicsr>=1.4.2->-r requirements.txt (line 11)) (3.2.2)

(bgreplace) D:\AITech\background-replacement>python app.py
Initializing captioner...
Initializing upscaler...
Initializing segmenter...
Traceback (most recent call last):
File "D:\AITech\background-replacement\app.py", line 5, in
from background_replacer import replace_background
File "D:\AITech\background-replacement\background_replacer.py", line 23, in
init_segmenter()
File "D:\AITech\background-replacement\segmenter.py", line 37, in init
import models
ModuleNotFoundError: No module named 'models'

(bgreplace) D:\AITech\background-replacement>

makisekurisu-jp changed discussion title from Installation error report to ModuleNotFoundError: No module named 'models'
Shopify org

https://huggingface.co/spaces/Shopify/background-replacement/blob/main/segmenter.py#L26 should have clone a repository. I don't see that step in your output. Do you have a saved_models directory already?

https://huggingface.co/spaces/Shopify/background-replacement/blob/main/segmenter.py#L26 should have clone a repository. I don't see that step in your output. Do you have a saved_models directory already?

I have cloned the repository and the "saved_models" folder already exists, but the problem persists when running "app.py".

Shopify org

Ah, you're running on Windows. I wonder if it's some silly path resolution bug in app.py. It was only tested on *nix environments.

Sign up or log in to comment