Update app.py
Browse files
app.py
CHANGED
@@ -29,6 +29,7 @@ pipe.to(device)
|
|
29 |
MAX_SEED = 2**32 - 1
|
30 |
MAX_IMAGE_SIZE = 1024
|
31 |
|
|
|
32 |
def generate_image(prompt, negative_prompt, seed, randomize_seed, width, height, guidance_scale, num_inference_steps):
|
33 |
if randomize_seed or seed == 0:
|
34 |
seed = torch.randint(0, MAX_SEED, (1,)).item()
|
|
|
29 |
MAX_SEED = 2**32 - 1
|
30 |
MAX_IMAGE_SIZE = 1024
|
31 |
|
32 |
+
@spaces.GPU
|
33 |
def generate_image(prompt, negative_prompt, seed, randomize_seed, width, height, guidance_scale, num_inference_steps):
|
34 |
if randomize_seed or seed == 0:
|
35 |
seed = torch.randint(0, MAX_SEED, (1,)).item()
|