Spaces:
Runtime error
Runtime error
fix hoook bug
Browse files
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.
|
| 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()
|