mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-02-08 12:32:32 +08:00
code improve
This commit is contained in:
parent
c7843f888f
commit
6cdd246966
@ -1125,7 +1125,7 @@ class ImageCompare(ComfyTypeI):
|
|||||||
def as_dict(self):
|
def as_dict(self):
|
||||||
return super().as_dict()
|
return super().as_dict()
|
||||||
|
|
||||||
@comfytype(io_type="BOUNDINGBOX")
|
@comfytype(io_type="BOUNDING_BOX")
|
||||||
class BoundingBox(ComfyTypeIO):
|
class BoundingBox(ComfyTypeIO):
|
||||||
Type = dict
|
Type = dict
|
||||||
|
|
||||||
|
|||||||
@ -48,20 +48,20 @@ class ImageCrop(IO.ComfyNode):
|
|||||||
crop = execute # TODO: remove
|
crop = execute # TODO: remove
|
||||||
|
|
||||||
|
|
||||||
class IntToBoundingBox(IO.ComfyNode):
|
class BoundingBox(IO.ComfyNode):
|
||||||
@classmethod
|
@classmethod
|
||||||
def define_schema(cls):
|
def define_schema(cls):
|
||||||
return IO.Schema(
|
return IO.Schema(
|
||||||
node_id="IntToBoundingBox",
|
node_id="PrimitiveBoundingBox",
|
||||||
display_name="INT to Bounding Box",
|
display_name="Bounding Box",
|
||||||
category="utils",
|
category="utils/primitive",
|
||||||
inputs=[
|
inputs=[
|
||||||
IO.Int.Input("x", default=0, min=0, max=MAX_RESOLUTION),
|
IO.Int.Input("x", default=0, min=0, max=MAX_RESOLUTION),
|
||||||
IO.Int.Input("y", default=0, min=0, max=MAX_RESOLUTION),
|
IO.Int.Input("y", default=0, min=0, max=MAX_RESOLUTION),
|
||||||
IO.Int.Input("width", default=512, min=1, max=MAX_RESOLUTION),
|
IO.Int.Input("width", default=512, min=1, max=MAX_RESOLUTION),
|
||||||
IO.Int.Input("height", default=512, min=1, max=MAX_RESOLUTION),
|
IO.Int.Input("height", default=512, min=1, max=MAX_RESOLUTION),
|
||||||
],
|
],
|
||||||
outputs=[IO.BoundingBox.Output(display_name="BOUNDINGBOX")],
|
outputs=[IO.BoundingBox.Output()],
|
||||||
)
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@ -651,7 +651,7 @@ class ImagesExtension(ComfyExtension):
|
|||||||
async def get_node_list(self) -> list[type[IO.ComfyNode]]:
|
async def get_node_list(self) -> list[type[IO.ComfyNode]]:
|
||||||
return [
|
return [
|
||||||
ImageCrop,
|
ImageCrop,
|
||||||
IntToBoundingBox,
|
BoundingBox,
|
||||||
RepeatImageBatch,
|
RepeatImageBatch,
|
||||||
ImageFromBatch,
|
ImageFromBatch,
|
||||||
ImageAddNoise,
|
ImageAddNoise,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user