Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
import os
|
2 |
import gradio as gr
|
3 |
import json
|
|
|
4 |
import logging
|
5 |
import torch
|
6 |
from PIL import Image
|
@@ -98,6 +99,7 @@ def load_fast_model():
|
|
98 |
return pipe, config
|
99 |
|
100 |
# Generate image
|
|
|
101 |
def generate_image(prompt, resolution, seed, guidance_scale, num_inference_steps):
|
102 |
global pipe, MODEL_CONFIG
|
103 |
if pipe is None:
|
|
|
1 |
import os
|
2 |
import gradio as gr
|
3 |
import json
|
4 |
+
import spaces
|
5 |
import logging
|
6 |
import torch
|
7 |
from PIL import Image
|
|
|
99 |
return pipe, config
|
100 |
|
101 |
# Generate image
|
102 |
+
@spaces.GPU
|
103 |
def generate_image(prompt, resolution, seed, guidance_scale, num_inference_steps):
|
104 |
global pipe, MODEL_CONFIG
|
105 |
if pipe is None:
|