Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,7 +5,7 @@ from diffusers import AutoencoderKL, EulerDiscreteScheduler, UNet2DConditionMode
|
|
| 5 |
from esrgan_model import UpscalerESRGAN
|
| 6 |
import gradio as gr
|
| 7 |
from huggingface_hub import hf_hub_download
|
| 8 |
-
import spaces
|
| 9 |
import torch
|
| 10 |
import torch.nn as nn
|
| 11 |
from torchvision.io import read_image
|
|
@@ -92,7 +92,7 @@ torch.cuda.empty_cache()
|
|
| 92 |
|
| 93 |
|
| 94 |
# Define image generation function
|
| 95 |
-
@spaces.GPU(duration=10)
|
| 96 |
@torch.no_grad()
|
| 97 |
def generate_image(
|
| 98 |
input_image, seed: int = 42, guidance_scale: float = 2.0, num_inference_steps: int = 50, is_upscale: bool = False
|
|
|
|
| 5 |
from esrgan_model import UpscalerESRGAN
|
| 6 |
import gradio as gr
|
| 7 |
from huggingface_hub import hf_hub_download
|
| 8 |
+
# import spaces
|
| 9 |
import torch
|
| 10 |
import torch.nn as nn
|
| 11 |
from torchvision.io import read_image
|
|
|
|
| 92 |
|
| 93 |
|
| 94 |
# Define image generation function
|
| 95 |
+
# @spaces.GPU(duration=10)
|
| 96 |
@torch.no_grad()
|
| 97 |
def generate_image(
|
| 98 |
input_image, seed: int = 42, guidance_scale: float = 2.0, num_inference_steps: int = 50, is_upscale: bool = False
|