Skip to content

Commit a63a426

Browse files
committed
docs: update docs
1 parent c9785ac commit a63a426

File tree

5 files changed

+68
-0
lines changed

5 files changed

+68
-0
lines changed

.github/case1.jpg

138 KB
Loading

.github/case2.jpg

165 KB
Loading

.github/case3.jpg

232 KB
Loading

.github/preview.jpg

97.7 KB
Loading

README.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,71 @@
44

55
![](.github/preview.jpg)
66

7+
## 使用教程
8+
9+
[Stable Diffusion 硬核生存指南:WebUI 中的 CodeFormer](https://soulteary.com/2023/08/02/stable-diffusion-hardcore-survival-guide-codeformer-in-webui.html)
10+
11+
12+
## 快速上手
13+
14+
`Docker CodeFormer` 项目下载代码,并进入项目目录:
15+
16+
```bash
17+
git clone https://github.com/soulteary/docker-codeformer.git
18+
19+
cd docker-codeformer
20+
```
21+
22+
执行项目中的镜像构建工具:
23+
24+
```bash
25+
scripts/build.sh
26+
```
27+
28+
在完成基础镜像构建之后,可以从[网盘下载](https://pan.baidu.com/s/1rxaHRyYuff1gbt-g1y6DNA?pwd=soul) `weights.zip`
29+
30+
模型应用运行需要的所有模型都在这里了,下载完毕后,解压缩模型压缩包,将 `CodeFormer``facelib``realesrgan` 三个目录放置到 `weights` 目录中,完整的项目结构这样的:
31+
32+
```bash
33+
.
34+
├── LICENSE
35+
├── README.md
36+
├── assets
37+
│ └── image
38+
├── docker
39+
│ └── Dockerfile
40+
├── scripts
41+
│ └── build.sh
42+
├── src
43+
│ ├── app.py
44+
│ └── code-fix.py
45+
└── weights
46+
├── CodeFormer
47+
├── facelib
48+
└── realesrgan
49+
```
50+
51+
准备好模型文件之后,使用下面的命令启动模型应用:
52+
53+
```bash
54+
docker run --gpus all --ipc=host --ulimit memlock=-1 --ulimit stack=67108864 --rm -it -v `pwd`/weights/:/app/CodeFormer/weights -p 7860:7860 soulteary/docker-codeformer
55+
```
56+
57+
稍等片刻,我们将看到类似下面的日志:
58+
59+
```bash
60+
Running on local URL: http://0.0.0.0:7860
61+
62+
To create a public link, set `share=True` in `launch()`.
63+
```
64+
65+
接着,我们就可以打开浏览器访问 `http://localhost:7860` 或者 `http://你的IP地址:7860` 来试试看啦。
66+
67+
68+
## 处理图片对比
69+
70+
![](.github/case1.jpg)
71+
72+
![](.github/case2.jpg)
73+
74+
![](.github/case3.jpg)

0 commit comments

Comments
 (0)