laksjdjf / IPAdapter-ComfyUI

experimental
GNU General Public License v3.0
217 stars 13 forks source link

Fixed high VRAM usage, by not saving reference to inspect.currentframe() in a variable #40

Closed Kosinkadink closed 1 year ago

Kosinkadink commented 1 year ago

The reference to inspect.currentframe() was not being explicitly deleted, causing automatic garbage collection to not function correctly. By simply never storing a reference to it and calling the properties on the object directly, VRAM usage goes down dramatically, especially when sampling multiple latents at a time.

laksjdjf commented 1 year ago

Thanks for your help!