Closed cian0 closed 9 months ago
Yes, you can control when to free the models. You should use with torch.inference_mode()
instead of with Workflow()
to avoid having similar behavior to ComfyUI.
By the way, I didn't find much docs about ComfyUI's model management, but it looks like it won't unload a model if only the node ID changed, instead, it's only unloaded if the reference count becomes zero.
See https://github.com/Chaoses-Ib/ComfyScript/issues/21#issuecomment-1936482022 for unloading models.
Awesome thanks!
Hi I haven't tried it yet but genuinely interested, my question would be about the loaded model's lifecycles. In comfy whenever i switch workflows it will have to reload the models because they have different node IDs, just wondering if using this library would fix that if I were to create a repository of workflows..