https://github.com/ashleykleynhans/supir-docker
Docker image for SUPIR (Scaling Up to Excellence: Practicing Model Scaling for Photo-Realistic Image Restoration In the Wild)
https://github.com/ashleykleynhans/supir-docker
deep-learning diffusion-models docker docker-image llava pytorch pytorch-lightning restoration runpod sdxl stable-diffusion super-resolution upscaling
Last synced: 3 months ago
JSON representation
Docker image for SUPIR (Scaling Up to Excellence: Practicing Model Scaling for Photo-Realistic Image Restoration In the Wild)
- Host: GitHub
- URL: https://github.com/ashleykleynhans/supir-docker
- Owner: ashleykleynhans
- License: gpl-3.0
- Created: 2024-02-27T09:13:29.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-17T14:38:36.000Z (about 1 year ago)
- Last Synced: 2024-05-02T01:50:00.827Z (about 1 year ago)
- Topics: deep-learning, diffusion-models, docker, docker-image, llava, pytorch, pytorch-lightning, restoration, runpod, sdxl, stable-diffusion, super-resolution, upscaling
- Language: Shell
- Homepage:
- Size: 61.5 KB
- Stars: 8
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Docker image for SUPIR (Scaling Up to Excellence: Practicing Model Scaling for Photo-Realistic Image Restoration In the Wild)

> [!IMPORTANT]
> This needs at least 24GB VRAM for 1x upscale. If you want to upscale more than 1x,
> you will need more than 24GB of VRAM. 48GB VRAM is recommended.> [!NOTE]
> Loading of models on start takes a few minutes, so you can view the log
> to watch the progress. You will be able to access the port when you see
> `Running on local URL: http://0.0.0.0:3001` in the log.## Installs
* Ubuntu 22.04 LTS
* CUDA 12.1
* Python 3.10.12
* [SUPIR](
https://github.com/ashleykleynhans/SUPIR)
* Torch 2.3.1
* xformers 0.0.27
* [Jupyter Lab](https://github.com/jupyterlab/jupyterlab)
* [code-server](https://github.com/coder/code-server)
* [runpodctl](https://github.com/runpod/runpodctl)
* [OhMyRunPod](https://github.com/kodxana/OhMyRunPod)
* [RunPod File Uploader](https://github.com/kodxana/RunPod-FilleUploader)
* [croc](https://github.com/schollz/croc)
* [rclone](https://rclone.org/)## Available on RunPod
This image is designed to work on [RunPod](https://runpod.io?ref=2xxro4sy).
You can use my custom [RunPod template](
https://runpod.io/console/gpu-cloud?template=aa31uo64wv&ref=2xxro4sy)
to launch it on RunPod.## Building the Docker image
> [!NOTE]
> You will need to edit the `docker-bake.hcl` file and update `USERNAME`,
> and `RELEASE`. You can obviously edit the other values too, but these
> are the most important ones.```bash
# Clone the repo
git clone https://github.com/ashleykleynhans/supir-docker.git# Log in to Docker Hub
docker login# Build the image, tag the image, and push the image to Docker Hub
cd supir-docker
docker buildx bake -f docker-bake.hcl --push
```## Running Locally
### Install Nvidia CUDA Driver
- [Linux](https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html)
- [Windows](https://docs.nvidia.com/cuda/cuda-installation-guide-microsoft-windows/index.html)### Start the Docker container
```bash
docker run -d \
--gpus all \
-v /workspace \
-p 3000:3001 \
-p 7777:7777 \
-p 8888:8888 \
-p 2999:2999 \
ashleykza/supir:latest
```## Models
| Model | Description |
|-----------------------------------|-------------|
| SUPIR-v0F.ckpt | SUPIR F |
| SUPIR-v0Q.ckpt | SUPIR Q |
| liuhaotian/llava-v1.5-7b | LLaVA |
| sd_xl_base_1.0_0.9vae.safetensors | SDXL |
| openai/clip-vit-large-patch14-336 | LLaVA CLIP |
| openai/clip-vit-large-patch14 | SDXL CLIP1 |
| open_clip_pytorch_model.bin | SDXL CLIP2 |You can obviously substitute the image name and tag with your own.
## Ports
| Connect Port | Internal Port | Description |
|--------------|---------------|----------------------|
| 3000 | 3001 | SUPIR |
| 7777 | 7777 | Code Server |
| 8888 | 8888 | Jupyter Lab |
| 2999 | 2999 | RunPod File Uploader |## Environment Variables
| Variable | Description | Default |
|----------------------|--------------------------------------------------|------------------------|
| JUPYTER_LAB_PASSWORD | Set a password for Jupyter lab | not set - no password |
| DISABLE_AUTOLAUNCH | Disable SUPIR from launching automatically | (not set) |
| DISABLE_SYNC | Disable syncing if using a RunPod network volume | (not set) |
| NO_GPU_OPTIMIZATION | Disable GPU optimization for A100/H100 | (not set) |## Logs
SUPIR creates a log file, and you can tail the log instead of
killing the service to view the logs.| Application | Log file |
|-------------|---------------------------|
| SUPIR | /workspace/logs/supir.log |For example:
```bash
tail -f /workspace/logs/supir.log
```## Community and Contributing
Pull requests and issues on [GitHub](https://github.com/ashleykleynhans/supir-docker)
are welcome. Bug fixes and new features are encouraged.## Appreciate my work?