From d57bf9decbc6c5a4230f50258b4897e9610f562f Mon Sep 17 00:00:00 2001 From: "Lex Darlog (DRL)" <3897975+Lex-DRL@users.noreply.github.com> Date: Sun, 22 Feb 2026 03:55:28 -0300 Subject: [PATCH] `gl`, `glfw`, `EGL` declaration - to the top of the module --- comfy_extras/nodes_glsl.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/comfy_extras/nodes_glsl.py b/comfy_extras/nodes_glsl.py index 75ffb6d80..ef5c1bee0 100644 --- a/comfy_extras/nodes_glsl.py +++ b/comfy_extras/nodes_glsl.py @@ -16,6 +16,11 @@ from utils.install_util import get_missing_requirements_message logger = logging.getLogger(__name__) +# OpenGL modules - initialized lazily when context is created +gl = None +glfw = None +EGL = None + def _check_opengl_availability(): """Early check for OpenGL availability. Raises RuntimeError if unlikely to work.""" @@ -63,11 +68,6 @@ def _check_opengl_availability(): logger.debug("nodes_glsl: running _check_opengl_availability at import time") _check_opengl_availability() -# OpenGL modules - initialized lazily when context is created -gl = None -glfw = None -EGL = None - def _import_opengl(): """Import OpenGL module. Called after context is created."""