From 94f810ca9775840378c613e5b60a1c95e651dbff Mon Sep 17 00:00:00 2001
From: kijai <40791699+kijai@users.noreply.github.com>
Date: Wed, 28 Feb 2024 21:20:34 +0200
Subject: [PATCH] Update README.md
---
README.md | 116 +++---------------------------------------------------
1 file changed, 5 insertions(+), 111 deletions(-)
diff --git a/README.md b/README.md
index 7a72e84..4abbc78 100644
--- a/README.md
+++ b/README.md
@@ -1,45 +1,10 @@
-## (CVPR2024) Scaling Up to Excellence: Practicing Model Scaling for Photo-Realistic Image Restoration In the Wild
+# ComfyUI SUPIR upscaler wrapper node
-> [[Paper](https://arxiv.org/abs/2401.13627)] [[Project Page](http://supir.xpixel.group/)] [Online Demo (Coming soon)]
-> Fanghua, Yu, [Jinjin Gu](https://www.jasongt.com/), Zheyuan Li, Jinfan Hu, Xiangtao Kong, [Xintao Wang](https://xinntao.github.io/), [Jingwen He](https://scholar.google.com.hk/citations?user=GUxrycUAAAAJ), [Yu Qiao](https://scholar.google.com.hk/citations?user=gFtI-8QAAAAJ), [Chao Dong](https://scholar.google.com.hk/citations?user=OSDCB0UAAAAJ)
-> Shenzhen Institute of Advanced Technology; Shanghai AI Laboratory; University of Sydney; The Hong Kong Polytechnic University; ARC Lab, Tencent PCG; The Chinese University of Hong Kong
-
-
-
-
-
-
----
-#### ⚠ Due to the large RAM (60G) and VRAM (30G x2) costs of SUPIR, we are working on the online demo releasing.
-
----
-## 🔧 Dependencies and Installation
-
-1. Clone repo
- ```bash
- git clone https://github.com/Fanghua-Yu/SUPIR.git
- cd SUPIR
- ```
-
-2. Install dependent packages
- ```bash
- conda create -n SUPIR python=3.8 -y
- conda activate SUPIR
- pip install --upgrade pip
- pip install -r requirements.txt
- ```
-
-3. Download Checkpoints
-
-For users who can connect to huggingface, please setting `LLAVA_CLIP_PATH, SDXL_CLIP1_PATH, SDXL_CLIP2_CKPT_PTH` in `CKPT_PTH.py` as `None`. These CLIPs will be downloaded automatically.
-
-#### Dependent Models
-* [SDXL CLIP Encoder-1](https://huggingface.co/openai/clip-vit-large-patch14)
-* [SDXL CLIP Encoder-2](https://huggingface.co/laion/CLIP-ViT-bigG-14-laion2B-39B-b160k)
-* [SDXL base 1.0_0.9vae](https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/blob/main/sd_xl_base_1.0_0.9vae.safetensors)
-* [LLaVA CLIP](https://huggingface.co/openai/clip-vit-large-patch14-336)
-* [LLaVA v1.5 13B](https://huggingface.co/liuhaotian/llava-v1.5-13b)
+## WORK IN PROGRESS
+might not work yet
+Original repo:
+https://github.com/Fanghua-Yu/SUPIR
#### Models we provided:
* `SUPIR-v0Q`: [Baidu Netdisk](https://pan.baidu.com/s/1lnefCZhBTeDWijqbj1jIyw?pwd=pjq6), [Google Drive](https://drive.google.com/drive/folders/1yELzm5SvAi9e7kPcO_jPp2XkTs4vK6aR?usp=sharing)
@@ -50,77 +15,6 @@ For users who can connect to huggingface, please setting `LLAVA_CLIP_PATH, SDXL_
Training with light degradation settings. Stage1 encoder of `SUPIR-v0F` remains more details when facing light degradations.
-4. Edit Custom Path for Checkpoints
- ```
- * [CKPT_PTH.py] --> LLAVA_CLIP_PATH, LLAVA_MODEL_PATH, SDXL_CLIP1_PATH, SDXL_CLIP2_CACHE_DIR
- * [options/SUPIR_v0.yaml] --> SDXL_CKPT, SUPIR_CKPT_Q, SUPIR_CKPT_F
- ```
----
-
-## ⚡ Quick Inference
-### Val Dataset
-RealPhoto60: [Baidu Netdisk](https://pan.baidu.com/s/1CJKsPGtyfs8QEVCQ97voBA?pwd=aocg), [Google Drive](https://drive.google.com/drive/folders/1yELzm5SvAi9e7kPcO_jPp2XkTs4vK6aR?usp=sharing)
-
-### Usage of SUPIR
-```Shell
-Usage:
--- python test.py [options]
--- python gradio_demo.py [interactive options]
-
---img_dir Input folder.
---save_dir Output folder.
---upscale Upsampling ratio of given inputs. Default: 1
---SUPIR_sign Model selection. Default: 'Q'; Options: ['F', 'Q']
---seed Random seed. Default: 1234
---min_size Minimum resolution of output images. Default: 1024
---edm_steps Numb of steps for EDM Sampling Scheduler. Default: 50
---s_stage1 Control Strength of Stage1. Default: -1 (negative means invalid)
---s_churn Original hy-param of EDM. Default: 5
---s_noise Original hy-param of EDM. Default: 1.003
---s_cfg Classifier-free guidance scale for prompts. Default: 7.5
---s_stage2 Control Strength of Stage2. Default: 1.0
---num_samples Number of samples for each input. Default: 1
---a_prompt Additive positive prompt for all inputs.
- Default: 'Cinematic, High Contrast, highly detailed, taken using a Canon EOS R camera,
- hyper detailed photo - realistic maximum detail, 32k, Color Grading, ultra HD, extreme
- meticulous detailing, skin pore detailing, hyper sharpness, perfect without deformations.'
---n_prompt Fixed negative prompt for all inputs.
- Default: 'painting, oil painting, illustration, drawing, art, sketch, oil painting,
- cartoon, CG Style, 3D render, unreal engine, blurring, dirty, messy, worst quality,
- low quality, frames, watermark, signature, jpeg artifacts, deformed, lowres, over-smooth'
---color_fix_type Color Fixing Type. Default: 'Wavelet'; Options: ['None', 'AdaIn', 'Wavelet']
---linear_CFG Linearly (with sigma) increase CFG from 'spt_linear_CFG' to s_cfg. Default: False
---linear_s_stage2 Linearly (with sigma) increase s_stage2 from 'spt_linear_s_stage2' to s_stage2. Default: False
---spt_linear_CFG Start point of linearly increasing CFG. Default: 1.0
---spt_linear_s_stage2 Start point of linearly increasing s_stage2. Default: 0.0
---ae_dtype Inference data type of AutoEncoder. Default: 'bf16'; Options: ['fp32', 'bf16']
---diff_dtype Inference data type of Diffusion. Default: 'fp16'; Options: ['fp32', 'fp16', 'bf16']
-```
-
-### Python Script
-```Shell
-# Seek for best quality for most cases
-CUDA_VISIBLE_DEVICES=0,1 python test.py --img_dir '/opt/data/private/LV_Dataset/DiffGLV-Test-All/RealPhoto60/LQ' --save_dir ./results-Q --SUPIR_sign Q --upscale 2
-# for light degradation and high fidelity
-CUDA_VISIBLE_DEVICES=0,1 python test.py --img_dir '/opt/data/private/LV_Dataset/DiffGLV-Test-All/RealPhoto60/LQ' --save_dir ./results-F --SUPIR_sign F --upscale 2 --s_cfg 4.0 --linear_CFG
-```
-
-### Gradio Demo
-```Shell
-CUDA_VISIBLE_DEVICES=0,1 python gradio_demo.py --ip 0.0.0.0 --port 6688 --use_image_slider --log_history
-
-# less VRAM & slower (12G for Diffusion, 16G for LLaVA)
-CUDA_VISIBLE_DEVICES=0,1 python gradio_demo.py --ip 0.0.0.0 --port 6688 --use_image_slider --log_history --loading_half_params --use_tile_vae --load_8bit_llava
-```
-
-
-
-
-
-### Online Demo (Coming Soon)
-
-
----
## BibTeX
@misc{yu2024scaling,