Spaces:
Running
on
Zero
Running
on
Zero
kayfahaarukku
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -18,7 +18,7 @@ pipe = StableDiffusionXLPipeline.from_pretrained(
|
|
18 |
pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
|
19 |
|
20 |
# Function to generate an image
|
21 |
-
@spaces.GPU
|
22 |
def generate_image(prompt, negative_prompt, use_defaults, resolution, guidance_scale, num_inference_steps, seed, randomize_seed, progress=gr.Progress()):
|
23 |
pipe.to('cuda') # Move the model to GPU when the function is called
|
24 |
|
|
|
18 |
pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
|
19 |
|
20 |
# Function to generate an image
|
21 |
+
@spaces.GPU # Adjust the duration as needed
|
22 |
def generate_image(prompt, negative_prompt, use_defaults, resolution, guidance_scale, num_inference_steps, seed, randomize_seed, progress=gr.Progress()):
|
23 |
pipe.to('cuda') # Move the model to GPU when the function is called
|
24 |
|