Upload 21 files
Browse files- .gitattributes +8 -0
- assets/docs/installation_xOS.md +51 -0
- assets/docs/v1_models.md +6 -0
- assets/logo.png +0 -0
- assets/pipeline.png +0 -0
- assets/teaser.png +3 -0
- assets/visual_results/bfr1.png +0 -0
- assets/visual_results/bfr2.png +0 -0
- assets/visual_results/bfr4.png +0 -0
- assets/visual_results/bid1.png +0 -0
- assets/visual_results/bid2.png +0 -0
- assets/visual_results/bid3.png +0 -0
- assets/visual_results/bsr1.png +0 -0
- assets/visual_results/bsr2.png +0 -0
- assets/visual_results/bsr3.png +3 -0
- assets/visual_results/bsr4.png +3 -0
- assets/visual_results/bsr5.png +3 -0
- assets/visual_results/bsr6.png +3 -0
- assets/visual_results/bsr7.png +0 -0
- assets/visual_results/tiled_sampling.png +3 -0
- assets/visual_results/whole_image1.png +3 -0
- assets/visual_results/whole_image2.png +3 -0
.gitattributes
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
assets/teaser.png filter=lfs diff=lfs merge=lfs -text
|
2 |
+
assets/visual_results/bsr3.png filter=lfs diff=lfs merge=lfs -text
|
3 |
+
assets/visual_results/bsr4.png filter=lfs diff=lfs merge=lfs -text
|
4 |
+
assets/visual_results/bsr5.png filter=lfs diff=lfs merge=lfs -text
|
5 |
+
assets/visual_results/bsr6.png filter=lfs diff=lfs merge=lfs -text
|
6 |
+
assets/visual_results/tiled_sampling.png filter=lfs diff=lfs merge=lfs -text
|
7 |
+
assets/visual_results/whole_image1.png filter=lfs diff=lfs merge=lfs -text
|
8 |
+
assets/visual_results/whole_image2.png filter=lfs diff=lfs merge=lfs -text
|
assets/docs/installation_xOS.md
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Linux
|
2 |
+
Please follow the primary README.md of this repo.
|
3 |
+
|
4 |
+
# Windows
|
5 |
+
Windows users may stumble when installing the package `triton`.
|
6 |
+
You can choose to run on **CPU** without `xformers` and `triton` installed.
|
7 |
+
|
8 |
+
To use **CUDA**, please refer to [issue#24](https://github.com/XPixelGroup/DiffBIR/issues/24) to try solve the problem of `triton` installation.
|
9 |
+
|
10 |
+
# MacOS
|
11 |
+
<!-- Currenly only CPU device is supported to run DiffBIR on Apple Silicon since most GPU acceleration packages are compatible with CUDA only.
|
12 |
+
|
13 |
+
We are still trying to support MPS device. Stay tuned for our progress! -->
|
14 |
+
|
15 |
+
You can try to set up according to the following steps to use CPU or MPS device.
|
16 |
+
|
17 |
+
1. Install **torch (Preview/Nighly version)**.
|
18 |
+
|
19 |
+
```bash
|
20 |
+
# MPS acceleration is available on MacOS 12.3+
|
21 |
+
pip install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cpu
|
22 |
+
```
|
23 |
+
Check more details in [official document](https://pytorch.org/get-started/locally/).
|
24 |
+
|
25 |
+
2. Package `triton` and `xformers` is not needed since they work with CUDA. Remove the related packages.
|
26 |
+
|
27 |
+
Your requirements.txt should look like:
|
28 |
+
```bash
|
29 |
+
# requirements.txt
|
30 |
+
pytorch_lightning==1.4.2
|
31 |
+
einops
|
32 |
+
open-clip-torch
|
33 |
+
omegaconf
|
34 |
+
torchmetrics==0.6.0
|
35 |
+
opencv-python-headless
|
36 |
+
scipy
|
37 |
+
matplotlib
|
38 |
+
lpips
|
39 |
+
gradio
|
40 |
+
chardet
|
41 |
+
transformers
|
42 |
+
facexlib
|
43 |
+
```
|
44 |
+
|
45 |
+
```bash
|
46 |
+
pip install -r requirements.txt
|
47 |
+
```
|
48 |
+
|
49 |
+
3. [Run the inference script](https://github.com/XPixelGroup/DiffBIR#general_image_inference) and specify `--device cpu` or `--device mps`. Using MPS can accelarate your inference.
|
50 |
+
|
51 |
+
You can specify `--tiled` and related arguments to avoid OOM.
|
assets/docs/v1_models.md
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
| Model Name | Description | HuggingFace | BaiduNetdisk | OpenXLab |
|
2 |
+
| :--------- | :---------- | :---------- | :---------- | :---------- |
|
3 |
+
| general_swinir_v1.ckpt | Stage1 model (SwinIR) for general image restoration. | [download](https://huggingface.co/lxq007/DiffBIR/resolve/main/general_swinir_v1.ckpt) | [download](https://pan.baidu.com/s/1uvSvJgcoL_Knj0h22-9TvA?pwd=v3v6) (pwd: v3v6) | [download](https://download.openxlab.org.cn/models/linxinqi/DiffBIR/weight//diffbir_general_swinir_v1) |
|
4 |
+
| general_full_v1.ckpt | Full model for general image restoration. "Full" means it contains both the stage1 and stage2 model. | [download](https://huggingface.co/lxq007/DiffBIR/resolve/main/general_full_v1.ckpt) | [download](https://pan.baidu.com/s/1gLvW1nvkJStdVAKROqaYaA?pwd=86zi) (pwd: 86zi) | [download](https://download.openxlab.org.cn/models/linxinqi/DiffBIR/weight//diffbir_general_full_v1) |
|
5 |
+
| face_swinir_v1.ckpt | Stage1 model (SwinIR) for face restoration. | [download](https://huggingface.co/lxq007/DiffBIR/resolve/main/face_swinir_v1.ckpt) | [download](https://pan.baidu.com/s/1cnBBC8437BJiM3q6suaK8g?pwd=xk5u) (pwd: xk5u) | [download](https://download.openxlab.org.cn/models/linxinqi/DiffBIR/weight//diffbir_face_swinir_v1) |
|
6 |
+
| face_full_v1.ckpt | Full model for face restoration. | [download](https://huggingface.co/lxq007/DiffBIR/resolve/main/face_full_v1.ckpt) | [download](https://pan.baidu.com/s/1pc04xvQybkynRfzK5Y8K0Q?pwd=ov8i) (pwd: ov8i) | [download](https://download.openxlab.org.cn/models/linxinqi/DiffBIR/weight//diffbir_face_full_v1) |
|
assets/logo.png
ADDED
![]() |
assets/pipeline.png
ADDED
![]() |
assets/teaser.png
ADDED
![]() |
Git LFS Details
|
assets/visual_results/bfr1.png
ADDED
![]() |
assets/visual_results/bfr2.png
ADDED
![]() |
assets/visual_results/bfr4.png
ADDED
![]() |
assets/visual_results/bid1.png
ADDED
![]() |
assets/visual_results/bid2.png
ADDED
![]() |
assets/visual_results/bid3.png
ADDED
![]() |
assets/visual_results/bsr1.png
ADDED
![]() |
assets/visual_results/bsr2.png
ADDED
![]() |
assets/visual_results/bsr3.png
ADDED
![]() |
Git LFS Details
|
assets/visual_results/bsr4.png
ADDED
![]() |
Git LFS Details
|
assets/visual_results/bsr5.png
ADDED
![]() |
Git LFS Details
|
assets/visual_results/bsr6.png
ADDED
![]() |
Git LFS Details
|
assets/visual_results/bsr7.png
ADDED
![]() |
assets/visual_results/tiled_sampling.png
ADDED
![]() |
Git LFS Details
|
assets/visual_results/whole_image1.png
ADDED
![]() |
Git LFS Details
|
assets/visual_results/whole_image2.png
ADDED
![]() |
Git LFS Details
|