https://github.com/soulteary/docker-gfpgan
TencentARC GFPGAN ALL-IN-ONE Docker Images. support x86 / ARM.
https://github.com/soulteary/docker-gfpgan
arm docker gfpgan m1-mac stable-diffusion-webui x86
Last synced: 5 months ago
JSON representation
TencentARC GFPGAN ALL-IN-ONE Docker Images. support x86 / ARM.
- Host: GitHub
- URL: https://github.com/soulteary/docker-gfpgan
- Owner: soulteary
- License: apache-2.0
- Created: 2022-05-19T16:48:20.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-08-08T15:54:41.000Z (about 2 years ago)
- Last Synced: 2025-03-31T12:05:25.460Z (6 months ago)
- Topics: arm, docker, gfpgan, m1-mac, stable-diffusion-webui, x86
- Language: Python
- Homepage: https://soulteary.com/2022/05/20/use-docker-to-run-huggingface-models.html
- Size: 1.13 MB
- Stars: 49
- Watchers: 1
- Forks: 11
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Docker GFPGAN
腾讯 ARC 实验室 GFPGAN Docker 运行方案。

如果需要 CPU 运行,请参考第一篇教程,如果希望生产使用或 GPU 运行,请参考第二篇教程。
## 项目预览
第二篇教程相关:


第一篇教程相关:


## 使用方法
下载代码,执行脚本,构建镜像:
```bash
git clone https://github.com/soulteary/docker-gfpgan.git
cd docker-gfpgan
bash scripts/build.sh
```在完成基础镜像构建之后,可以从[网盘下载 models.zip](https://pan.baidu.com/s/1j6JyPEpCOM4D9NYUnPh0SQ?pwd=soul)。
模型应用运行需要的所有模型都在这里了,下载完毕后,解压缩模型压缩包,将 gfpgan、model 两个目录放置到项目的根目录中,完整的项目结构是这样的:
```bash
├── docker
├── gfpgan
│ └── weights
│ ├── detection_Resnet50_Final.pth
│ └── parsing_parsenet.pth
├── LICENSE
├── model
│ ├── GFPGANCleanv1-NoCE-C2.pth
│ ├── GFPGANv1.2.pth
│ ├── GFPGANv1.3.pth
│ ├── GFPGANv1.4.pth
│ ├── GFPGANv1.pth
│ ├── README.md
│ ├── RealESRGAN_x2plus.pth
│ ├── realesr-general-x4v3.pth
│ └── RestoreFormer.pth
├── README.md
├── scripts
└── src
```准备好模型文件之后,使用下面的命令启动模型应用:
```bash
docker run --gpus all --ipc=host --ulimit memlock=-1 --ulimit stack=67108864 --rm -it -v `pwd`/model:/app/model -v `pwd`/gfpgan:/app/gfpgan -p 7860:7860 soulteary/docker-gfpgan
```稍等片刻,我们将看到类似下面的日志:
```bash
Running on local URL: http://0.0.0.0:7860To create a public link, set `share=True` in `launch()`.
```接着,我们就可以打开浏览器访问 http://localhost:7860 或者 http://你的IP地址:7860 来试试看啦。
## 相关教程
- 《[Stable Diffusion 硬核生存指南:WebUI 中的 GFPGAN](https://soulteary.com/2023/08/04/stable-diffusion-hardcore-survival-guide-gfpgan-in-webui.html)》
- 《[使用 Docker 来运行 HuggingFace 海量模型](https://soulteary.com/2022/05/20/use-docker-to-run-huggingface-models.html)》## 相关项目
- https://github.com/TencentARC/GFPGAN
- https://github.com/soulteary/docker-pytorch-playground