From 19087c10552288d20408cd41345c335174a3070d Mon Sep 17 00:00:00 2001 From: space-nuko <24979496+space-nuko@users.noreply.github.com> Date: Tue, 16 May 2023 09:14:32 -0500 Subject: [PATCH] Comments --- nodes.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/nodes.py b/nodes.py index 8d5ff15..5335931 100644 --- a/nodes.py +++ b/nodes.py @@ -53,12 +53,13 @@ class OpenAICLIPLoader: # But it's more efficient to run operations on tensors loaded without # support for calculating loss, and most people aren't training models, # they're just running inference. - # And "torch.autograd.grad" is a function mostly used for training models. - # But because (this implementation of) guided diffusion requires autograd, - # we have to load the tensors with inference mode off ourselves (ComfyUI - # enables it by default, for maximum performance). + # And "torch.autograd.grad" is a function mostly used for training. + # But because (this implementation of) guided diffusion requires + # autograd, we have to load the tensors with inference mode off + # ourselves (ComfyUI enables it by default for maximum performance). # Same with the guided diffusion model, secondary diffusion model and - # sampling code, it all must be run with support for autograd (inference mode off). + # sampling code, it all must be loaded/run with support for autograd + # (inference mode off). with torch.inference_mode(False): if model_name in OPENAI_CLIP_MODELS: download_root = os.path.join(folder_paths.models_dir, "OpenAI-CLIP")