From c8bd95a3930f9b3a3df5ede58d6e837d51277249 Mon Sep 17 00:00:00 2001 From: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com> Date: Tue, 22 Apr 2025 15:14:26 +0800 Subject: [PATCH] linting --- comfy/weight_adapter/__init__.py | 6 ++++++ comfy_extras/nodes_train.py | 5 ++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/comfy/weight_adapter/__init__.py b/comfy/weight_adapter/__init__.py index d278b032c..79d936aed 100644 --- a/comfy/weight_adapter/__init__.py +++ b/comfy/weight_adapter/__init__.py @@ -11,3 +11,9 @@ adapters: list[type[WeightAdapterBase]] = [ LoKrAdapter, GLoRAAdapter, ] + +__all__ = [ + "WeightAdapterBase", + "WeightAdapterTrainBase", + "adapters" +] + [a.__name__ for a in adapters] diff --git a/comfy_extras/nodes_train.py b/comfy_extras/nodes_train.py index 4ffc64345..dcfcbdbef 100644 --- a/comfy_extras/nodes_train.py +++ b/comfy_extras/nodes_train.py @@ -1,7 +1,6 @@ import datetime import json import logging -import math import os import numpy as np @@ -17,7 +16,7 @@ import folder_paths import node_helpers from comfy.cli_args import args from comfy.comfy_types.node_typing import IO -from comfy.weight_adapter import WeightAdapterBase, WeightAdapterTrainBase, adapters +from comfy.weight_adapter import adapters class TrainSampler(comfy.samplers.Sampler): @@ -375,7 +374,7 @@ class TrainLoraNode: ) if existing_adapter is not None: break - + if existing_adapter is not None: train_adapter = existing_adapter.to_train() for name, parameter in train_adapter.named_parameters():