Comfy-Org / Comfy-Org/ComfyUI

Custom Node Question: getrefcount increases when passing object from one node to another

Open
#7,351 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 7h
Merged PRs (30d)
158

Description

I am passing a custom object from a custom node to another custom node.

At the end of Custom Object A, just before 'return', sys.getrefcount() = 2
At the beginning of Custom Object B, sys.getrefcount() = 6

This makes it difficult for Custom Object B to release the object being passed (and therefore any resources associated with it).

Anyone know how to deal with this issue?

Thank you.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.