cjwbw / supir

Practicing Model Scaling for Photo-Realistic Image Restoration In the Wild. This version uses LLaVA-13b for captioning.

  • Public
  • 185.8K runs
  • A100 (80GB)
  • GitHub
  • Paper
  • License

Input

image
string

Choose a model. SUPIR-v0Q is the default training settings with paper. SUPIR-v0F is high generalization and high image quality in most cases. Training with light degradation settings. Stage1 encoder of SUPIR-v0F remains more details when facing light degradations.

Default: "SUPIR-v0Q"

*file

Low quality input image.

integer

Upsampling ratio of given inputs.

Default: 1

number

Minimum resolution of output images.

Default: 1024

integer
(minimum: 1, maximum: 500)

Number of steps for EDM Sampling Schedule.

Default: 50

boolean

Use LLaVA model to get captions.

Default: true

string
Shift + Return to add a new line

Additive positive prompt for the 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."

string
Shift + Return to add a new line

Negative prompt for the 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"

string

Color Fixing Type..

Default: "Wavelet"

integer

Control Strength of Stage1 (negative means invalid).

Default: -1

number

Original churn hy-param of EDM.

Default: 5

number

Original noise hy-param of EDM.

Default: 1.003

number
(minimum: 1, maximum: 20)

Classifier-free guidance scale for prompts.

Default: 7.5

number

Control Strength of Stage2.

Default: 1

boolean

Linearly (with sigma) increase CFG from 'spt_linear_CFG' to s_cfg.

Default: false

boolean

Linearly (with sigma) increase s_stage2 from 'spt_linear_s_stage2' to s_stage2.

Default: false

number

Start point of linearly increasing CFG.

Default: 1

number

Start point of linearly increasing s_stage2.

Default: 0

integer

Random seed. Leave blank to randomize the seed

Output

We were unable to load these images. Please make sure the URLs are valid.

{
  "input": "https://replicate.delivery/pbxt/KSFJ6sJWyEiPWysywNsAr2enzigJA3NZpG4YMrxrSFEIEShi/05.png",
  "outut": "https://replicate.delivery/pbxt/tsZTAUpHvDorAJcaZDd1BpYsBcijNfwhXfDUCAIvrqTsdnZSA/out.png"
}
Generated in

Run time and cost

This model costs approximately $0.41 to run on Replicate, or 2 runs per $1, but this varies depending on your inputs. It is also open source and you can run it on your own computer with Docker.

This model runs on Nvidia A100 (80GB) GPU hardware. Predictions typically complete within 5 minutes. The predict time for this model varies significantly based on the inputs.

Readme

Scaling Up to Excellence: Practicing Model Scaling for Photo-Realistic Image Restoration In the Wild

NOTE: Due to the memory requirement for LLaVA-13b and both SUPIR-v0F and SUPIR-v0Q, this model is posted on 80G A100. To run on 40G A40, try models https://replicate.com/cjwbw/supir-v0q or https://replicate.com/cjwbw/supir-v0f that do not include LLaVA-13b.

  • SUPIR-v0Q: Default training settings with paper. High generalization and high image quality in most cases.
  • SUPIR-v0F: Training with light degradation settings. Stage1 encoder of SUPIR-v0F remains more details when facing light degradations.

BibTeX

@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}
}