feat: ZeroGPU implementation
Browse files
app.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
from huggingface_hub import hf_hub_download
|
| 3 |
|
|
@@ -79,6 +80,7 @@ numgens = 1
|
|
| 79 |
# StableDiffusion
|
| 80 |
pipe = StableDiffusionPipeline.from_pretrained('CompVis/stable-diffusion-v1-4').to('cuda')
|
| 81 |
|
|
|
|
| 82 |
def generate_image(input_img):
|
| 83 |
|
| 84 |
# Inverse Cooking
|
|
|
|
| 1 |
+
import spaces
|
| 2 |
import gradio as gr
|
| 3 |
from huggingface_hub import hf_hub_download
|
| 4 |
|
|
|
|
| 80 |
# StableDiffusion
|
| 81 |
pipe = StableDiffusionPipeline.from_pretrained('CompVis/stable-diffusion-v1-4').to('cuda')
|
| 82 |
|
| 83 |
+
@spaces.GPU
|
| 84 |
def generate_image(input_img):
|
| 85 |
|
| 86 |
# Inverse Cooking
|