don't restore None

This commit is contained in:
damian 2023-01-26 17:44:27 +01:00
parent fb312f9ed3
commit c381788ab9

View File

@ -69,7 +69,8 @@ class InvokeAIDiffuserComponent:
try:
yield None
finally:
self.remove_cross_attention_control(old_attn_processor)
if old_attn_processor is not None:
self.remove_cross_attention_control(old_attn_processor)
# TODO resuscitate attention map saving
#self.remove_attention_map_saving()