DonImages commited on
Commit
24d5f49
·
verified ·
1 Parent(s): 70c0c66

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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.gpu
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