mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-07-27 16:26:39 +00:00
V3: renamed DEFINE_SCHEMA to define_schema
This commit is contained in:
parent
8beead753a
commit
c3334ae813
@ -1,6 +1,6 @@
|
|||||||
class ComfyNodeInternal:
|
class ComfyNodeInternal:
|
||||||
'''Class that all V3-based APIs inhertif from for ComfyNode.
|
"""Class that all V3-based APIs inherit from for ComfyNode.
|
||||||
|
|
||||||
This is intended to only be referenced within execution.py, as it has to handle all V3 APIs going forward.'''
|
This is intended to only be referenced within execution.py, as it has to handle all V3 APIs going forward."""
|
||||||
...
|
...
|
||||||
|
|
||||||
|
@ -1155,7 +1155,7 @@ class ComfyNodeV3(ComfyNodeInternal):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def DEFINE_SCHEMA(cls) -> SchemaV3:
|
def define_schema(cls) -> SchemaV3:
|
||||||
"""Override this function with one that returns a SchemaV3 instance."""
|
"""Override this function with one that returns a SchemaV3 instance."""
|
||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
|
||||||
@ -1207,8 +1207,8 @@ class ComfyNodeV3(ComfyNodeInternal):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def VALIDATE_CLASS(cls):
|
def VALIDATE_CLASS(cls):
|
||||||
if not callable(cls.DEFINE_SCHEMA):
|
if not callable(cls.define_schema):
|
||||||
raise Exception(f"No DEFINE_SCHEMA function was defined for node class {cls.__name__}.")
|
raise Exception(f"No define_schema function was defined for node class {cls.__name__}.")
|
||||||
if not callable(cls.execute):
|
if not callable(cls.execute):
|
||||||
raise Exception(f"No execute function was defined for node class {cls.__name__}.")
|
raise Exception(f"No execute function was defined for node class {cls.__name__}.")
|
||||||
|
|
||||||
@ -1350,8 +1350,8 @@ class ComfyNodeV3(ComfyNodeInternal):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def FINALIZE_SCHEMA(cls):
|
def FINALIZE_SCHEMA(cls):
|
||||||
"""Call DEFINE_SCHEMA and finalize it."""
|
"""Call define_schema and finalize it."""
|
||||||
schema = cls.DEFINE_SCHEMA()
|
schema = cls.define_schema()
|
||||||
schema.finalize()
|
schema.finalize()
|
||||||
return schema
|
return schema
|
||||||
|
|
||||||
@ -1482,7 +1482,7 @@ class _UIOutput(ABC):
|
|||||||
|
|
||||||
class TestNode(ComfyNodeV3):
|
class TestNode(ComfyNodeV3):
|
||||||
@classmethod
|
@classmethod
|
||||||
def DEFINE_SCHEMA(cls):
|
def define_schema(cls):
|
||||||
return SchemaV3(
|
return SchemaV3(
|
||||||
node_id="TestNode_v3",
|
node_id="TestNode_v3",
|
||||||
display_name="Test Node (V3)",
|
display_name="Test Node (V3)",
|
||||||
|
@ -27,7 +27,7 @@ class V3TestNode(io.ComfyNodeV3):
|
|||||||
self.hahajkunless = ";)"
|
self.hahajkunless = ";)"
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def DEFINE_SCHEMA(cls):
|
def define_schema(cls):
|
||||||
return io.SchemaV3(
|
return io.SchemaV3(
|
||||||
node_id="V3_01_TestNode1",
|
node_id="V3_01_TestNode1",
|
||||||
display_name="V3 Test Node",
|
display_name="V3 Test Node",
|
||||||
@ -113,7 +113,7 @@ class V3TestNode(io.ComfyNodeV3):
|
|||||||
|
|
||||||
class V3LoraLoader(io.ComfyNodeV3):
|
class V3LoraLoader(io.ComfyNodeV3):
|
||||||
@classmethod
|
@classmethod
|
||||||
def DEFINE_SCHEMA(cls):
|
def define_schema(cls):
|
||||||
return io.SchemaV3(
|
return io.SchemaV3(
|
||||||
node_id="V3_LoraLoader",
|
node_id="V3_LoraLoader",
|
||||||
display_name="V3 LoRA Loader",
|
display_name="V3 LoRA Loader",
|
||||||
@ -163,7 +163,7 @@ class V3LoraLoader(io.ComfyNodeV3):
|
|||||||
|
|
||||||
class NInputsTest(io.ComfyNodeV3):
|
class NInputsTest(io.ComfyNodeV3):
|
||||||
@classmethod
|
@classmethod
|
||||||
def DEFINE_SCHEMA(cls):
|
def define_schema(cls):
|
||||||
return io.SchemaV3(
|
return io.SchemaV3(
|
||||||
node_id="V3_NInputsTest",
|
node_id="V3_NInputsTest",
|
||||||
display_name="V3 N Inputs Test",
|
display_name="V3 N Inputs Test",
|
||||||
|
@ -18,7 +18,7 @@ from comfy_api.v3 import io, ui
|
|||||||
|
|
||||||
class ConditioningStableAudio_V3(io.ComfyNodeV3):
|
class ConditioningStableAudio_V3(io.ComfyNodeV3):
|
||||||
@classmethod
|
@classmethod
|
||||||
def DEFINE_SCHEMA(cls):
|
def define_schema(cls):
|
||||||
return io.SchemaV3(
|
return io.SchemaV3(
|
||||||
node_id="ConditioningStableAudio_V3",
|
node_id="ConditioningStableAudio_V3",
|
||||||
category="conditioning",
|
category="conditioning",
|
||||||
@ -48,7 +48,7 @@ class ConditioningStableAudio_V3(io.ComfyNodeV3):
|
|||||||
|
|
||||||
class EmptyLatentAudio_V3(io.ComfyNodeV3):
|
class EmptyLatentAudio_V3(io.ComfyNodeV3):
|
||||||
@classmethod
|
@classmethod
|
||||||
def DEFINE_SCHEMA(cls):
|
def define_schema(cls):
|
||||||
return io.SchemaV3(
|
return io.SchemaV3(
|
||||||
node_id="EmptyLatentAudio_V3",
|
node_id="EmptyLatentAudio_V3",
|
||||||
category="latent/audio",
|
category="latent/audio",
|
||||||
@ -70,7 +70,7 @@ class EmptyLatentAudio_V3(io.ComfyNodeV3):
|
|||||||
|
|
||||||
class LoadAudio_V3(io.ComfyNodeV3):
|
class LoadAudio_V3(io.ComfyNodeV3):
|
||||||
@classmethod
|
@classmethod
|
||||||
def DEFINE_SCHEMA(cls):
|
def define_schema(cls):
|
||||||
return io.SchemaV3(
|
return io.SchemaV3(
|
||||||
node_id="LoadAudio_V3", # frontend expects "LoadAudio" to work
|
node_id="LoadAudio_V3", # frontend expects "LoadAudio" to work
|
||||||
display_name="Load Audio _V3", # frontend ignores "display_name" for this node
|
display_name="Load Audio _V3", # frontend ignores "display_name" for this node
|
||||||
@ -108,7 +108,7 @@ class LoadAudio_V3(io.ComfyNodeV3):
|
|||||||
|
|
||||||
class PreviewAudio_V3(io.ComfyNodeV3):
|
class PreviewAudio_V3(io.ComfyNodeV3):
|
||||||
@classmethod
|
@classmethod
|
||||||
def DEFINE_SCHEMA(cls):
|
def define_schema(cls):
|
||||||
return io.SchemaV3(
|
return io.SchemaV3(
|
||||||
node_id="PreviewAudio_V3", # frontend expects "PreviewAudio" to work
|
node_id="PreviewAudio_V3", # frontend expects "PreviewAudio" to work
|
||||||
display_name="Preview Audio _V3", # frontend ignores "display_name" for this node
|
display_name="Preview Audio _V3", # frontend ignores "display_name" for this node
|
||||||
@ -127,7 +127,7 @@ class PreviewAudio_V3(io.ComfyNodeV3):
|
|||||||
|
|
||||||
class SaveAudioMP3_V3(io.ComfyNodeV3):
|
class SaveAudioMP3_V3(io.ComfyNodeV3):
|
||||||
@classmethod
|
@classmethod
|
||||||
def DEFINE_SCHEMA(cls):
|
def define_schema(cls):
|
||||||
return io.SchemaV3(
|
return io.SchemaV3(
|
||||||
node_id="SaveAudioMP3_V3", # frontend expects "SaveAudioMP3" to work
|
node_id="SaveAudioMP3_V3", # frontend expects "SaveAudioMP3" to work
|
||||||
display_name="Save Audio(MP3) _V3", # frontend ignores "display_name" for this node
|
display_name="Save Audio(MP3) _V3", # frontend ignores "display_name" for this node
|
||||||
@ -148,7 +148,7 @@ class SaveAudioMP3_V3(io.ComfyNodeV3):
|
|||||||
|
|
||||||
class SaveAudioOpus_V3(io.ComfyNodeV3):
|
class SaveAudioOpus_V3(io.ComfyNodeV3):
|
||||||
@classmethod
|
@classmethod
|
||||||
def DEFINE_SCHEMA(cls):
|
def define_schema(cls):
|
||||||
return io.SchemaV3(
|
return io.SchemaV3(
|
||||||
node_id="SaveAudioOpus_V3", # frontend expects "SaveAudioOpus" to work
|
node_id="SaveAudioOpus_V3", # frontend expects "SaveAudioOpus" to work
|
||||||
display_name="Save Audio(Opus) _V3", # frontend ignores "display_name" for this node
|
display_name="Save Audio(Opus) _V3", # frontend ignores "display_name" for this node
|
||||||
@ -169,7 +169,7 @@ class SaveAudioOpus_V3(io.ComfyNodeV3):
|
|||||||
|
|
||||||
class SaveAudio_V3(io.ComfyNodeV3):
|
class SaveAudio_V3(io.ComfyNodeV3):
|
||||||
@classmethod
|
@classmethod
|
||||||
def DEFINE_SCHEMA(cls):
|
def define_schema(cls):
|
||||||
return io.SchemaV3(
|
return io.SchemaV3(
|
||||||
node_id="SaveAudio_V3", # frontend expects "SaveAudio" to work
|
node_id="SaveAudio_V3", # frontend expects "SaveAudio" to work
|
||||||
display_name="Save Audio _V3", # frontend ignores "display_name" for this node
|
display_name="Save Audio _V3", # frontend ignores "display_name" for this node
|
||||||
@ -189,7 +189,7 @@ class SaveAudio_V3(io.ComfyNodeV3):
|
|||||||
|
|
||||||
class VAEDecodeAudio_V3(io.ComfyNodeV3):
|
class VAEDecodeAudio_V3(io.ComfyNodeV3):
|
||||||
@classmethod
|
@classmethod
|
||||||
def DEFINE_SCHEMA(cls):
|
def define_schema(cls):
|
||||||
return io.SchemaV3(
|
return io.SchemaV3(
|
||||||
node_id="VAEDecodeAudio_V3",
|
node_id="VAEDecodeAudio_V3",
|
||||||
category="latent/audio",
|
category="latent/audio",
|
||||||
@ -211,7 +211,7 @@ class VAEDecodeAudio_V3(io.ComfyNodeV3):
|
|||||||
|
|
||||||
class VAEEncodeAudio_V3(io.ComfyNodeV3):
|
class VAEEncodeAudio_V3(io.ComfyNodeV3):
|
||||||
@classmethod
|
@classmethod
|
||||||
def DEFINE_SCHEMA(cls):
|
def define_schema(cls):
|
||||||
return io.SchemaV3(
|
return io.SchemaV3(
|
||||||
node_id="VAEEncodeAudio_V3",
|
node_id="VAEEncodeAudio_V3",
|
||||||
category="latent/audio",
|
category="latent/audio",
|
||||||
|
@ -5,7 +5,7 @@ from comfy_api.v3 import io
|
|||||||
|
|
||||||
class ControlNetApplyAdvanced_V3(io.ComfyNodeV3):
|
class ControlNetApplyAdvanced_V3(io.ComfyNodeV3):
|
||||||
@classmethod
|
@classmethod
|
||||||
def DEFINE_SCHEMA(cls):
|
def define_schema(cls):
|
||||||
return io.SchemaV3(
|
return io.SchemaV3(
|
||||||
node_id="ControlNetApplyAdvanced_V3",
|
node_id="ControlNetApplyAdvanced_V3",
|
||||||
display_name="Apply ControlNet _V3",
|
display_name="Apply ControlNet _V3",
|
||||||
@ -62,7 +62,7 @@ class ControlNetApplyAdvanced_V3(io.ComfyNodeV3):
|
|||||||
|
|
||||||
class SetUnionControlNetType_V3(io.ComfyNodeV3):
|
class SetUnionControlNetType_V3(io.ComfyNodeV3):
|
||||||
@classmethod
|
@classmethod
|
||||||
def DEFINE_SCHEMA(cls):
|
def define_schema(cls):
|
||||||
return io.SchemaV3(
|
return io.SchemaV3(
|
||||||
node_id="SetUnionControlNetType_V3",
|
node_id="SetUnionControlNetType_V3",
|
||||||
category="conditioning/controlnet",
|
category="conditioning/controlnet",
|
||||||
@ -89,7 +89,7 @@ class SetUnionControlNetType_V3(io.ComfyNodeV3):
|
|||||||
|
|
||||||
class ControlNetInpaintingAliMamaApply_V3(ControlNetApplyAdvanced_V3):
|
class ControlNetInpaintingAliMamaApply_V3(ControlNetApplyAdvanced_V3):
|
||||||
@classmethod
|
@classmethod
|
||||||
def DEFINE_SCHEMA(cls):
|
def define_schema(cls):
|
||||||
return io.SchemaV3(
|
return io.SchemaV3(
|
||||||
node_id="ControlNetInpaintingAliMamaApply_V3",
|
node_id="ControlNetInpaintingAliMamaApply_V3",
|
||||||
category="conditioning/controlnet",
|
category="conditioning/controlnet",
|
||||||
|
@ -18,7 +18,7 @@ from server import PromptServer
|
|||||||
|
|
||||||
class GetImageSize(io.ComfyNodeV3):
|
class GetImageSize(io.ComfyNodeV3):
|
||||||
@classmethod
|
@classmethod
|
||||||
def DEFINE_SCHEMA(cls):
|
def define_schema(cls):
|
||||||
return io.SchemaV3(
|
return io.SchemaV3(
|
||||||
node_id="GetImageSize_V3",
|
node_id="GetImageSize_V3",
|
||||||
display_name="Get Image Size _V3",
|
display_name="Get Image Size _V3",
|
||||||
@ -51,7 +51,7 @@ class GetImageSize(io.ComfyNodeV3):
|
|||||||
|
|
||||||
class ImageAddNoise(io.ComfyNodeV3):
|
class ImageAddNoise(io.ComfyNodeV3):
|
||||||
@classmethod
|
@classmethod
|
||||||
def DEFINE_SCHEMA(cls):
|
def define_schema(cls):
|
||||||
return io.SchemaV3(
|
return io.SchemaV3(
|
||||||
node_id="ImageAddNoise_V3",
|
node_id="ImageAddNoise_V3",
|
||||||
display_name="Image Add Noise _V3",
|
display_name="Image Add Noise _V3",
|
||||||
@ -84,7 +84,7 @@ class ImageAddNoise(io.ComfyNodeV3):
|
|||||||
|
|
||||||
class ImageCrop(io.ComfyNodeV3):
|
class ImageCrop(io.ComfyNodeV3):
|
||||||
@classmethod
|
@classmethod
|
||||||
def DEFINE_SCHEMA(cls):
|
def define_schema(cls):
|
||||||
return io.SchemaV3(
|
return io.SchemaV3(
|
||||||
node_id="ImageCrop_V3",
|
node_id="ImageCrop_V3",
|
||||||
display_name="Image Crop _V3",
|
display_name="Image Crop _V3",
|
||||||
@ -110,7 +110,7 @@ class ImageCrop(io.ComfyNodeV3):
|
|||||||
|
|
||||||
class ImageFlip(io.ComfyNodeV3):
|
class ImageFlip(io.ComfyNodeV3):
|
||||||
@classmethod
|
@classmethod
|
||||||
def DEFINE_SCHEMA(cls):
|
def define_schema(cls):
|
||||||
return io.SchemaV3(
|
return io.SchemaV3(
|
||||||
node_id="ImageFlip_V3",
|
node_id="ImageFlip_V3",
|
||||||
display_name="Image Flip _V3",
|
display_name="Image Flip _V3",
|
||||||
@ -134,7 +134,7 @@ class ImageFlip(io.ComfyNodeV3):
|
|||||||
|
|
||||||
class ImageFromBatch(io.ComfyNodeV3):
|
class ImageFromBatch(io.ComfyNodeV3):
|
||||||
@classmethod
|
@classmethod
|
||||||
def DEFINE_SCHEMA(cls):
|
def define_schema(cls):
|
||||||
return io.SchemaV3(
|
return io.SchemaV3(
|
||||||
node_id="ImageFromBatch_V3",
|
node_id="ImageFromBatch_V3",
|
||||||
display_name="Image From Batch _V3",
|
display_name="Image From Batch _V3",
|
||||||
@ -158,7 +158,7 @@ class ImageFromBatch(io.ComfyNodeV3):
|
|||||||
|
|
||||||
class ImageRotate(io.ComfyNodeV3):
|
class ImageRotate(io.ComfyNodeV3):
|
||||||
@classmethod
|
@classmethod
|
||||||
def DEFINE_SCHEMA(cls):
|
def define_schema(cls):
|
||||||
return io.SchemaV3(
|
return io.SchemaV3(
|
||||||
node_id="ImageRotate_V3",
|
node_id="ImageRotate_V3",
|
||||||
display_name="Image Rotate _V3",
|
display_name="Image Rotate _V3",
|
||||||
@ -187,7 +187,7 @@ class ImageStitch(io.ComfyNodeV3):
|
|||||||
"""Upstreamed from https://github.com/kijai/ComfyUI-KJNodes"""
|
"""Upstreamed from https://github.com/kijai/ComfyUI-KJNodes"""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def DEFINE_SCHEMA(cls):
|
def define_schema(cls):
|
||||||
return io.SchemaV3(
|
return io.SchemaV3(
|
||||||
node_id="ImageStitch_V3",
|
node_id="ImageStitch_V3",
|
||||||
display_name="Image Stitch _V3",
|
display_name="Image Stitch _V3",
|
||||||
@ -355,7 +355,7 @@ class ImageStitch(io.ComfyNodeV3):
|
|||||||
|
|
||||||
class LoadImage(io.ComfyNodeV3):
|
class LoadImage(io.ComfyNodeV3):
|
||||||
@classmethod
|
@classmethod
|
||||||
def DEFINE_SCHEMA(cls):
|
def define_schema(cls):
|
||||||
return io.SchemaV3(
|
return io.SchemaV3(
|
||||||
node_id="LoadImage_V3",
|
node_id="LoadImage_V3",
|
||||||
display_name="Load Image _V3",
|
display_name="Load Image _V3",
|
||||||
@ -443,7 +443,7 @@ class LoadImage(io.ComfyNodeV3):
|
|||||||
|
|
||||||
class LoadImageOutput(io.ComfyNodeV3):
|
class LoadImageOutput(io.ComfyNodeV3):
|
||||||
@classmethod
|
@classmethod
|
||||||
def DEFINE_SCHEMA(cls):
|
def define_schema(cls):
|
||||||
return io.SchemaV3(
|
return io.SchemaV3(
|
||||||
node_id="LoadImageOutput_V3",
|
node_id="LoadImageOutput_V3",
|
||||||
display_name="Load Image (from Outputs) _V3",
|
display_name="Load Image (from Outputs) _V3",
|
||||||
@ -532,7 +532,7 @@ class LoadImageOutput(io.ComfyNodeV3):
|
|||||||
|
|
||||||
class PreviewImage(io.ComfyNodeV3):
|
class PreviewImage(io.ComfyNodeV3):
|
||||||
@classmethod
|
@classmethod
|
||||||
def DEFINE_SCHEMA(cls):
|
def define_schema(cls):
|
||||||
return io.SchemaV3(
|
return io.SchemaV3(
|
||||||
node_id="PreviewImage_V3",
|
node_id="PreviewImage_V3",
|
||||||
display_name="Preview Image _V3",
|
display_name="Preview Image _V3",
|
||||||
@ -552,7 +552,7 @@ class PreviewImage(io.ComfyNodeV3):
|
|||||||
|
|
||||||
class RepeatImageBatch(io.ComfyNodeV3):
|
class RepeatImageBatch(io.ComfyNodeV3):
|
||||||
@classmethod
|
@classmethod
|
||||||
def DEFINE_SCHEMA(cls):
|
def define_schema(cls):
|
||||||
return io.SchemaV3(
|
return io.SchemaV3(
|
||||||
node_id="RepeatImageBatch_V3",
|
node_id="RepeatImageBatch_V3",
|
||||||
display_name="Repeat Image Batch _V3",
|
display_name="Repeat Image Batch _V3",
|
||||||
@ -571,7 +571,7 @@ class RepeatImageBatch(io.ComfyNodeV3):
|
|||||||
|
|
||||||
class ResizeAndPadImage(io.ComfyNodeV3):
|
class ResizeAndPadImage(io.ComfyNodeV3):
|
||||||
@classmethod
|
@classmethod
|
||||||
def DEFINE_SCHEMA(cls):
|
def define_schema(cls):
|
||||||
return io.SchemaV3(
|
return io.SchemaV3(
|
||||||
node_id="ResizeAndPadImage_V3",
|
node_id="ResizeAndPadImage_V3",
|
||||||
display_name="Resize and Pad Image _V3",
|
display_name="Resize and Pad Image _V3",
|
||||||
@ -616,7 +616,7 @@ class ResizeAndPadImage(io.ComfyNodeV3):
|
|||||||
|
|
||||||
class SaveAnimatedPNG(io.ComfyNodeV3):
|
class SaveAnimatedPNG(io.ComfyNodeV3):
|
||||||
@classmethod
|
@classmethod
|
||||||
def DEFINE_SCHEMA(cls):
|
def define_schema(cls):
|
||||||
return io.SchemaV3(
|
return io.SchemaV3(
|
||||||
node_id="SaveAnimatedPNG_V3",
|
node_id="SaveAnimatedPNG_V3",
|
||||||
display_name="Save Animated PNG _V3",
|
display_name="Save Animated PNG _V3",
|
||||||
@ -681,7 +681,7 @@ class SaveAnimatedWEBP(io.ComfyNodeV3):
|
|||||||
COMPRESS_METHODS = {"default": 4, "fastest": 0, "slowest": 6}
|
COMPRESS_METHODS = {"default": 4, "fastest": 0, "slowest": 6}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def DEFINE_SCHEMA(cls):
|
def define_schema(cls):
|
||||||
return io.SchemaV3(
|
return io.SchemaV3(
|
||||||
node_id="SaveAnimatedWEBP_V3",
|
node_id="SaveAnimatedWEBP_V3",
|
||||||
display_name="Save Animated WEBP _V3",
|
display_name="Save Animated WEBP _V3",
|
||||||
@ -744,7 +744,7 @@ class SaveAnimatedWEBP(io.ComfyNodeV3):
|
|||||||
|
|
||||||
class SaveImage(io.ComfyNodeV3):
|
class SaveImage(io.ComfyNodeV3):
|
||||||
@classmethod
|
@classmethod
|
||||||
def DEFINE_SCHEMA(cls):
|
def define_schema(cls):
|
||||||
return io.SchemaV3(
|
return io.SchemaV3(
|
||||||
node_id="SaveImage_V3",
|
node_id="SaveImage_V3",
|
||||||
display_name="Save Image _V3",
|
display_name="Save Image _V3",
|
||||||
|
@ -9,7 +9,7 @@ class MaskPreview_V3(io.ComfyNodeV3):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def DEFINE_SCHEMA(cls):
|
def define_schema(cls):
|
||||||
return io.SchemaV3(
|
return io.SchemaV3(
|
||||||
node_id="MaskPreview_V3",
|
node_id="MaskPreview_V3",
|
||||||
display_name="Preview Mask _V3",
|
display_name="Preview Mask _V3",
|
||||||
|
@ -7,7 +7,7 @@ from comfy_api.v3 import io
|
|||||||
|
|
||||||
class String_V3(io.ComfyNodeV3):
|
class String_V3(io.ComfyNodeV3):
|
||||||
@classmethod
|
@classmethod
|
||||||
def DEFINE_SCHEMA(cls):
|
def define_schema(cls):
|
||||||
return io.SchemaV3(
|
return io.SchemaV3(
|
||||||
node_id="PrimitiveString_V3",
|
node_id="PrimitiveString_V3",
|
||||||
display_name="String _V3",
|
display_name="String _V3",
|
||||||
@ -25,7 +25,7 @@ class String_V3(io.ComfyNodeV3):
|
|||||||
|
|
||||||
class StringMultiline_V3(io.ComfyNodeV3):
|
class StringMultiline_V3(io.ComfyNodeV3):
|
||||||
@classmethod
|
@classmethod
|
||||||
def DEFINE_SCHEMA(cls):
|
def define_schema(cls):
|
||||||
return io.SchemaV3(
|
return io.SchemaV3(
|
||||||
node_id="PrimitiveStringMultiline_V3",
|
node_id="PrimitiveStringMultiline_V3",
|
||||||
display_name="String (Multiline) _V3",
|
display_name="String (Multiline) _V3",
|
||||||
@ -43,7 +43,7 @@ class StringMultiline_V3(io.ComfyNodeV3):
|
|||||||
|
|
||||||
class Int_V3(io.ComfyNodeV3):
|
class Int_V3(io.ComfyNodeV3):
|
||||||
@classmethod
|
@classmethod
|
||||||
def DEFINE_SCHEMA(cls):
|
def define_schema(cls):
|
||||||
return io.SchemaV3(
|
return io.SchemaV3(
|
||||||
node_id="PrimitiveInt_V3",
|
node_id="PrimitiveInt_V3",
|
||||||
display_name="Int _V3",
|
display_name="Int _V3",
|
||||||
@ -61,7 +61,7 @@ class Int_V3(io.ComfyNodeV3):
|
|||||||
|
|
||||||
class Float_V3(io.ComfyNodeV3):
|
class Float_V3(io.ComfyNodeV3):
|
||||||
@classmethod
|
@classmethod
|
||||||
def DEFINE_SCHEMA(cls):
|
def define_schema(cls):
|
||||||
return io.SchemaV3(
|
return io.SchemaV3(
|
||||||
node_id="PrimitiveFloat_V3",
|
node_id="PrimitiveFloat_V3",
|
||||||
display_name="Float _V3",
|
display_name="Float _V3",
|
||||||
@ -79,7 +79,7 @@ class Float_V3(io.ComfyNodeV3):
|
|||||||
|
|
||||||
class Boolean_V3(io.ComfyNodeV3):
|
class Boolean_V3(io.ComfyNodeV3):
|
||||||
@classmethod
|
@classmethod
|
||||||
def DEFINE_SCHEMA(cls):
|
def define_schema(cls):
|
||||||
return io.SchemaV3(
|
return io.SchemaV3(
|
||||||
node_id="PrimitiveBoolean_V3",
|
node_id="PrimitiveBoolean_V3",
|
||||||
display_name="Boolean _V3",
|
display_name="Boolean _V3",
|
||||||
|
@ -25,7 +25,7 @@ from comfy_api.v3 import io
|
|||||||
|
|
||||||
class StableCascade_EmptyLatentImage_V3(io.ComfyNodeV3):
|
class StableCascade_EmptyLatentImage_V3(io.ComfyNodeV3):
|
||||||
@classmethod
|
@classmethod
|
||||||
def DEFINE_SCHEMA(cls):
|
def define_schema(cls):
|
||||||
return io.SchemaV3(
|
return io.SchemaV3(
|
||||||
node_id="StableCascade_EmptyLatentImage_V3",
|
node_id="StableCascade_EmptyLatentImage_V3",
|
||||||
category="latent/stable_cascade",
|
category="latent/stable_cascade",
|
||||||
@ -50,7 +50,7 @@ class StableCascade_EmptyLatentImage_V3(io.ComfyNodeV3):
|
|||||||
|
|
||||||
class StableCascade_StageC_VAEEncode_V3(io.ComfyNodeV3):
|
class StableCascade_StageC_VAEEncode_V3(io.ComfyNodeV3):
|
||||||
@classmethod
|
@classmethod
|
||||||
def DEFINE_SCHEMA(cls):
|
def define_schema(cls):
|
||||||
return io.SchemaV3(
|
return io.SchemaV3(
|
||||||
node_id="StableCascade_StageC_VAEEncode_V3",
|
node_id="StableCascade_StageC_VAEEncode_V3",
|
||||||
category="latent/stable_cascade",
|
category="latent/stable_cascade",
|
||||||
@ -81,7 +81,7 @@ class StableCascade_StageC_VAEEncode_V3(io.ComfyNodeV3):
|
|||||||
|
|
||||||
class StableCascade_StageB_Conditioning_V3(io.ComfyNodeV3):
|
class StableCascade_StageB_Conditioning_V3(io.ComfyNodeV3):
|
||||||
@classmethod
|
@classmethod
|
||||||
def DEFINE_SCHEMA(cls):
|
def define_schema(cls):
|
||||||
return io.SchemaV3(
|
return io.SchemaV3(
|
||||||
node_id="StableCascade_StageB_Conditioning_V3",
|
node_id="StableCascade_StageB_Conditioning_V3",
|
||||||
category="conditioning/stable_cascade",
|
category="conditioning/stable_cascade",
|
||||||
@ -107,7 +107,7 @@ class StableCascade_StageB_Conditioning_V3(io.ComfyNodeV3):
|
|||||||
|
|
||||||
class StableCascade_SuperResolutionControlnet_V3(io.ComfyNodeV3):
|
class StableCascade_SuperResolutionControlnet_V3(io.ComfyNodeV3):
|
||||||
@classmethod
|
@classmethod
|
||||||
def DEFINE_SCHEMA(cls):
|
def define_schema(cls):
|
||||||
return io.SchemaV3(
|
return io.SchemaV3(
|
||||||
node_id="StableCascade_SuperResolutionControlnet_V3",
|
node_id="StableCascade_SuperResolutionControlnet_V3",
|
||||||
category="_for_testing/stable_cascade",
|
category="_for_testing/stable_cascade",
|
||||||
|
@ -9,32 +9,18 @@ import node_helpers
|
|||||||
import nodes
|
import nodes
|
||||||
from comfy_api.v3 import io
|
from comfy_api.v3 import io
|
||||||
|
|
||||||
MAX_RESOLUTION = nodes.MAX_RESOLUTION
|
|
||||||
|
|
||||||
|
class WebcamCapture(io.ComfyNodeV3):
|
||||||
class WebcamCapture_V3(io.ComfyNodeV3):
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def DEFINE_SCHEMA(cls):
|
def define_schema(cls):
|
||||||
return io.SchemaV3(
|
return io.SchemaV3(
|
||||||
node_id="WebcamCapture_V3",
|
node_id="WebcamCapture_V3",
|
||||||
display_name="Webcam Capture _V3",
|
display_name="Webcam Capture _V3",
|
||||||
category="image",
|
category="image",
|
||||||
inputs=[
|
inputs=[
|
||||||
io.Webcam.Input("image"),
|
io.Webcam.Input("image"),
|
||||||
io.Int.Input(
|
io.Int.Input("width", default=0, min=0, max=nodes.MAX_RESOLUTION, step=1),
|
||||||
"width",
|
io.Int.Input("height", default=0, min=0, max=nodes.MAX_RESOLUTION, step=1),
|
||||||
default=0,
|
|
||||||
min=0,
|
|
||||||
max=MAX_RESOLUTION,
|
|
||||||
step=1,
|
|
||||||
),
|
|
||||||
io.Int.Input(
|
|
||||||
"height",
|
|
||||||
default=0,
|
|
||||||
min=0,
|
|
||||||
max=MAX_RESOLUTION,
|
|
||||||
step=1,
|
|
||||||
),
|
|
||||||
io.Boolean.Input("capture_on_queue", default=True),
|
io.Boolean.Input("capture_on_queue", default=True),
|
||||||
],
|
],
|
||||||
outputs=[
|
outputs=[
|
||||||
@ -103,4 +89,4 @@ class WebcamCapture_V3(io.ComfyNodeV3):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
NODES_LIST: list[type[io.ComfyNodeV3]] = [WebcamCapture_V3]
|
NODES_LIST: list[type[io.ComfyNodeV3]] = [WebcamCapture]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user