Phips commited on
Commit
d59e07b
Β·
verified Β·
1 Parent(s): 8f56ae0

add 2x OTF GAN (default), 4 models total

Browse files
Files changed (3) hide show
  1. README.md +3 -1
  2. __pycache__/app.cpython-312.pyc +0 -0
  3. app.py +5 -1
README.md CHANGED
@@ -18,7 +18,9 @@ of use*, not benchmark chasing: one file, one variant, and a checkpoint that
18
  converts cleanly to dynamic ONNX, TensorRT and ncnn β€” no fused/unfused pairs.
19
 
20
  - **2x / 4x release** β†’ for **clean** images.
21
- - **4x OTF GAN** β†’ for **degraded** images (blurry, noisy, JPEG-compressed).
 
 
22
 
23
  Models, ONNX/ncnn files, training configs and the architecture live at
24
  **[huggingface.co/Phips/NERVE](https://huggingface.co/Phips/NERVE)**.
 
18
  converts cleanly to dynamic ONNX, TensorRT and ncnn β€” no fused/unfused pairs.
19
 
20
  - **2x / 4x release** β†’ for **clean** images.
21
+ - **2x / 4x OTF GAN** β†’ for **degraded** images (blurry, noisy, JPEG-compressed).
22
+
23
+ Default is the **2x OTF GAN** (best all-round for degraded input); other models stay selectable.
24
 
25
  Models, ONNX/ncnn files, training configs and the architecture live at
26
  **[huggingface.co/Phips/NERVE](https://huggingface.co/Phips/NERVE)**.
__pycache__/app.cpython-312.pyc CHANGED
Binary files a/__pycache__/app.cpython-312.pyc and b/__pycache__/app.cpython-312.pyc differ
 
app.py CHANGED
@@ -19,6 +19,10 @@ DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu")
19
 
20
  REPO = "Phips/NERVE"
21
  MODELS: dict[str, tuple[str, int]] = {
 
 
 
 
22
  "NERVE 2x β€” release (clean input)": ("models/2x_NERVE_release.safetensors", 2),
23
  "NERVE 4x β€” release (clean input)": ("models/4x_NERVE_release.safetensors", 4),
24
  "NERVE 4x β€” OTF GAN (blurry / noisy / JPEG input)": (
@@ -97,7 +101,7 @@ with gr.Blocks(title="NERVE", theme=gr.themes.Soft()) as demo:
97
  inp = gr.Image(type="pil", label="Input image", height=320)
98
  model = gr.Dropdown(
99
  choices=list(MODELS),
100
- value=list(MODELS)[1],
101
  label="Model",
102
  )
103
  btn = gr.Button("Upscale", variant="primary")
 
19
 
20
  REPO = "Phips/NERVE"
21
  MODELS: dict[str, tuple[str, int]] = {
22
+ "NERVE 2x β€” OTF GAN (blurry / noisy / JPEG input)": (
23
+ "models/2x_NERVE_OTF_gan.safetensors",
24
+ 2,
25
+ ),
26
  "NERVE 2x β€” release (clean input)": ("models/2x_NERVE_release.safetensors", 2),
27
  "NERVE 4x β€” release (clean input)": ("models/4x_NERVE_release.safetensors", 4),
28
  "NERVE 4x β€” OTF GAN (blurry / noisy / JPEG input)": (
 
101
  inp = gr.Image(type="pil", label="Input image", height=320)
102
  model = gr.Dropdown(
103
  choices=list(MODELS),
104
+ value=list(MODELS)[0],
105
  label="Model",
106
  )
107
  btn = gr.Button("Upscale", variant="primary")