songweig commited on
Commit
82af0fa
1 Parent(s): e5985ca

fix hoook bug

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -111,7 +111,7 @@ def main():
111
 
112
  # get token maps from plain text to image generation.
113
  begin_time = time.time()
114
- if model.attention_maps is None:
115
  model.register_tokenmap_hooks()
116
  else:
117
  model.reset_attention_maps()
 
111
 
112
  # get token maps from plain text to image generation.
113
  begin_time = time.time()
114
+ if model.selfattn_maps is None and model.crossattn_maps is None:
115
  model.register_tokenmap_hooks()
116
  else:
117
  model.reset_attention_maps()