Awiny commited on
Commit
7712f1b
β€’
1 Parent(s): 51f8a02

fast process

Browse files
app.py CHANGED
@@ -72,6 +72,8 @@ def process_image(image_src, options=None, processor=None):
72
  <h3>Region Semantic</h3>
73
  <p>{region_semantic}</p>
74
  </div>
 
 
75
  <div style="flex: 1;">
76
  <h3>GPT4 Reasoning:</h3>
77
  <p>{gen_text}</p>
@@ -123,7 +125,7 @@ interface = gr.Interface(
123
  \n Twitter: https://twitter.com/awinyimgprocess/status/1646225454599372800?s=46&t=HvOe9T2n35iFuCHP5aIHpQ
124
  \n Since GPU is expensive, we use CPU for demo and not include semantic segment anything. Run code local with gpu or google colab we provided for fast speed.
125
  \n Ttext2image model is controlnet ( very slow in cpu(~2m)), which used canny edge as reference.
126
- \n To speed up, we generate image with small size 256, run the code local for high-quality sample.
127
  """
128
  )
129
 
 
72
  <h3>Region Semantic</h3>
73
  <p>{region_semantic}</p>
74
  </div>
75
+ </div>
76
+ <div style="display: flex; flex-wrap: wrap;">
77
  <div style="flex: 1;">
78
  <h3>GPT4 Reasoning:</h3>
79
  <p>{gen_text}</p>
 
125
  \n Twitter: https://twitter.com/awinyimgprocess/status/1646225454599372800?s=46&t=HvOe9T2n35iFuCHP5aIHpQ
126
  \n Since GPU is expensive, we use CPU for demo and not include semantic segment anything. Run code local with gpu or google colab we provided for fast speed.
127
  \n Ttext2image model is controlnet ( very slow in cpu(~2m)), which used canny edge as reference.
128
+ \n To speed up, we generate image with small size 384, run the code local for high-quality sample.
129
  """
130
  )
131
 
utils/__pycache__/util.cpython-38.pyc CHANGED
Binary files a/utils/__pycache__/util.cpython-38.pyc and b/utils/__pycache__/util.cpython-38.pyc differ
 
utils/util.py CHANGED
@@ -15,7 +15,7 @@ def read_image_width_height(image_path):
15
  return width, height
16
 
17
 
18
- def resize_long_edge(image, target_size=256):
19
  # Calculate the aspect ratio
20
  width, height = image.size
21
  aspect_ratio = float(width) / float(height)
 
15
  return width, height
16
 
17
 
18
+ def resize_long_edge(image, target_size=384):
19
  # Calculate the aspect ratio
20
  width, height = image.size
21
  aspect_ratio = float(width) / float(height)