[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-71156":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":23,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":35,"readmeContent":36,"aiSummary":37,"trendingCount":16,"starSnapshotCount":16,"syncStatus":38,"lastSyncTime":39,"discoverSource":40},71156,"SUPIR","Fanghua-Yu\u002FSUPIR","Fanghua-Yu","SUPIR aims at developing Practical Algorithms for Photo-Realistic Image Restoration In the Wild. Our new online demo is also released at suppixel.ai.","http:\u002F\u002Fsupir.xpixel.group\u002F",null,"Python",5574,468,64,110,0,8,21,46,24,95.11,"Other",false,"master",[26,27,28,29,30,31,32,33,34],"deep-learning","diffusion-models","llava","pytorch","pytorch-lightning","restoration","sdxl","stable-diffusion","super-resolution","2026-06-12 04:00:59","## (CVPR2024) Scaling Up to Excellence: Practicing Model Scaling for Photo-Realistic Image Restoration In the Wild\n\n> [[Paper](https:\u002F\u002Farxiv.org\u002Fabs\u002F2401.13627)] &emsp; [[Project Page](http:\u002F\u002Fsupir.xpixel.group\u002F)] &emsp; [[Online App]](https:\u002F\u002Fsupir.suppixel.ai\u002Fhome) \u003Cbr>\n> Fanghua, Yu, [Jinjin Gu](https:\u002F\u002Fwww.jasongt.com\u002F), Zheyuan Li, Jinfan Hu, Xiangtao Kong, [Xintao Wang](https:\u002F\u002Fxinntao.github.io\u002F), [Jingwen He](https:\u002F\u002Fscholar.google.com.hk\u002Fcitations?user=GUxrycUAAAAJ), [Yu Qiao](https:\u002F\u002Fscholar.google.com.hk\u002Fcitations?user=gFtI-8QAAAAJ), [Chao Dong](https:\u002F\u002Fscholar.google.com.hk\u002Fcitations?user=OSDCB0UAAAAJ) \u003Cbr>\n> 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 \u003Cbr>\n\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"assets\u002Fteaser.png\">\n\u003C\u002Fp>\n\n---\n#### 🚀 We're thrilled to announce the official launch of SupPixel AI! Experience the next level of image processing and upscaling with our cutting-edge AI technology based on SUPIR. Explore now at [suppixel.ai](https:\u002F\u002Fsupir.suppixel.ai\u002Fhome).\n\n---\n## 🔧 Dependencies and Installation\n\n1. Clone repo\n    ```bash\n    git clone https:\u002F\u002Fgithub.com\u002FFanghua-Yu\u002FSUPIR.git\n    cd SUPIR\n    ```\n\n2. Install dependent packages\n    ```bash\n    conda create -n SUPIR python=3.8 -y\n    conda activate SUPIR\n    pip install --upgrade pip\n    pip install -r requirements.txt\n    ```\n\n3. Download Checkpoints\n\nFor 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. \n\n#### Dependent Models\n* [SDXL CLIP Encoder-1](https:\u002F\u002Fhuggingface.co\u002Fopenai\u002Fclip-vit-large-patch14)\n* [SDXL CLIP Encoder-2](https:\u002F\u002Fhuggingface.co\u002Flaion\u002FCLIP-ViT-bigG-14-laion2B-39B-b160k)\n* [SDXL base 1.0_0.9vae](https:\u002F\u002Fhuggingface.co\u002Fstabilityai\u002Fstable-diffusion-xl-base-1.0\u002Fblob\u002Fmain\u002Fsd_xl_base_1.0_0.9vae.safetensors)\n* [LLaVA CLIP](https:\u002F\u002Fhuggingface.co\u002Fopenai\u002Fclip-vit-large-patch14-336)\n* [LLaVA v1.5 13B](https:\u002F\u002Fhuggingface.co\u002Fliuhaotian\u002Fllava-v1.5-13b)\n* (optional) [Juggernaut-XL_v9_RunDiffusionPhoto_v2](https:\u002F\u002Fhuggingface.co\u002FRunDiffusion\u002FJuggernaut-XL-v9\u002Fblob\u002Fmain\u002FJuggernaut-XL_v9_RunDiffusionPhoto_v2.safetensors)\n  * Replacement of `SDXL base 1.0_0.9vae` for Photo Realistic\n* (optional) [Juggernaut_RunDiffusionPhoto2_Lightning_4Steps](https:\u002F\u002Fhuggingface.co\u002FRunDiffusion\u002FJuggernaut-XL-Lightning\u002Fblob\u002Fmain\u002FJuggernaut_RunDiffusionPhoto2_Lightning_4Steps.safetensors)\n  * Distilling model used in `SUPIR_v0_Juggernautv9_lightning.yaml`\n\n\n#### Models we provided:\n* `SUPIR-v0Q`: [Baidu Netdisk](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1lnefCZhBTeDWijqbj1jIyw?pwd=pjq6), [Google Drive](https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F1yELzm5SvAi9e7kPcO_jPp2XkTs4vK6aR?usp=sharing)\n    \n    Default training settings with paper. High generalization and high image quality in most cases.\n\n* `SUPIR-v0F`: [Baidu Netdisk](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1AECN8NjiVuE3hvO8o-Ua6A?pwd=k2uz), [Google Drive](https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F1yELzm5SvAi9e7kPcO_jPp2XkTs4vK6aR?usp=sharing)\n\n    Training with light degradation settings. Stage1 encoder of `SUPIR-v0F` remains more details when facing light degradations.\n\n4. Edit Custom Path for Checkpoints\n    ```\n    * [CKPT_PTH.py] --> LLAVA_CLIP_PATH, LLAVA_MODEL_PATH, SDXL_CLIP1_PATH, SDXL_CLIP2_CACHE_DIR \n    * [options\u002FSUPIR_v0.yaml] --> SDXL_CKPT, SUPIR_CKPT_Q, SUPIR_CKPT_F\n    ```\n---\n\n## ⚡ Quick Inference\n### Val Dataset\nRealPhoto60: [Baidu Netdisk](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1CJKsPGtyfs8QEVCQ97voBA?pwd=aocg), [Google Drive](https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F1yELzm5SvAi9e7kPcO_jPp2XkTs4vK6aR?usp=sharing)\n\n### Usage of SUPIR\n```Shell\nUsage: \n-- python test.py [options] \n-- python gradio_demo.py [interactive options]\n\n--img_dir                Input folder.\n--save_dir               Output folder.\n--upscale                Upsampling ratio of given inputs. Default: 1\n--SUPIR_sign             Model selection. Default: 'Q'; Options: ['F', 'Q']\n--seed                   Random seed. Default: 1234\n--min_size               Minimum resolution of output images. Default: 1024\n--edm_steps              Numb of steps for EDM Sampling Scheduler. Default: 50\n--s_stage1               Control Strength of Stage1. Default: -1 (negative means invalid)\n--s_churn                Original hy-param of EDM. Default: 5\n--s_noise                Original hy-param of EDM. Default: 1.01\n--s_cfg                  Classifier-free guidance scale for prompts. Default: 4.0\n--s_stage2               Control Strength of Stage2. Default: 1.0\n--num_samples            Number of samples for each input. Default: 1\n--a_prompt               Additive positive prompt for all inputs. \n    Default: 'Cinematic, High Contrast, highly detailed, taken using a Canon EOS R camera, \n    hyper detailed photo - realistic maximum detail, 32k, Color Grading, ultra HD, extreme\n     meticulous detailing, skin pore detailing, hyper sharpness, perfect without deformations.'\n--n_prompt               Fixed negative prompt for all inputs. \n    Default: 'painting, oil painting, illustration, drawing, art, sketch, oil painting, \n    cartoon, CG Style, 3D render, unreal engine, blurring, dirty, messy, worst quality, \n    low quality, frames, watermark, signature, jpeg artifacts, deformed, lowres, over-smooth'\n--color_fix_type         Color Fixing Type. Default: 'Wavelet'; Options: ['None', 'AdaIn', 'Wavelet']\n--linear_CFG             Linearly (with sigma) increase CFG from 'spt_linear_CFG' to s_cfg. Default: True\n--linear_s_stage2        Linearly (with sigma) increase s_stage2 from 'spt_linear_s_stage2' to s_stage2. Default: False\n--spt_linear_CFG         Start point of linearly increasing CFG. Default: 1.0\n--spt_linear_s_stage2    Start point of linearly increasing s_stage2. Default: 0.0\n--ae_dtype               Inference data type of AutoEncoder. Default: 'bf16'; Options: ['fp32', 'bf16']\n--diff_dtype             Inference data type of Diffusion. Default: 'fp16'; Options: ['fp32', 'fp16', 'bf16']\n```\n\n### Empirical Hyperparameters Settings\n* The parameters listed generally have significant impact on the final image quality and appearance.\n\n1. s_stage2 adjustment:\n\n    Option 0: s_stage2 = 1.0 (higher fidelity, potentially lower visual quality)\n\n    Option 1: s_stage2 = 0.93 (higher visual quality, potentially lower fidelity)\n\n2. Quality-oriented settings (higher visual quality, potentially lower fidelity):\n\n    s_cfg = 6.0, spt_linear_CFG = 3.0, s_noise = 1.02\n\n3. Fidelity-oriented settings (closer to original input fidelity, may sacrifice some visual appeal):\n\n    s_cfg = 4.0, spt_linear_CFG = 1.0, s_noise = 1.01\n\n### Python Script\nExamples:\n```Shell\n# Seek for best quality for most cases\nCUDA_VISIBLE_DEVICES=0,1 python test.py --img_dir '\u002Fopt\u002Fdata\u002Fprivate\u002FLV_Dataset\u002FDiffGLV-Test-All\u002FRealPhoto60\u002FLQ' --save_dir .\u002Fresults-Q --SUPIR_sign Q --upscale 2\n# for light degradation and high fidelity\nCUDA_VISIBLE_DEVICES=0,1 python test.py --img_dir '\u002Fopt\u002Fdata\u002Fprivate\u002FLV_Dataset\u002FDiffGLV-Test-All\u002FRealPhoto60\u002FLQ' --save_dir .\u002Fresults-F --SUPIR_sign F --upscale 2\n```\n\n### Gradio Demo\n```Shell\nCUDA_VISIBLE_DEVICES=0,1 python gradio_demo.py --ip 0.0.0.0 --port 6688 --use_image_slider --log_history\n\n# Juggernaut_RunDiffusionPhoto2_Lightning_4Steps and DPM++ M2 SDE Karras for fast sampling\nCUDA_VISIBLE_DEVICES=0,1 python gradio_demo.py --ip 0.0.0.0 --port 6688 --use_image_slider --log_history --opt options\u002FSUPIR_v0_Juggernautv9_lightning.yaml\n\n# less VRAM & slower (12G for Diffusion, 16G for LLaVA)\nCUDA_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\n```\n\u003Cp align=\"center\">\n  \u003Cimg src=\"assets\u002FDemoGuide.png\">\n\u003C\u002Fp>\n\n\n### Online App\n\nWe've just launched [SupPixel AI](https:\u002F\u002Fsupir.suppixel.ai\u002Fhome), an easy-to-use tool designed to help with high-quality image processing and upscaling. It builds on SUPIR. Whether you’re into photography, digital art, or just love playing around with image enhancement, we’d love for you to check it out.~\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"assets\u002FAPP.png\">\n\u003C\u002Fp>\n\n\n---\n\n## BibTeX\n    @misc{yu2024scaling,\n      title={Scaling Up to Excellence: Practicing Model Scaling for Photo-Realistic Image Restoration In the Wild}, \n      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},\n      year={2024},\n      eprint={2401.13627},\n      archivePrefix={arXiv},\n      primaryClass={cs.CV}\n    }\n\n---\n\n## 📧 Contact\nIf you have any question, please email `fanghuayu96@gmail.com` or `jinjin.gu@suppixel.ai`.\n\n---\n## Non-Commercial Use Only Declaration\nThe SUPIR (\"Software\") is made available for use, reproduction, and distribution strictly for non-commercial purposes. For the purposes of this declaration, \"non-commercial\" is defined as not primarily intended for or directed towards commercial advantage or monetary compensation.\n\nBy using, reproducing, or distributing the Software, you agree to abide by this restriction and not to use the Software for any commercial purposes without obtaining prior written permission from Dr. Jinjin Gu.\n\nThis declaration does not in any way limit the rights under any open source license that may apply to the Software; it solely adds a condition that the Software shall not be used for commercial purposes.\n\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nFor inquiries or to obtain permission for commercial use, please contact Dr. Jinjin Gu (jinjin.gu@suppixel.ai).\n","SUPIR 是一个专注于开发适用于野外环境的高保真图像恢复实用算法的项目。它利用深度学习技术，特别是扩散模型和PyTorch框架，实现了照片级真实感的图像修复与超分辨率处理。该项目支持多种先进的AI模型，包括SDXL、LLaVA等，并通过PyTorch Lightning简化了训练流程。适合需要高质量图像恢复的应用场景，如摄影后期处理、历史照片修复以及任何要求图像细节丰富的领域。用户可以通过提供的在线演示平台suppixel.ai体验其功能。",2,"2026-06-11 03:36:09","high_star"]