Songwei Ge commited on
Commit
9ffa534
1 Parent(s): d0745b6
app.py CHANGED
@@ -143,28 +143,28 @@ def main():
143
  with gr.Row():
144
  examples = [
145
  [
146
- '{"ops":[{"insert":"a Gothic "},{"attributes":{"color":"#b26b00"},"insert":"church"},{"insert":" in a the sunset with a beautiful landscape in the background.\n"}]}',
147
  '',
148
  512,
149
  512,
150
  6,
151
  ],
152
  [
153
- '{"ops": [{"insert": "A pizza with "}, {"attributes": {"size": "50px"}, "insert": "pineapples"}, {"insert": ", pepperonis, and mushrooms on the top, 4k, photorealistic\n"}]}',
154
  'blurry, art, painting, rendering, drawing, sketch, ugly, duplicate, morbid, mutilated, mutated, deformed, disfigured low quality, worst quality',
155
  768,
156
  896,
157
  6,
158
  ],
159
  [
160
- '{"ops":[{"insert":"a "},{"attributes":{"font":"mirza"},"insert":"beautiful garden"},{"insert":" with a "},{"attributes":{"font":"roboto"},"insert":"snow mountain in the background"},{"insert":"\n"}]}',
161
  '',
162
  512,
163
  512,
164
  3,
165
  ],
166
  [
167
- '{"ops":[{"insert":"A close-up 4k dslr photo of a "},{"attributes":{"link":"A cat wearing sunglasses and a bandana around its neck."},"insert":"cat"},{"insert":" riding a scooter. Palm trees in the background.\n"}]}',
168
  '',
169
  512,
170
  512,
 
143
  with gr.Row():
144
  examples = [
145
  [
146
+ '{"ops":[{"insert":"a Gothic "},{"attributes":{"color":"#b26b00"},"insert":"church"},{"insert":" in a the sunset with a beautiful landscape in the background."}]}',
147
  '',
148
  512,
149
  512,
150
  6,
151
  ],
152
  [
153
+ '{"ops": [{"insert": "A pizza with "}, {"attributes": {"size": "50px"}, "insert": "pineapples"}, {"insert": ", pepperonis, and mushrooms on the top, 4k, photorealistic"}]}',
154
  'blurry, art, painting, rendering, drawing, sketch, ugly, duplicate, morbid, mutilated, mutated, deformed, disfigured low quality, worst quality',
155
  768,
156
  896,
157
  6,
158
  ],
159
  [
160
+ '{"ops":[{"insert":"a "},{"attributes":{"font":"mirza"},"insert":"beautiful garden"},{"insert":" with a "},{"attributes":{"font":"roboto"},"insert":"snow mountain in the background"},{"insert":""}]}',
161
  '',
162
  512,
163
  512,
164
  3,
165
  ],
166
  [
167
+ '{"ops":[{"insert":"A close-up 4k dslr photo of a "},{"attributes":{"link":"A cat wearing sunglasses and a bandana around its neck."},"insert":"cat"},{"insert":" riding a scooter. Palm trees in the background."}]}',
168
  '',
169
  512,
170
  512,
utils/__pycache__/attention_utils.cpython-38.pyc CHANGED
Binary files a/utils/__pycache__/attention_utils.cpython-38.pyc and b/utils/__pycache__/attention_utils.cpython-38.pyc differ
 
utils/__pycache__/richtext_utils.cpython-38.pyc CHANGED
Binary files a/utils/__pycache__/richtext_utils.cpython-38.pyc and b/utils/__pycache__/richtext_utils.cpython-38.pyc differ
 
utils/attention_utils.py CHANGED
@@ -82,9 +82,6 @@ def plot_attention_maps(atten_map_list, obj_tokens, save_dir, seed, tokens_vis=N
82
  img = np.frombuffer(canvas.tostring_rgb(), dtype='uint8').reshape((height, width, 3))
83
 
84
  fig.tight_layout()
85
- plt.savefig(os.path.join(
86
- save_dir, 'token_mapes_seed%d_%s.png' % (seed, atten_names[i])), dpi=100)
87
- plt.close('all')
88
  return img
89
 
90
 
 
82
  img = np.frombuffer(canvas.tostring_rgb(), dtype='uint8').reshape((height, width, 3))
83
 
84
  fig.tight_layout()
 
 
 
85
  return img
86
 
87