Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -42,6 +42,7 @@ MAX_IMAGE_SIZE = 2048
|
|
42 |
# Inference function with GPU access
|
43 |
@spaces.GPU()
|
44 |
def infer(prompt, negative_prompt="", seed=42, randomize_seed=False, width=1024, height=1024, num_inference_steps=16, guidance_scale=3.5, progress=gr.Progress(track_tqdm=True)):
|
|
|
45 |
try:
|
46 |
if randomize_seed:
|
47 |
seed = random.randint(0, MAX_SEED)
|
|
|
42 |
# Inference function with GPU access
|
43 |
@spaces.GPU()
|
44 |
def infer(prompt, negative_prompt="", seed=42, randomize_seed=False, width=1024, height=1024, num_inference_steps=16, guidance_scale=3.5, progress=gr.Progress(track_tqdm=True)):
|
45 |
+
pipe.to("cuda")
|
46 |
try:
|
47 |
if randomize_seed:
|
48 |
seed = random.randint(0, MAX_SEED)
|