[PAPER] [項目頁面] [在線應用程序]
Fanghua,Yu,Jinjin Gu,Zheyuan Li,Jinfan Hu,Xiangtao Kong,Xintao Wang,Jingwen He,Yu Qiao,Chao Dong
深圳先進技術研究所;上海AI實驗室;悉尼大學;香港理工大學;弧實驗室,騰訊PCG;香港中國大學

克隆回購
git clone https://github.com/Fanghua-Yu/SUPIR.git
cd SUPIR安裝因軟件包
conda create -n SUPIR python=3.8 -y
conda activate SUPIR
pip install --upgrade pip
pip install -r requirements.txt下載檢查點
對於可以連接到HuggingFace的用戶,請設置LLAVA_CLIP_PATH, SDXL_CLIP1_PATH, SDXL_CLIP2_CKPT_PTH in CKPT_PTH.py in None 。這些剪輯將自動下載。
SDXL base 1.0_0.9vae的照片現實SUPIR_v0_Juggernautv9_lightning.yaml中使用的蒸餾模型 SUPIR-v0Q :Baidu NetDisk,Google Drive
默認培訓設置用紙張。在大多數情況下,高概括和高圖像質量。
SUPIR-v0F :Baidu NetDisk,Google Drive
通過輕度降解設置進行培訓。 SUPIR-v0F的階段1編碼器在面對光降解時仍然有更多細節。
* [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
REALPHOTO60:Baidu NetDisk,Google Drive
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 ' ] # 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_CFGCUDA_VISIBLE_DEVICES=0,1 python gradio_demo.py --ip 0.0.0.0 --port 6688 --use_image_slider --log_history
# Juggernaut_RunDiffusionPhoto2_Lightning_4Steps and DPM++ M2 SDE Karras for fast sampling
CUDA_VISIBLE_DEVICES=0,1 python gradio_demo.py --ip 0.0.0.0 --port 6688 --use_image_slider --log_history --opt options/SUPIR_v0_Juggernautv9_lightning.yaml
# 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
我們剛剛啟動了Suppixel AI,這是一種易於使用的工具,旨在幫助進行高質量的圖像處理和放大。它建立在Supir。無論您是喜歡攝影,數字藝術,還是喜歡使用圖像增強效果,我們都希望您檢查一下。

@misc{yu2024scaling,
title={Scaling Up to Excellence: Practicing Model Scaling for Photo-Realistic Image Restoration In the Wild},
author={Fanghua Yu and Jinjin Gu and Zheyuan Li and Jinfan Hu and Xiangtao Kong and Xintao Wang and Jingwen He and Yu Qiao and Chao Dong},
year={2024},
eprint={2401.13627},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
如果您有任何疑問,請發送電子郵件[email protected]或[email protected] 。
Supir(“軟件”)可用於嚴格出於非商業目的使用,複製和分銷。出於本聲明的目的,“非商業性”定義為主要是針對商業優勢或貨幣補償的主要目的。
通過使用,複製或分發軟件,即表示您同意遵守此限制,而不在未經Jinjin GU博士事先書面許可的情況下將軟件用於任何商業目的。
該聲明並非任何方式都限制可能適用於軟件的任何開源許可下的權利;它僅增加了該軟件不適用於商業目的的條件。
在任何情況下,作者或版權持有人都不應對任何索賠,損害賠償或其他責任責任,無論是在合同,侵權的訴訟中還是其他責任,是由軟件,使用或與軟件中的使用或其他交易有關的。
要查詢或獲得商業用途的許可,請聯繫Jinjin Gu博士([email protected])。