laksjdjf / IPAdapter-ComfyUI

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

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

Closed Kosinkadink closed 10 months ago

Kosinkadink commented 10 months 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 10 months ago

Thanks for your help!