Skip to content

Commit df96211

Browse files
committed
Fix ruff formatting errors
1 parent 2ade7f6 commit df96211

File tree

1 file changed

+10
-14
lines changed

1 file changed

+10
-14
lines changed

custom_nodes/IAT_nodes.py

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,19 @@
11
import os
22
from folder_paths import get_folder_paths
3+
import logging
34
import torch
45
import random
5-
from comfy.utils import common_upscale
66
from nodes import MAX_RESOLUTION
77
import base64
88
from io import BytesIO
99
from PIL import Image
1010
import numpy as np
11-
from comfy.utils import common_upscale
12-
from nodes import MAX_RESOLUTION, LoraLoader
1311
import re
14-
import os
1512
from transformers import AutoModelForCausalLM, AutoTokenizer
16-
import logging
1713

1814
# Base64ToImageNode
1915
class Base64ToImageNode:
20-
@classmethod
16+
@classmethod
2117
def INPUT_TYPES(cls):
2218
return {
2319
"required": {
@@ -50,7 +46,7 @@ def convert_base64(self, base64_str):
5046

5147
# FloatInputNode
5248
class FloatInputNode:
53-
@classmethod
49+
@classmethod
5450
def INPUT_TYPES(cls):
5551
return {
5652
"required": {
@@ -192,7 +188,7 @@ def get_size(self, image):
192188

193189
# IntInputNode
194190
class IntInputNode:
195-
@classmethod
191+
@classmethod
196192
def INPUT_TYPES(cls):
197193
return {
198194
"required": {
@@ -275,7 +271,7 @@ def translate(self, text):
275271

276272
# TextInputNode
277273
class TextInputNode:
278-
@classmethod
274+
@classmethod
279275
def INPUT_TYPES(cls):
280276
return {
281277
"required": {
@@ -322,7 +318,7 @@ def INPUT_TYPES(cls):
322318
def generate_seed(self, seed, control_after_generate):
323319
# 先保存当前显示的种子值用于返回
324320
seed_to_return = seed
325-
321+
326322
# 如果需要随机化,则在返回当前种子后,为下一次准备一个新的随机种子
327323
if control_after_generate:
328324
# 生成新的随机种子并存储,但不立即返回
@@ -360,21 +356,21 @@ def divide_by_four(self, input_float):
360356
"Base64ToImageNode by IAT": Base64ToImageNode,
361357
"FloatInputNode by IAT": FloatInputNode,
362358
"ImageMatchSize by IAT": ImageMatchSize,
363-
"ImageResizeLongestSide by IAT": ImageResizeLongestSideNode,
359+
"ImageResizeLongestSide by IAT": ImageResizeLongestSideNode,
364360
"ImageResizeToSDXL by IAT": ImageResizeToSDXL,
365-
"ImageSize by IAT": ImageSizeNode,
361+
"ImageSize by IAT": ImageSizeNode,
366362
"IntInputNode by IAT": IntInputNode,
367363
"QwenTranslator by IAT": QwenTranslator,
368364
"TextInputNode by IAT": TextInputNode,
369365
"SeedGeneratorNode by IAT": SeedGeneratorNode,
370-
"FloatDivideByFourNode by IAT": FloatDivideByFourNode,
366+
"FloatDivideByFourNode by IAT": FloatDivideByFourNode,
371367
}
372368

373369
NODE_DISPLAY_NAME_MAPPINGS = {
374370
"Base64ToImageNode by IAT": "Base64 to Image by IAT",
375371
"FloatInputNode by IAT": "Float Input by IAT",
376372
"ImageMatchSize by IAT": "Image Match Size by IAT",
377-
"ImageResizeLongestSide by IAT": "Image Resize Longest Side by IAT",
373+
"ImageResizeLongestSide by IAT": "Image Resize Longest Side by IAT",
378374
"ImageResizeToSDXL by IAT": "ImageResizeToSDXL by IAT",
379375
"ImageSize by IAT": "Image Size by IAT",
380376
"IntInputNode by IAT": "Integer Input by IAT",

0 commit comments

Comments
 (0)