Update app.py
Browse files
app.py
CHANGED
|
@@ -46,7 +46,7 @@ def load_lora_model(pipe, lora_model_path):
|
|
| 46 |
pipe = load_lora_model(pipe, lora_model_path)
|
| 47 |
|
| 48 |
# Use the @spaces.gpu decorator to ensure compatibility with GPU or CPU as needed
|
| 49 |
-
@spaces.
|
| 50 |
def generate(prompt, seed=None):
|
| 51 |
generator = torch.manual_seed(seed) if seed is not None else None
|
| 52 |
# Generate the image using the prompt
|
|
|
|
| 46 |
pipe = load_lora_model(pipe, lora_model_path)
|
| 47 |
|
| 48 |
# Use the @spaces.gpu decorator to ensure compatibility with GPU or CPU as needed
|
| 49 |
+
@spaces.GPU(duration=65) # This ensures GPU is allocated for 65 seconds
|
| 50 |
def generate(prompt, seed=None):
|
| 51 |
generator = torch.manual_seed(seed) if seed is not None else None
|
| 52 |
# Generate the image using the prompt
|