ohayonguy
commited on
Commit
·
b3315f5
1
Parent(s):
c50d79a
fixing kdiff
Browse files
app.py
CHANGED
|
@@ -1,8 +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 natten
|
| 6 |
import spaces
|
| 7 |
import cv2
|
| 8 |
import gradio as gr
|
|
@@ -31,7 +30,7 @@ half = True if torch.cuda.is_available() else False
|
|
| 31 |
upsampler = RealESRGANer(scale=4, model_path=realesr_model_path, model=model, tile=0, tile_pad=10, pre_pad=0, half=half)
|
| 32 |
|
| 33 |
pmrf = MMSERectifiedFlow.from_pretrained('ohayonguy/PMRF_blind_face_image_restoration').to(device)
|
| 34 |
-
|
| 35 |
face_helper_dummy = FaceRestoreHelper(
|
| 36 |
1,
|
| 37 |
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'] = "1"
|
|
|
|
| 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 |
+
pmrf = torch.compile(pmrf, mode="reduce-overhead")
|
| 34 |
face_helper_dummy = FaceRestoreHelper(
|
| 35 |
1,
|
| 36 |
face_size=512,
|