Comfy-Org / Comfy-Org/ComfyUI

Nodes and requires_grad=True (pytorch optimization within comfyui)

Open
#2,946 2 comments 0 reactions 0 assignees View on GitHub
User Support
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 6h
Merged PRs (30d)
155

Description

I have a node that does some pytorch optimization, simple regression over coordinates. When I run this outside of ComfyUI it works fine, inside all the gradient information is missing and so cannot optimize. Is there something in comfyUI that is disabling all the pytorch gradients? For example with something like set_grad_enabled(False)? At any rate, even using that function and setting to True within a context manager does not resolve the problem.

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.