Add clarifying comment so I don't accidentally cause regression in the future with new memory management system

This commit is contained in:
Jedrzej Kosinski
2024-11-14 20:02:51 -06:00
parent 285f41c809
commit a2430fb880
+1 -1
View File
@@ -129,7 +129,7 @@ class ControlNetAdvanced(ControlNet, AdvancedControlBase):
global_average_pooling=v.global_average_pooling, compression_ratio=v.compression_ratio, latent_format=v.latent_format, load_device=v.load_device,
manual_cast_dtype=v.manual_cast_dtype)
v.copy_to(to_return)
to_return.control_model_wrapped = v.control_model_wrapped.clone()
to_return.control_model_wrapped = v.control_model_wrapped.clone() # needed to avoid breaking memory management system (parent tracking)
return to_return