The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.
Remove useless annotations imports. (#14105)
comfyanonymousda49b7d0b6a1
diff --git a/app/assets/services/metadata_extract.py b/app/assets/services/metadata_extract.pyindex a004929bc..bdfe60218 100644--- a/app/assets/services/metadata_extract.py+++ b/app/assets/services/metadata_extract.py@@ -4,7 +4,6 @@ Tier 1: Filesystem metadata (zero parsing)Tier 2: Safetensors header metadata (fast JSON read only)"""-from __future__ import annotationsimport jsonimport loggingdiff --git a/app/custom_node_manager.py b/app/custom_node_manager.pyindex 281febca9..738af2abd 100644--- a/app/custom_node_manager.py+++ b/app/custom_node_manager.py@@ -1,5 +1,3 @@-from __future__ import annotations-import osimport folder_pathsimport globdiff --git a/app/frontend_management.py b/app/frontend_management.pyindex 483da2d29..8e84e8dd9 100644--- a/app/frontend_management.py+++ b/app/frontend_management.py@@ -1,4 +1,3 @@-from __future__ import annotationsimport argparseimport loggingimport osdiff --git a/app/model_manager.py b/app/model_manager.pyindex f124d1117..8f6e34b33 100644--- a/app/model_manager.py+++ b/app/model_manager.py@@ -1,5 +1,3 @@-from __future__ import annotations-import osimport base64import jsondiff --git a/app/user_manager.py b/app/user_manager.pyindex 0517b3344..7b11e381c 100644--- a/app/user_manager.py+++ b/app/user_manager.py@@ -1,4 +1,3 @@-from __future__ import annotationsimport jsonimport osimport rediff --git a/comfy/comfy_types/node_typing.py b/comfy/comfy_types/node_typing.pyindex 57126fa4a..bb21eb1d1 100644--- a/comfy/comfy_types/node_typing.py+++ b/comfy/comfy_types/node_typing.py@@ -1,6 +1,5 @@"""Comfy-specific type hinting"""-from __future__ import annotationsfrom typing import Literal, TypedDict, Optionalfrom typing_extensions import NotRequiredfrom abc import ABC, abstractmethoddiff --git a/comfy/ldm/lightricks/vae/causal_audio_autoencoder.py b/comfy/ldm/lightricks/vae/causal_audio_autoencoder.pyindex b556b128f..58b67d45a 100644--- a/comfy/ldm/lightricks/vae/causal_audio_autoencoder.py+++ b/comfy/ldm/lightricks/vae/causal_audio_autoencoder.py@@ -1,4 +1,3 @@-from __future__ import annotationsimport torchfrom torch import nnfrom torch.nn import functional as Fdiff --git a/comfy/ldm/lightricks/vae/causal_video_autoencoder.py b/comfy/ldm/lightricks/vae/causal_video_autoencoder.pyindex 998122c85..5975015e2 100644--- a/comfy/ldm/lightricks/vae/causal_video_autoencoder.py+++ b/comfy/ldm/lightricks/vae/causal_video_autoencoder.py@@ -1,4 +1,3 @@-from __future__ import annotationsimport threadingimport torchfrom torch import nndiff --git a/comfy/ldm/lumina/model.py b/comfy/ldm/lumina/model.pyindex 9e432d5c0..d0ee97d33 100644--- a/comfy/ldm/lumina/model.py+++ b/comfy/ldm/lumina/model.py@@ -1,5 +1,4 @@# Code from: https://github.com/Alpha-VLLM/Lumina-Image-2.0/blob/main/models/model.py-from __future__ import annotationsfrom typing import List, Optional, Tuplediff --git a/comfy/ldm/moge/geometry.py b/comfy/ldm/moge/geometry.pyindex 7fdc97871..d1a1e445f 100644--- a/comfy/ldm/moge/geometry.py+++ b/comfy/ldm/moge/geometry.py@@ -1,6 +1,5 @@"""Pure-torch + scipy geometry helpers for MoGe inference and mesh export."""-from __future__ import annotationsfrom typing import Optional, Tuplediff --git a/comfy/ldm/moge/model.py b/comfy/ldm/moge/model.pyindex 6876c4af2..1695626bc 100644--- a/comfy/ldm/moge/model.py+++ b/comfy/ldm/moge/model.py@@ -4,7 +4,6 @@ V1: DINOv2 backbone + multi-output head (points, mask).V2: DINOv2 encoder + neck + per-output heads (points, mask, normal, optional metric-scale MLP)."""-from __future__ import annotationsfrom numbers import Numberfrom typing import Any, Dict, List, Optional, Tuple, Uniondiff --git a/comfy/ldm/moge/modules.py b/comfy/ldm/moge/modules.pyindex 235a59212..f6443d65a 100644--- a/comfy/ldm/moge/modules.py+++ b/comfy/ldm/moge/modules.py@@ -1,6 +1,5 @@"""Building blocks for MoGe: residual conv stack, resamplers, MLP, DINOv2 encoder, v1 head."""-from __future__ import annotationsfrom typing import List, Optional, Sequence, Tuple, Uniondiff --git a/comfy/ldm/moge/panorama.py b/comfy/ldm/moge/panorama.pyindex de53ebe68..18d0cb665 100644--- a/comfy/ldm/moge/panorama.py+++ b/comfy/ldm/moge/panorama.py@@ -6,7 +6,6 @@ equirect distance map via a multi-scale Poisson + gradient sparse solve.Image sampling uses F.grid_sample (GPU); the sparse solve uses lsmr (CPU)."""-from __future__ import annotationsfrom typing import Callable, List, Optional, Tuplediff --git a/comfy/lora.py b/comfy/lora.pyindex c0e8b865c..4e0ea29e0 100644--- a/comfy/lora.py+++ b/comfy/lora.py@@ -16,7 +16,6 @@along with this program. If not, see <https://www.gnu.org/licenses/>."""-from __future__ import annotationsimport comfy.memory_managementimport comfy.utilsimport comfy.model_managementdiff --git a/comfy/patcher_extension.py b/comfy/patcher_extension.pyindex 4b276b175..189ee84ca 100644--- a/comfy/patcher_extension.py+++ b/comfy/patcher_extension.py@@ -1,4 +1,3 @@-from __future__ import annotationsfrom typing import Callableclass CallbacksMP:diff --git a/comfy/sd.py b/comfy/sd.pyindex 084170c62..a4e49763a 100644--- a/comfy/sd.py+++ b/comfy/sd.py@@ -1,4 +1,3 @@-from __future__ import annotationsimport jsonimport torchfrom enum import Enumdiff --git a/comfy_api/latest/__init__.py b/comfy_api/latest/__init__.pyindex 04973fea0..e0a585b10 100644--- a/comfy_api/latest/__init__.py+++ b/comfy_api/latest/__init__.py@@ -1,5 +1,3 @@-from __future__ import annotations-from abc import ABC, abstractmethodfrom typing import TYPE_CHECKINGfrom comfy_api.internal import ComfyAPIBasediff --git a/comfy_api/latest/_input_impl/video_types.py b/comfy_api/latest/_input_impl/video_types.pyindex 942278d88..99e67d363 100644--- a/comfy_api/latest/_input_impl/video_types.py+++ b/comfy_api/latest/_input_impl/video_types.py@@ -1,4 +1,3 @@-from __future__ import annotationsfrom av.container import InputContainerfrom av.subtitles.stream import SubtitleStreamfrom fractions import Fractiondiff --git a/comfy_api/latest/_util/video_types.py b/comfy_api/latest/_util/video_types.pyindex c92477f08..6c9d6a526 100644--- a/comfy_api/latest/_util/video_types.py+++ b/comfy_api/latest/_util/video_types.py@@ -1,4 +1,3 @@-from __future__ import annotationsfrom dataclasses import dataclassfrom enum import Enumfrom fractions import Fractiondiff --git a/comfy_api_nodes/apis/__init__.py b/comfy_api_nodes/apis/__init__.pyindex 46a583b5e..9c4cfb9b6 100644--- a/comfy_api_nodes/apis/__init__.py+++ b/comfy_api_nodes/apis/__init__.py@@ -3,7 +3,6 @@# timestamp: 2025-07-30T08:54:00+00:00# pylint: disable-from __future__ import annotationsfrom datetime import date, datetimefrom enum import Enumdiff --git a/comfy_api_nodes/apis/bfl.py b/comfy_api_nodes/apis/bfl.pyindex d8d3557b3..f0665fa09 100644--- a/comfy_api_nodes/apis/bfl.py+++ b/comfy_api_nodes/apis/bfl.py@@ -1,5 +1,3 @@-from __future__ import annotations-from enum import Enumfrom typing import Any, Dict, Optionaldiff --git a/comfy_api_nodes/apis/stability.py b/comfy_api_nodes/apis/stability.pyindex 718360187..5b9b5ac7d 100644--- a/comfy_api_nodes/apis/stability.py+++ b/comfy_api_nodes/apis/stability.py@@ -1,5 +1,3 @@-from __future__ import annotations-from enum import Enumfrom typing import Optionaldiff --git a/comfy_execution/graph.py b/comfy_execution/graph.pyindex c47f3c79b..479ee8a53 100644--- a/comfy_execution/graph.py+++ b/comfy_execution/graph.py@@ -1,4 +1,3 @@-from __future__ import annotationsfrom typing import Type, Literalimport nodesdiff --git a/comfy_execution/progress.py b/comfy_execution/progress.pyindex f951a3350..731b8dc66 100644--- a/comfy_execution/progress.py+++ b/comfy_execution/progress.py@@ -1,5 +1,3 @@-from __future__ import annotations-from typing import TypedDict, Dict, Optional, Tuplefrom typing_extensions import overridefrom PIL import Imagediff --git a/comfy_execution/validation.py b/comfy_execution/validation.pyindex e73624bd1..ae9a2376c 100644--- a/comfy_execution/validation.py+++ b/comfy_execution/validation.py@@ -1,4 +1,3 @@-from __future__ import annotationsfrom comfy_api.latest import IOdiff --git a/comfy_extras/mediapipe/face_geometry.py b/comfy_extras/mediapipe/face_geometry.pyindex 04b2b0557..4f3813430 100644--- a/comfy_extras/mediapipe/face_geometry.py+++ b/comfy_extras/mediapipe/face_geometry.py@@ -2,7 +2,6 @@+ weighted Procrustes solver. Computes the 4x4 facial transformation matrix."""-from __future__ import annotationsimport mathimport numpy as npdiff --git a/comfy_extras/mediapipe/face_landmarker.py b/comfy_extras/mediapipe/face_landmarker.pyindex a792b6046..e6b463c4c 100644--- a/comfy_extras/mediapipe/face_landmarker.py+++ b/comfy_extras/mediapipe/face_landmarker.py@@ -1,7 +1,6 @@"""Pure-PyTorch port of MediaPipe's face_landmarker_v2_with_blendshapes.task:BlazeFace detector → FaceMesh v2 → ARKit-52 blendshapes."""-from __future__ import annotationsimport mathfrom functools import lru_cachediff --git a/comfy_extras/nodes_audio.py b/comfy_extras/nodes_audio.pyindex d5084497e..f09a8a874 100644--- a/comfy_extras/nodes_audio.py+++ b/comfy_extras/nodes_audio.py@@ -1,5 +1,3 @@-from __future__ import annotations-import avimport torchaudioimport torchdiff --git a/comfy_extras/nodes_context_windows.py b/comfy_extras/nodes_context_windows.pyindex f7ca833dc..24729c3a7 100644--- a/comfy_extras/nodes_context_windows.py+++ b/comfy_extras/nodes_context_windows.py@@ -1,4 +1,3 @@-from __future__ import annotationsfrom comfy_api.latest import ComfyExtension, ioimport comfy.context_windowsimport nodesdiff --git a/comfy_extras/nodes_curve.py b/comfy_extras/nodes_curve.pyindex 9803e8034..099453131 100644--- a/comfy_extras/nodes_curve.py+++ b/comfy_extras/nodes_curve.py@@ -1,5 +1,3 @@-from __future__ import annotations-import numpy as npfrom comfy_api.latest import ComfyExtension, iodiff --git a/comfy_extras/nodes_images.py b/comfy_extras/nodes_images.pyindex 33933229d..fe6008aa3 100644--- a/comfy_extras/nodes_images.py+++ b/comfy_extras/nodes_images.py@@ -1,5 +1,3 @@-from __future__ import annotations-import nodesimport folder_pathsdiff --git a/comfy_extras/nodes_logic.py b/comfy_extras/nodes_logic.pyindex 342cadb69..92507f1fc 100644--- a/comfy_extras/nodes_logic.py+++ b/comfy_extras/nodes_logic.py@@ -1,4 +1,3 @@-from __future__ import annotationsfrom typing import TypedDictfrom typing_extensions import overridefrom comfy_api.latest import ComfyExtension, iodiff --git a/comfy_extras/nodes_math.py b/comfy_extras/nodes_math.pyindex 06aefa475..0040d1a92 100644--- a/comfy_extras/nodes_math.py+++ b/comfy_extras/nodes_math.py@@ -4,7 +4,6 @@ Provides a ComfyMathExpression node that evaluates math expressionsagainst dynamically-grown numeric inputs."""-from __future__ import annotationsimport mathimport stringdiff --git a/comfy_extras/nodes_mediapipe.py b/comfy_extras/nodes_mediapipe.pyindex 6b7916aee..32dc22de3 100644--- a/comfy_extras/nodes_mediapipe.py+++ b/comfy_extras/nodes_mediapipe.py@@ -10,7 +10,6 @@ Custom IO types:MediaPipeFaceLandmarker also emits the core BOUNDING_BOX type — pair with DrawBBoxes."""-from __future__ import annotationsimport numpy as npimport torchdiff --git a/comfy_extras/nodes_moge.py b/comfy_extras/nodes_moge.pyindex 3508781a0..79aec5d7f 100644--- a/comfy_extras/nodes_moge.py+++ b/comfy_extras/nodes_moge.py@@ -1,6 +1,5 @@"""ComfyUI nodes for the native MoGe (Monocular Geometry Estimation) integration."""-from __future__ import annotationsimport torchdiff --git a/comfy_extras/nodes_number_convert.py b/comfy_extras/nodes_number_convert.pyindex e38a33c15..01593b6e6 100644--- a/comfy_extras/nodes_number_convert.py+++ b/comfy_extras/nodes_number_convert.py@@ -4,7 +4,6 @@ Provides a single node that converts INT, FLOAT, STRING, and BOOLinputs into FLOAT and INT outputs."""-from __future__ import annotationsimport mathdiff --git a/comfy_extras/nodes_painter.py b/comfy_extras/nodes_painter.pyindex e104c8480..df7a0b76a 100644--- a/comfy_extras/nodes_painter.py+++ b/comfy_extras/nodes_painter.py@@ -1,5 +1,3 @@-from __future__ import annotations-import hashlibimport osdiff --git a/comfy_extras/nodes_resolution.py b/comfy_extras/nodes_resolution.pyindex 520b4067e..1628038cc 100644--- a/comfy_extras/nodes_resolution.py+++ b/comfy_extras/nodes_resolution.py@@ -1,4 +1,3 @@-from __future__ import annotationsimport mathfrom enum import Enumfrom typing_extensions import overridediff --git a/comfy_extras/nodes_toolkit.py b/comfy_extras/nodes_toolkit.pyindex ae802896b..0548a0cf8 100644--- a/comfy_extras/nodes_toolkit.py+++ b/comfy_extras/nodes_toolkit.py@@ -1,4 +1,3 @@-from __future__ import annotationsfrom typing_extensions import overridefrom comfy_api.latest import ComfyExtension, iodiff --git a/comfy_extras/nodes_video.py b/comfy_extras/nodes_video.pyindex 78a2a28f8..ae1d826d5 100644--- a/comfy_extras/nodes_video.py+++ b/comfy_extras/nodes_video.py@@ -1,5 +1,3 @@-from __future__ import annotations-import osimport avimport torchdiff --git a/folder_paths.py b/folder_paths.pyindex 36d61fcd0..7304e1b73 100644--- a/folder_paths.py+++ b/folder_paths.py@@ -1,5 +1,3 @@-from __future__ import annotations-import osimport timeimport mimetypesdiff --git a/nodes.py b/nodes.pyindex fd4365c90..669a7057b 100644--- a/nodes.py+++ b/nodes.py@@ -1,4 +1,3 @@-from __future__ import annotationsimport torch