11import sys
2- import torch
3- import numpy as np
42from enum import Enum
53from pathlib import Path
64from typing import Any , NamedTuple
7- from PIL import Image
85
9- import server
106import comfy .samplers
7+ import numpy as np
8+ import server
9+ import torch
1110from comfy .comfy_types .node_typing import IO
1211from comfy_api .latest import io
12+ from PIL import Image
13+
1314from .nodes import SendImageWebSocket
1415
1516
@@ -102,7 +103,7 @@ def define_schema(cls):
102103 )
103104
104105 @classmethod
105- def execute (
106+ def execute ( # type: ignore
106107 cls ,
107108 images : torch .Tensor ,
108109 x : int = 0 ,
@@ -141,7 +142,7 @@ def define_schema(cls):
141142 )
142143
143144 @classmethod
144- def execute (cls , value : Any , name : str , type : str ):
145+ def execute (cls , value : Any , name : str , type : str ): # type: ignore
145146 mime = {
146147 "text" : "text/plain" ,
147148 "markdown" : "text/markdown" ,
@@ -237,7 +238,7 @@ def define_schema(cls):
237238 )
238239
239240 @classmethod
240- def execute (cls , name : str ):
241+ def execute (cls , name : str ): # type: ignore
241242 return io .NodeOutput (_placeholder_image (), torch .ones (1 , 512 , 512 ))
242243
243244
@@ -255,7 +256,7 @@ def define_schema(cls):
255256 )
256257
257258 @classmethod
258- def execute (cls , name : str ):
259+ def execute (cls , name : str ): # type: ignore
259260 return io .NodeOutput (torch .ones (1 , 512 , 512 ))
260261
261262
@@ -290,7 +291,7 @@ def define_schema(cls):
290291 )
291292
292293 @classmethod
293- def execute (cls , name : str , type : str , default , min = 0.0 , max = 1.0 ):
294+ def execute (cls , name : str , type : str , default , min = 0.0 , max = 1.0 ): # type: ignore
294295 if type == "number" :
295296 return io .NodeOutput (float (default ))
296297 elif type == "number (integer)" :
@@ -327,7 +328,7 @@ def define_schema(cls):
327328 )
328329
329330 @classmethod
330- def execute (cls , name : str , sampler_preset : str ):
331+ def execute (cls , name : str , sampler_preset : str ): # type: ignore
331332 raise NotImplementedError ("This workflow must be started from Krita!" )
332333
333334
@@ -359,5 +360,5 @@ def define_schema(cls):
359360 )
360361
361362 @classmethod
362- def execute (cls , name : str , sampler_preset : str ):
363+ def execute (cls , name : str , sampler_preset : str ): # type: ignore
363364 raise NotImplementedError ("This workflow must be started from Krita!" )
0 commit comments