Yaron Koresh commited on
Commit
1b89f55
·
verified ·
1 Parent(s): 74a072c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -11,7 +11,7 @@ from pathos.multiprocessing import ProcessingPool as ProcessPoolExecutor
11
  import requests
12
  from lxml.html import fromstring
13
 
14
- pool = ProcessPoolExecutor(16)
15
  pool.__enter__()
16
 
17
  #model_id = "runwayml/stable-diffusion-v1-5"
@@ -57,13 +57,15 @@ def generate_random_string(length):
57
  characters = string.ascii_letters + string.digits
58
  return ''.join(random.choice(characters) for _ in range(length))
59
 
60
- @spaces.GPU(duration=12)
61
  def infer(prompt):
62
  name = generate_random_string(12)+".png"
63
  english_prompt = f'TRUE {translate(prompt,"english").upper()}:'
64
  print(f'Final prompt: {english_prompt}')
65
  image = pipe(
66
  english_prompt,
 
 
67
  negative_prompt="",
68
  num_inference_steps=50,
69
  guidance_scale=9.0
 
11
  import requests
12
  from lxml.html import fromstring
13
 
14
+ pool = ProcessPoolExecutor(64)
15
  pool.__enter__()
16
 
17
  #model_id = "runwayml/stable-diffusion-v1-5"
 
57
  characters = string.ascii_letters + string.digits
58
  return ''.join(random.choice(characters) for _ in range(length))
59
 
60
+ @spaces.GPU(duration=120)
61
  def infer(prompt):
62
  name = generate_random_string(12)+".png"
63
  english_prompt = f'TRUE {translate(prompt,"english").upper()}:'
64
  print(f'Final prompt: {english_prompt}')
65
  image = pipe(
66
  english_prompt,
67
+ height=4096,
68
+ width=4096,
69
  negative_prompt="",
70
  num_inference_steps=50,
71
  guidance_scale=9.0