Spaces:
Paused
Paused
Commit
•
ef1c0b9
1
Parent(s):
099c99b
Update app.py
Browse files
app.py
CHANGED
@@ -3,6 +3,7 @@ import numpy as np
|
|
3 |
import random
|
4 |
from diffusers import AuraFlowPipeline
|
5 |
import torch
|
|
|
6 |
|
7 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
8 |
|
@@ -19,6 +20,7 @@ else:
|
|
19 |
MAX_SEED = np.iinfo(np.int32).max
|
20 |
MAX_IMAGE_SIZE = 1024
|
21 |
|
|
|
22 |
def infer(prompt, negative_prompt, seed, randomize_seed, width, height, guidance_scale, num_inference_steps):
|
23 |
|
24 |
if randomize_seed:
|
|
|
3 |
import random
|
4 |
from diffusers import AuraFlowPipeline
|
5 |
import torch
|
6 |
+
import spaces
|
7 |
|
8 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
9 |
|
|
|
20 |
MAX_SEED = np.iinfo(np.int32).max
|
21 |
MAX_IMAGE_SIZE = 1024
|
22 |
|
23 |
+
@spaces.GPU
|
24 |
def infer(prompt, negative_prompt, seed, randomize_seed, width, height, guidance_scale, num_inference_steps):
|
25 |
|
26 |
if randomize_seed:
|