Spaces:
Running
on
Zero
Running
on
Zero
ohayonguy
commited on
Commit
•
6ee52df
1
Parent(s):
b3315f5
test
Browse files- app.py +2 -2
- requirements.txt +3 -3
app.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import os
|
2 |
if os.getenv('SPACES_ZERO_GPU') == "true":
|
3 |
os.environ['SPACES_ZERO_GPU'] = "1"
|
4 |
-
os.environ['K_DIFFUSION_USE_COMPILE'] = "
|
5 |
import spaces
|
6 |
import cv2
|
7 |
import gradio as gr
|
@@ -30,7 +30,7 @@ half = True if torch.cuda.is_available() else False
|
|
30 |
upsampler = RealESRGANer(scale=4, model_path=realesr_model_path, model=model, tile=0, tile_pad=10, pre_pad=0, half=half)
|
31 |
|
32 |
pmrf = MMSERectifiedFlow.from_pretrained('ohayonguy/PMRF_blind_face_image_restoration').to(device)
|
33 |
-
|
34 |
face_helper_dummy = FaceRestoreHelper(
|
35 |
1,
|
36 |
face_size=512,
|
|
|
1 |
import os
|
2 |
if os.getenv('SPACES_ZERO_GPU') == "true":
|
3 |
os.environ['SPACES_ZERO_GPU'] = "1"
|
4 |
+
os.environ['K_DIFFUSION_USE_COMPILE'] = "0"
|
5 |
import spaces
|
6 |
import cv2
|
7 |
import gradio as gr
|
|
|
30 |
upsampler = RealESRGANer(scale=4, model_path=realesr_model_path, model=model, tile=0, tile_pad=10, pre_pad=0, half=half)
|
31 |
|
32 |
pmrf = MMSERectifiedFlow.from_pretrained('ohayonguy/PMRF_blind_face_image_restoration').to(device)
|
33 |
+
|
34 |
face_helper_dummy = FaceRestoreHelper(
|
35 |
1,
|
36 |
face_size=512,
|
requirements.txt
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
-
-f https://download.pytorch.org/whl/
|
2 |
torch==2.4.0
|
3 |
-
-f https://download.pytorch.org/whl/
|
4 |
torchvision==0.19.0
|
5 |
realesrgan==0.2.5
|
6 |
numpy
|
@@ -22,4 +22,4 @@ timm
|
|
22 |
torchmetrics
|
23 |
torch-fidelity==0.3.0
|
24 |
-f https://shi-labs.com/natten/wheels/
|
25 |
-
natten==0.17.1+
|
|
|
1 |
+
-f https://download.pytorch.org/whl/cu121
|
2 |
torch==2.4.0
|
3 |
+
-f https://download.pytorch.org/whl/cu121
|
4 |
torchvision==0.19.0
|
5 |
realesrgan==0.2.5
|
6 |
numpy
|
|
|
22 |
torchmetrics
|
23 |
torch-fidelity==0.3.0
|
24 |
-f https://shi-labs.com/natten/wheels/
|
25 |
+
natten==0.17.1+torch240cu121
|