lllyasviel / ControlNet

Let us control diffusion models!
Apache License 2.0
30.39k stars 2.73k forks source link

Question about the environment #691

Open qiqiApink opened 4 months ago

qiqiApink commented 4 months ago

I followed your instructions to build the environment. But I got the following error when running tutorial_train.py:

Traceback (most recent call last):
  File "tutorial_train.py", line 1, in <module>
    from share import *
  File "/workspace/ControlNet/share.py", line 2, in <module>
    from cldm.hack import disable_verbosity, enable_sliced_attention
  File "/workspace/ControlNet/cldm/hack.py", line 5, in <module>
    import ldm.modules.attention
  File "/workspace/ControlNet/ldm/modules/attention.py", line 4, in <module>
    from torch._C import TorchDispatchMode
ImportError: cannot import name 'TorchDispatchMode' from 'torch._C' (/opt/conda/envs/control/lib/python3.8/site-packages/torch/_C.cpython-38-x86_64-linux-gnu.so)

And the details of my environment is as follows:

# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                        main    defaults
_openmp_mutex             5.1                       1_gnu    defaults
absl-py                   2.1.0                    pypi_0    pypi
addict                    2.4.0                    pypi_0    pypi
aiofiles                  24.1.0                   pypi_0    pypi
aiohttp                   3.9.5                    pypi_0    pypi
aiosignal                 1.3.1                    pypi_0    pypi
albumentations            1.3.0                    pypi_0    pypi
altair                    5.3.0                    pypi_0    pypi
annotated-types           0.7.0                    pypi_0    pypi
antlr4-python3-runtime    4.8                      pypi_0    pypi
anyio                     4.4.0                    pypi_0    pypi
async-timeout             4.0.3                    pypi_0    pypi
attrs                     23.2.0                   pypi_0    pypi
backports-zoneinfo        0.2.1                    pypi_0    pypi
basicsr                   1.4.2                    pypi_0    pypi
blas                      1.0                         mkl    defaults
blinker                   1.8.2                    pypi_0    pypi
braceexpand               0.1.7                    pypi_0    pypi
brotli-python             1.0.9            py38h6a678d5_8    defaults
bzip2                     1.0.8                h5eee18b_6    defaults
ca-certificates           2024.7.2             h06a4308_0    defaults
cachetools                5.4.0                    pypi_0    pypi
certifi                   2024.7.4         py38h06a4308_0    defaults
charset-normalizer        2.0.4              pyhd3eb1b0_0    defaults
click                     8.1.7                    pypi_0    pypi
contourpy                 1.1.1                    pypi_0    pypi
cudatoolkit               11.3.1               h2bc3f7f_2    defaults
cycler                    0.12.1                   pypi_0    pypi
dnspython                 2.6.1                    pypi_0    pypi
einops                    0.3.0                    pypi_0    pypi
email-validator           2.2.0                    pypi_0    pypi
exceptiongroup            1.2.2                    pypi_0    pypi
fastapi                   0.111.1                  pypi_0    pypi
fastapi-cli               0.0.4                    pypi_0    pypi
ffmpeg                    4.3                  hf484d3e_0    pytorch
ffmpy                     0.3.2                    pypi_0    pypi
filelock                  3.15.4                   pypi_0    pypi
fonttools                 4.53.1                   pypi_0    pypi
freetype                  2.12.1               h4a9f257_0    defaults
frozenlist                1.4.1                    pypi_0    pypi
fsspec                    2024.6.1                 pypi_0    pypi
ftfy                      6.2.0                    pypi_0    pypi
future                    1.0.0                    pypi_0    pypi
gitdb                     4.0.11                   pypi_0    pypi
gitpython                 3.1.43                   pypi_0    pypi
gmp                       6.2.1                h295c915_3    defaults
gnutls                    3.6.15               he1e5248_0    defaults
google-auth               2.32.0                   pypi_0    pypi
google-auth-oauthlib      1.0.0                    pypi_0    pypi
gradio                    3.16.2                   pypi_0    pypi
grpcio                    1.64.1                   pypi_0    pypi
h11                       0.14.0                   pypi_0    pypi
httpcore                  1.0.5                    pypi_0    pypi
httptools                 0.6.1                    pypi_0    pypi
httpx                     0.27.0                   pypi_0    pypi
huggingface-hub           0.23.5                   pypi_0    pypi
idna                      3.7              py38h06a4308_0    defaults
imageio                   2.9.0                    pypi_0    pypi
imageio-ffmpeg            0.4.2                    pypi_0    pypi
importlib-metadata        8.0.0                    pypi_0    pypi
importlib-resources       6.4.0                    pypi_0    pypi
intel-openmp              2021.4.0          h06a4308_3561    defaults
invisible-watermark       0.2.0                    pypi_0    pypi
jinja2                    3.1.4                    pypi_0    pypi
joblib                    1.4.2                    pypi_0    pypi
jpeg                      9e                   h5eee18b_1    defaults
jsonschema                4.23.0                   pypi_0    pypi
jsonschema-specifications 2023.12.1                pypi_0    pypi
kiwisolver                1.4.5                    pypi_0    pypi
kornia                    0.6.0                    pypi_0    pypi
lame                      3.100                h7b6447c_0    defaults
lazy-loader               0.4                      pypi_0    pypi
lcms2                     2.12                 h3be6417_0    defaults
ld_impl_linux-64          2.38                 h1181459_1    defaults
lerc                      3.0                  h295c915_0    defaults
libdeflate                1.17                 h5eee18b_1    defaults
libffi                    3.3                  he6710b0_2    defaults
libgcc-ng                 11.2.0               h1234567_1    defaults
libgomp                   11.2.0               h1234567_1    defaults
libiconv                  1.16                 h5eee18b_3    defaults
libidn2                   2.3.4                h5eee18b_0    defaults
libpng                    1.6.39               h5eee18b_0    defaults
libstdcxx-ng              11.2.0               h1234567_1    defaults
libtasn1                  4.19.0               h5eee18b_0    defaults
libtiff                   4.5.1                h6a678d5_0    defaults
libunistring              0.9.10               h27cfd23_0    defaults
libwebp-base              1.3.2                h5eee18b_0    defaults
linkify-it-py             2.0.3                    pypi_0    pypi
lmdb                      1.5.1                    pypi_0    pypi
lz4-c                     1.9.4                h6a678d5_1    defaults
markdown                  3.6                      pypi_0    pypi
markdown-it-py            3.0.0                    pypi_0    pypi
markupsafe                2.1.5                    pypi_0    pypi
matplotlib                3.7.5                    pypi_0    pypi
mdit-py-plugins           0.4.1                    pypi_0    pypi
mdurl                     0.1.2                    pypi_0    pypi
mkl                       2021.4.0           h06a4308_640    defaults
mkl-service               2.4.0            py38h7f8727e_0    defaults
mkl_fft                   1.3.1            py38hd3c417c_0    defaults
mkl_random                1.2.2            py38h51133e4_0    defaults
multidict                 6.0.5                    pypi_0    pypi
ncurses                   6.4                  h6a678d5_0    defaults
nettle                    3.7.3                hbbd107a_1    defaults
networkx                  3.1                      pypi_0    pypi
numpy                     1.23.1           py38h6c91a56_0    defaults
numpy-base                1.23.1           py38ha15fc14_0    defaults
oauthlib                  3.2.2                    pypi_0    pypi
omegaconf                 2.1.1                    pypi_0    pypi
open-clip-torch           2.0.2                    pypi_0    pypi
opencv-contrib-python     4.3.0.36                 pypi_0    pypi
opencv-python             4.10.0.84                pypi_0    pypi
opencv-python-headless    4.10.0.84                pypi_0    pypi
openh264                  2.1.1                h4ff587b_0    defaults
openjpeg                  2.4.0                h9ca470c_2    defaults
openssl                   1.1.1w               h7f8727e_0    defaults
orjson                    3.10.6                   pypi_0    pypi
packaging                 24.1                     pypi_0    pypi
pandas                    2.0.3                    pypi_0    pypi
pillow                    10.4.0           py38h5eee18b_0    defaults
pip                       20.3.3           py38h06a4308_0    defaults
pkgutil-resolve-name      1.3.10                   pypi_0    pypi
prettytable               3.6.0                    pypi_0    pypi
protobuf                  3.20.3                   pypi_0    pypi
pyarrow                   17.0.0                   pypi_0    pypi
pyasn1                    0.6.0                    pypi_0    pypi
pyasn1-modules            0.4.0                    pypi_0    pypi
pycryptodome              3.20.0                   pypi_0    pypi
pydantic                  2.8.2                    pypi_0    pypi
pydantic-core             2.20.1                   pypi_0    pypi
pydeck                    0.9.1                    pypi_0    pypi
pydeprecate               0.3.1                    pypi_0    pypi
pydub                     0.25.1                   pypi_0    pypi
pygments                  2.18.0                   pypi_0    pypi
pympler                   1.1                      pypi_0    pypi
pyparsing                 3.1.2                    pypi_0    pypi
pysocks                   1.7.1            py38h06a4308_0    defaults
python                    3.8.5                h7579374_1    defaults
python-dateutil           2.9.0.post0              pypi_0    pypi
python-dotenv             1.0.1                    pypi_0    pypi
python-multipart          0.0.9                    pypi_0    pypi
pytorch                   1.12.1          py3.8_cuda11.3_cudnn8.3.2_0    pytorch
pytorch-lightning         1.5.0                    pypi_0    pypi
pytorch-mutex             1.0                        cuda    pytorch
pytz                      2024.1                   pypi_0    pypi
pywavelets                1.4.1                    pypi_0    pypi
pyyaml                    6.0.1                    pypi_0    pypi
qudida                    0.0.4                    pypi_0    pypi
readline                  8.2                  h5eee18b_0    defaults
referencing               0.35.1                   pypi_0    pypi
regex                     2024.5.15                pypi_0    pypi
requests                  2.32.2           py38h06a4308_0    defaults
requests-oauthlib         2.0.0                    pypi_0    pypi
rich                      13.7.1                   pypi_0    pypi
rpds-py                   0.19.0                   pypi_0    pypi
rsa                       4.9                      pypi_0    pypi
safetensors               0.2.7                    pypi_0    pypi
scikit-image              0.20.0                   pypi_0    pypi
scikit-learn              1.3.2                    pypi_0    pypi
scipy                     1.9.1                    pypi_0    pypi
semver                    3.0.2                    pypi_0    pypi
setuptools                69.5.1           py38h06a4308_0    defaults
shellingham               1.5.4                    pypi_0    pypi
six                       1.16.0             pyhd3eb1b0_1    defaults
smmap                     5.0.1                    pypi_0    pypi
sniffio                   1.3.1                    pypi_0    pypi
sqlite                    3.45.3               h5eee18b_0    defaults
starlette                 0.37.2                   pypi_0    pypi
streamlit                 1.12.1                   pypi_0    pypi
streamlit-drawable-canvas 0.8.0                    pypi_0    pypi
tb-nightly                2.14.0a20230808          pypi_0    pypi
tensorboard               2.14.0                   pypi_0    pypi
tensorboard-data-server   0.7.2                    pypi_0    pypi
test-tube                 0.7.5                    pypi_0    pypi
threadpoolctl             3.5.0                    pypi_0    pypi
tifffile                  2023.7.10                pypi_0    pypi
timm                      0.6.12                   pypi_0    pypi
tk                        8.6.14               h39e8969_0    defaults
tokenizers                0.12.1                   pypi_0    pypi
toml                      0.10.2                   pypi_0    pypi
toolz                     0.12.1                   pypi_0    pypi
torchmetrics              0.6.0                    pypi_0    pypi
torchvision               0.13.1               py38_cu113    pytorch
tornado                   6.4.1                    pypi_0    pypi
tqdm                      4.66.4                   pypi_0    pypi
transformers              4.19.2                   pypi_0    pypi
typer                     0.12.3                   pypi_0    pypi
typing_extensions         4.11.0           py38h06a4308_0    defaults
tzdata                    2024.1                   pypi_0    pypi
tzlocal                   5.2                      pypi_0    pypi
uc-micro-py               1.0.3                    pypi_0    pypi
urllib3                   2.2.2            py38h06a4308_0    defaults
uvicorn                   0.30.1                   pypi_0    pypi
uvloop                    0.19.0                   pypi_0    pypi
validators                0.33.0                   pypi_0    pypi
watchdog                  4.0.1                    pypi_0    pypi
watchfiles                0.22.0                   pypi_0    pypi
wcwidth                   0.2.13                   pypi_0    pypi
webdataset                0.2.5                    pypi_0    pypi
websockets                12.0                     pypi_0    pypi
werkzeug                  3.0.3                    pypi_0    pypi
wheel                     0.43.0           py38h06a4308_0    defaults
xz                        5.4.6                h5eee18b_1    defaults
yapf                      0.32.0                   pypi_0    pypi
yarl                      1.9.4                    pypi_0    pypi
zipp                      3.19.2                   pypi_0    pypi
zlib                      1.2.13               h5eee18b_1    defaults
zstd                      1.5.5                hc292b87_2    defaults

Can you give me some advice?

atg93 commented 4 months ago

I think I can run tutorial_train.py with these libraries. I hope they will work for you too.

req.txt