Spaces:
Runtime error
Runtime error
cocktailpeanut
commited on
Commit
•
ea02acf
1
Parent(s):
1f688c5
update
Browse files
app.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import gradio as gr
|
2 |
import numpy as np
|
3 |
import random
|
4 |
-
import spaces
|
5 |
import torch
|
6 |
import devicetorch
|
7 |
from diffusers import DiffusionPipeline
|
@@ -22,7 +22,7 @@ pipe = DiffusionPipeline.from_pretrained("cocktailpeanut/xulf-dev", torch_dtype=
|
|
22 |
MAX_SEED = np.iinfo(np.int32).max
|
23 |
MAX_IMAGE_SIZE = 2048
|
24 |
|
25 |
-
|
26 |
def infer(prompt, seed=42, randomize_seed=False, width=1024, height=1024, num_inference_steps=4, progress=gr.Progress(track_tqdm=True)):
|
27 |
if randomize_seed:
|
28 |
seed = random.randint(0, MAX_SEED)
|
|
|
1 |
import gradio as gr
|
2 |
import numpy as np
|
3 |
import random
|
4 |
+
#import spaces
|
5 |
import torch
|
6 |
import devicetorch
|
7 |
from diffusers import DiffusionPipeline
|
|
|
22 |
MAX_SEED = np.iinfo(np.int32).max
|
23 |
MAX_IMAGE_SIZE = 2048
|
24 |
|
25 |
+
#@spaces.GPU()
|
26 |
def infer(prompt, seed=42, randomize_seed=False, width=1024, height=1024, num_inference_steps=4, progress=gr.Progress(track_tqdm=True)):
|
27 |
if randomize_seed:
|
28 |
seed = random.randint(0, MAX_SEED)
|