LPX55 commited on
Commit
9f0fb62
·
verified ·
1 Parent(s): 484dd05

Update app_v2.py

Browse files
Files changed (1) hide show
  1. app_v2.py +2 -2
app_v2.py CHANGED
@@ -41,7 +41,7 @@ pipe = FluxControlNetPipeline.from_pretrained(
41
  )
42
  pipe.to("cuda")
43
 
44
- @spaces.GPU()
45
  @torch.no_grad()
46
  def caption(input_image: Image.Image, prompt: str, temperature: float, top_p: float, max_new_tokens: int, log_prompt: bool) -> Generator[str, None, None]:
47
  torch.cuda.empty_cache()
@@ -85,7 +85,7 @@ def caption(input_image: Image.Image, prompt: str, temperature: float, top_p: fl
85
 
86
  #return output[0]
87
 
88
- @spaces.GPU()
89
  @torch.no_grad()
90
  def generate_image(prompt, scale, steps, control_image, controlnet_conditioning_scale, guidance_scale, seed, guidance_end):
91
  generator = torch.Generator().manual_seed(seed)
 
41
  )
42
  pipe.to("cuda")
43
 
44
+ @spaces.GPU(duration=10)
45
  @torch.no_grad()
46
  def caption(input_image: Image.Image, prompt: str, temperature: float, top_p: float, max_new_tokens: int, log_prompt: bool) -> Generator[str, None, None]:
47
  torch.cuda.empty_cache()
 
85
 
86
  #return output[0]
87
 
88
+ @spaces.GPU(duration=10)
89
  @torch.no_grad()
90
  def generate_image(prompt, scale, steps, control_image, controlnet_conditioning_scale, guidance_scale, seed, guidance_end):
91
  generator = torch.Generator().manual_seed(seed)