levihsu / OOTDiffusion

Official implementation of OOTDiffusion: Outfitting Fusion based Latent Diffusion for Controllable Virtual Try-on
Other
5.82k stars 838 forks source link

why so many errors #87

Closed zachysaur closed 9 months ago

zachysaur commented 9 months ago

ootd) D:\OOTDiffusion-for-windows-main\run>python run_ootd.py --model_path C:\Users\ggrov\Downloads\1\girl.png --cloth_path C:\Users\ggrov\Downloads\1\2.jpg --scale 2.0 --sample 4 Traceback (most recent call last): File "D:\OOTDiffusion-for-windows-main\run\run_ootd.py", line 10, in from preprocess.humanparsing.aigc_run_parsing import Parsing File "D:\OOTDiffusion-for-windows-main\preprocess\humanparsing\aigc_run_parsing.py", line 7, in from parsing_api import load_atr_model, load_lip_model, inference File "D:\OOTDiffusion-for-windows-main\preprocess\humanparsing\parsing_api.py", line 11, in import networks File "D:\OOTDiffusion-for-windows-main\preprocess\humanparsing\networks__init.py", line 2, in from networks.AugmentCE2P import resnet101 File "D:\OOTDiffusion-for-windows-main\preprocess\humanparsing\networks\AugmentCE2P.py", line 22, in from modules import InPlaceABNSync File "D:\OOTDiffusion-for-windows-main\preprocess\humanparsing\modules\init__.py", line 1, in from .bn import ABN, InPlaceABN, InPlaceABNSync File "D:\OOTDiffusion-for-windows-main\preprocess\humanparsing\modules\bn.py", line 10, in from .functions import * File "D:\OOTDiffusion-for-windows-main\preprocess\humanparsing\modules\functions.py", line 11, in _backend = load(name="inplace_abn", File "C:\Users\ggrov\anaconda3\envs\ootd\lib\site-packages\torch\utils\cpp_extension.py", line 1308, in load return _jit_compile( File "C:\Users\ggrov\anaconda3\envs\ootd\lib\site-packages\torch\utils\cpp_extension.py", line 1736, in _jit_compile return _import_module_from_library(name, build_directory, is_python_module) File "C:\Users\ggrov\anaconda3\envs\ootd\lib\site-packages\torch\utils\cpp_extension.py", line 2136, in _import_module_from_library module = importlib.util.module_from_spec(spec) ImportError: DLL load failed while importing inplace_abn: The specified module could not be found.

(ootd) D:\OOTDiffusion-for-windows-main\run>

hariji814 commented 9 months ago

这里先按照ReadME中找到huggingface的模型下载好

zachysaur commented 9 months ago

(base) C:\Windows\system32>conda activate ootd

(ootd) C:\Windows\system32>cd C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build

(ootd) C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build>vcvars64.bat


Visual Studio 2022 Developer Command Prompt v17.9.2 Copyright (c) 2022 Microsoft Corporation


[vcvarsall.bat] Environment initialized for: 'x64'

(ootd) C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build>d:,

(ootd) D:>cd D:\OOTDiffusion-for-windows-main\run

(ootd) D:\OOTDiffusion-for-windows-main\run>python gradio_ootd.py Traceback (most recent call last): File "D:\OOTDiffusion-for-windows-main\run\gradio_ootd.py", line 15, in from preprocess.humanparsing.aigc_run_parsing import Parsing File "D:\OOTDiffusion-for-windows-main\preprocess\humanparsing\aigc_run_parsing.py", line 7, in from parsing_api import load_atr_model, load_lip_model, inference File "D:\OOTDiffusion-for-windows-main\preprocess\humanparsing\parsing_api.py", line 11, in import networks File "D:\OOTDiffusion-for-windows-main\preprocess\humanparsing\networks__init.py", line 2, in from networks.AugmentCE2P import resnet101 File "D:\OOTDiffusion-for-windows-main\preprocess\humanparsing\networks\AugmentCE2P.py", line 22, in from modules import InPlaceABNSync File "D:\OOTDiffusion-for-windows-main\preprocess\humanparsing\modules\init__.py", line 1, in from .bn import ABN, InPlaceABN, InPlaceABNSync File "D:\OOTDiffusion-for-windows-main\preprocess\humanparsing\modules\bn.py", line 10, in from .functions import * File "D:\OOTDiffusion-for-windows-main\preprocess\humanparsing\modules\functions.py", line 11, in _backend = load(name="inplace_abn", File "C:\Users\ggrov\anaconda3\envs\ootd\lib\site-packages\torch\utils\cpp_extension.py", line 1308, in load return _jit_compile( File "C:\Users\ggrov\anaconda3\envs\ootd\lib\site-packages\torch\utils\cpp_extension.py", line 1736, in _jit_compile return _import_module_from_library(name, build_directory, is_python_module) File "C:\Users\ggrov\anaconda3\envs\ootd\lib\site-packages\torch\utils\cpp_extension.py", line 2136, in _import_module_from_library module = importlib.util.module_from_spec(spec) ImportError: DLL load failed while importing inplace_abn: The specified module could not be found.

(ootd) D:\OOTDiffusion-for-windows-main\run>

zamp commented 9 months ago

Run python -s -m pip install inplace-abn

If you get an error about wrong cuda version install correct one. (For example: conda install pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch -c nvidia check https://pytorch.org/get-started/locally/ for correct command)

If you get ImportError: cannot import name 'get_full_repo_name' from 'huggingface_hub' Run conda install chardet

zachysaur commented 9 months ago

This share link expires in 72 hours. For free permanent hosting and GPU upgrades, run gradio deploy from Terminal to deploy to Spaces (https://huggingface.co/spaces) Exception in callback _ProactorBasePipeTransport._call_connection_lost(None) handle: <Handle _ProactorBasePipeTransport._call_connection_lost(None)> Traceback (most recent call last): File "C:\Users\ggrov\anaconda3\envs\ootd\lib\asyncio\events.py", line 80, in _run self._context.run(self._callback, self._args) File "C:\Users\ggrov\anaconda3\envs\ootd\lib\asyncio\proactor_events.py", line 162, in _call_connection_lost self._sock.shutdown(socket.SHUT_RDWR) ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host 0%| | 0/1 [00:00<?, ?it/s] Traceback (most recent call last): File "C:\Users\ggrov\anaconda3\envs\ootd\lib\site-packages\gradio\queueing.py", line 495, in call_prediction output = await route_utils.call_process_api( File "C:\Users\ggrov\anaconda3\envs\ootd\lib\site-packages\gradio\route_utils.py", line 232, in call_process_api output = await app.get_blocks().process_api( File "C:\Users\ggrov\anaconda3\envs\ootd\lib\site-packages\gradio\blocks.py", line 1561, in process_api result = await self.call_function( File "C:\Users\ggrov\anaconda3\envs\ootd\lib\site-packages\gradio\blocks.py", line 1179, in call_function prediction = await anyio.to_thread.run_sync( File "C:\Users\ggrov\anaconda3\envs\ootd\lib\site-packages\anyio\to_thread.py", line 56, in run_sync return await get_async_backend().run_sync_in_worker_thread( File "C:\Users\ggrov\anaconda3\envs\ootd\lib\site-packages\anyio_backends_asyncio.py", line 2144, in run_sync_in_worker_thread return await future File "C:\Users\ggrov\anaconda3\envs\ootd\lib\site-packages\anyio_backends_asyncio.py", line 851, in run result = context.run(func, args) File "C:\Users\ggrov\anaconda3\envs\ootd\lib\site-packages\gradio\utils.py", line 695, in wrapper response = f(*args, kwargs) File "D:\OOTDiffusion-for-windows-main\run\gradio_ootd.py", line 47, in process_hd modelparse, = parsing_model_hd(vton_img.resize((384, 512))) File "D:\OOTDiffusion-for-windows-main\preprocess\humanparsing\aigc_run_parsing.py", line 21, in call parsed_image, face_mask = inference(self.atr_model, self.lip_model, input_image) File "D:\OOTDiffusion-for-windows-main\preprocess\humanparsing\parsing_api.py", line 176, in inference output = model(image.cuda()) File "C:\Users\ggrov\anaconda3\envs\ootd\lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl return self._call_impl(*args, *kwargs) File "C:\Users\ggrov\anaconda3\envs\ootd\lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl return forward_call(args, kwargs) File "D:\OOTDiffusion-for-windows-main\preprocess\humanparsing\networks\AugmentCE2P.py", line 349, in forward x = self.relu1(self.bn1(self.conv1(x))) File "C:\Users\ggrov\anaconda3\envs\ootd\lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl return self._call_impl(*args, kwargs) File "C:\Users\ggrov\anaconda3\envs\ootd\lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl return forwardcall(*args, **kwargs) File "D:\OOTDiffusion-for-windows-main\preprocess\humanparsing\modules\bn.py", line 119, in forward x, , _ = inplace_abn_sync(x, self.weight, self.bias, self.running_mean, self.running_var, File "C:\Users\ggrov\anaconda3\envs\ootd\lib\site-packages\torch\autograd\function.py", line 539, in apply return super().apply(*args, kwargs) # type: ignore[misc] File "D:\OOTDiffusion-for-windows-main\preprocess\humanparsing\modules\functions.py", line 199, in forward _backend.forward(x, mean, var, weight, bias, ctx.affine, ctx.eps) NameError: name '_backend' is not defined