Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -3,13 +3,11 @@ from PIL import Image
|
|
3 |
import gradio as gr
|
4 |
import os
|
5 |
|
6 |
-
|
7 |
-
os.system("ls")
|
8 |
-
from KandiSuperRes import sr_pipeline
|
9 |
|
10 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
11 |
-
sr_pipe2x =
|
12 |
-
sr_pipe4x =
|
13 |
|
14 |
|
15 |
def inference(image, size):
|
|
|
3 |
import gradio as gr
|
4 |
import os
|
5 |
|
6 |
+
from KandiSuperRes import get_SR_pipeline
|
|
|
|
|
7 |
|
8 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
9 |
+
sr_pipe2x = get_SR_pipeline(device=device, fp16=True, flash=True, scale=2)
|
10 |
+
sr_pipe4x = get_SR_pipeline(device=device, fp16=True, flash=True, scale=4)
|
11 |
|
12 |
|
13 |
def inference(image, size):
|