lllyasviel / Paints-UNDO

Understand Human Behavior to Align True Needs
Apache License 2.0
3.25k stars 287 forks source link

This is my experience of deploying and running successfully #23

Open s87343472 opened 1 month ago

s87343472 commented 1 month ago

Open Anaconda Powershell Prompt (miniconda3)

Create and activate the Conda environment

conda create -n paints_undo python=3.10

Expected result: After successfully creating the environment, you will see output similar to the following:

...

done

To activate this environment, use

$ conda activate paints_undo

To deactivate an active environment, use

$ conda deactivate

conda activate paints_undo

Expected result: After successfully activating the environment, the command prompt will start with (paints_undo).

Install PyTorch and related libraries

conda install pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch -c nvidia

Expected result: After successful installation, you will see output similar to the following:

...

Proceed ([y]/n)? y

...

done

Clone and enter the project directory

git clone https://github.com/lllyasviel/Paints-UNDO.git
cd Paints-UNDO

Expected result: After successfully cloning, you will see output similar to the following:

Cloning into 'Paints-UNDO'...

...

Install project dependencies

pip install xformers

Expected result: After successful installation, you will see output similar to the following:

...

Successfully installed xformers-

pip install -r requirements.txt

Expected result: After successful installation, you will see output similar to the following:

...

Successfully installed

Resolve dependency conflicts

pip uninstall huggingface_hub gradio gradio-client transformers diffusers peft tokenizers httpx httpcore

Expected result: After successful uninstallation, you will see output similar to the following:

...

Successfully uninstalled

pip install huggingface_hub==0.23.2
pip install gradio==3.1.4
pip install gradio_client==0.1.3
pip install transformers==4.23.1
pip install diffusers==0.3.0
pip install peft==0.2.0
pip install tokenizers==0.13.2
pip install httpx==0.23.0
pip install httpcore==0.15.0

Expected result: After successful installation, you will see output similar to the following:

...

Successfully installed

Verify if CUDA is available

python -c "import torch; print(torch.cuda.is_available())"

Expected result: If CUDA is available, you will see the output True:

True

Run the application

python gradio_app.py

Expected result: If everything is correct, the Gradio application will start, and a local server address such as http://127.0.0.1:7860 will be displayed in the command line, which you can open in a browser to access the application.

s87343472 commented 1 month ago

中文版本

打开Anaconda Powershell Prompt (miniconda3)

创建并激活Conda环境

conda create -n paints_undo python=3.10

预期结果:创建环境成功后,会看到类似以下的输出:

...

done

To activate this environment, use

$ conda activate paints_undo

To deactivate an active environment, use

$ conda deactivate

conda activate paints_undo

预期结果:激活环境成功后,命令行提示符会变成 (paints_undo) 开头。

安装PyTorch和相关库

conda install pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch -c nvidia

预期结果:安装成功后,会看到类似以下的输出:

...

Proceed ([y]/n)? y

...

done

克隆并进入项目目录

git clone https://github.com/lllyasviel/Paints-UNDO.git cd Paints-UNDO

预期结果:克隆成功后,会看到类似以下的输出:

Cloning into 'Paints-UNDO'...

...

安装项目依赖项

pip install xformers

预期结果:安装成功后,会看到类似以下的输出:

...

Successfully installed xformers-

pip install -r requirements.txt

预期结果:安装成功后,会看到类似以下的输出:

...

Successfully installed

解决依赖冲突

pip uninstall huggingface_hub gradio gradio-client transformers diffusers peft tokenizers httpx httpcore

预期结果:卸载成功后,会看到类似以下的输出:

...

Successfully uninstalled

pip install huggingface_hub==0.23.2 pip install gradio==3.1.4 pip install gradio_client==0.1.3 pip install transformers==4.23.1 pip install diffusers==0.3.0 pip install peft==0.2.0 pip install tokenizers==0.13.2 pip install httpx==0.23.0 pip install httpcore==0.15.0

预期结果:安装成功后,会看到类似以下的输出:

...

Successfully installed

验证CUDA是否可用

python -c "import torch; print(torch.cuda.is_available())"

预期结果:如果CUDA可用,会看到输出 True

True

运行应用程序

python gradio_app.py

预期结果:如果一切正常,Gradio应用程序会启动,并在命令行中显示一个本地服务器地址,例如 http://127.0.0.1:7860,你可以在浏览器中打开这个地址来访问应用程序。