mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-12-19 11:03:00 +08:00
Merge 7d493629a4 into da2bfb5b0a
This commit is contained in:
commit
5291d75e98
@ -40,6 +40,24 @@ class StringMultiline(io.ComfyNode):
|
|||||||
return io.NodeOutput(value)
|
return io.NodeOutput(value)
|
||||||
|
|
||||||
|
|
||||||
|
class RandInt(io.ComfyNode):
|
||||||
|
@classmethod
|
||||||
|
def define_schema(cls):
|
||||||
|
return io.Schema(
|
||||||
|
node_id="PrimitiveRandomInt",
|
||||||
|
display_name="RandomInt",
|
||||||
|
category="utils/primitive",
|
||||||
|
inputs=[
|
||||||
|
io.Int.Input("value", min=-sys.maxsize, max=sys.maxsize, control_after_generate=True),
|
||||||
|
],
|
||||||
|
outputs=[io.Int.Output()],
|
||||||
|
)
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def execute(cls, value: int) -> io.NodeOutput:
|
||||||
|
return io.NodeOutput(value)
|
||||||
|
|
||||||
|
|
||||||
class Int(io.ComfyNode):
|
class Int(io.ComfyNode):
|
||||||
@classmethod
|
@classmethod
|
||||||
def define_schema(cls):
|
def define_schema(cls):
|
||||||
@ -48,7 +66,7 @@ class Int(io.ComfyNode):
|
|||||||
display_name="Int",
|
display_name="Int",
|
||||||
category="utils/primitive",
|
category="utils/primitive",
|
||||||
inputs=[
|
inputs=[
|
||||||
io.Int.Input("value", min=-sys.maxsize, max=sys.maxsize, control_after_generate=True),
|
io.Int.Input("value", min=-sys.maxsize, max=sys.maxsize),
|
||||||
],
|
],
|
||||||
outputs=[io.Int.Output()],
|
outputs=[io.Int.Output()],
|
||||||
)
|
)
|
||||||
@ -100,6 +118,7 @@ class PrimitivesExtension(ComfyExtension):
|
|||||||
return [
|
return [
|
||||||
String,
|
String,
|
||||||
StringMultiline,
|
StringMultiline,
|
||||||
|
RandInt,
|
||||||
Int,
|
Int,
|
||||||
Float,
|
Float,
|
||||||
Boolean,
|
Boolean,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user