songweig commited on
Commit
b29d1da
1 Parent(s): 70acd79
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -116,6 +116,7 @@ def main():
116
  model.register_tokenmap_hooks()
117
  else:
118
  model.reset_attention_maps()
 
119
  plain_img = model.produce_attn_maps([base_text_prompt], [negative_text],
120
  height=height, width=width, num_inference_steps=steps,
121
  guidance_scale=guidance_weight)
 
116
  model.register_tokenmap_hooks()
117
  else:
118
  model.reset_attention_maps()
119
+ model.remove_tokenmap_hooks()
120
  plain_img = model.produce_attn_maps([base_text_prompt], [negative_text],
121
  height=height, width=width, num_inference_steps=steps,
122
  guidance_scale=guidance_weight)