prithivMLmods commited on
Commit
a7bb47e
·
verified ·
1 Parent(s): a9b55ac

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -10,6 +10,7 @@ from typing import Any, Dict, List, Optional, Union
10
  import torch
11
  from PIL import Image
12
  import gradio as gr
 
13
 
14
  from diffusers import (
15
  DiffusionPipeline,
@@ -27,8 +28,6 @@ from huggingface_hub import (
27
 
28
  from diffusers.utils import load_image
29
 
30
- import spaces
31
-
32
  def calculate_shift(
33
  image_seq_len,
34
  base_seq_len: int = 256,
@@ -2147,7 +2146,7 @@ def update_selection(evt: gr.SelectData, width, height):
2147
  height,
2148
  )
2149
 
2150
- @spaces.GPU(duration=100)
2151
  def generate_image(prompt_mash, steps, seed, cfg_scale, width, height, lora_scale, progress):
2152
  pipe.to("cuda")
2153
  generator = torch.Generator(device="cuda").manual_seed(seed)
 
10
  import torch
11
  from PIL import Image
12
  import gradio as gr
13
+ import spaces
14
 
15
  from diffusers import (
16
  DiffusionPipeline,
 
28
 
29
  from diffusers.utils import load_image
30
 
 
 
31
  def calculate_shift(
32
  image_seq_len,
33
  base_seq_len: int = 256,
 
2146
  height,
2147
  )
2148
 
2149
+ @spaces.GPU(duration=99)
2150
  def generate_image(prompt_mash, steps, seed, cfg_scale, width, height, lora_scale, progress):
2151
  pipe.to("cuda")
2152
  generator = torch.Generator(device="cuda").manual_seed(seed)