mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-05-27 17:37:39 +08:00
[Partner Nodes] add seed param
Signed-off-by: bigcat88 <bigcat88@icloud.com>
This commit is contained in:
parent
d8835a05ba
commit
55081682c7
@ -141,6 +141,15 @@ class ClaudeNode(IO.ComfyNode):
|
|||||||
options=[IO.DynamicCombo.Option(label, _claude_model_inputs()) for label in CLAUDE_MODELS],
|
options=[IO.DynamicCombo.Option(label, _claude_model_inputs()) for label in CLAUDE_MODELS],
|
||||||
tooltip="The Claude model used to generate the response.",
|
tooltip="The Claude model used to generate the response.",
|
||||||
),
|
),
|
||||||
|
IO.Int.Input(
|
||||||
|
"seed",
|
||||||
|
default=0,
|
||||||
|
min=0,
|
||||||
|
max=2147483647,
|
||||||
|
control_after_generate=True,
|
||||||
|
tooltip="Seed controls whether the node should re-run; "
|
||||||
|
"results are non-deterministic regardless of seed.",
|
||||||
|
),
|
||||||
IO.Autogrow.Input(
|
IO.Autogrow.Input(
|
||||||
"images",
|
"images",
|
||||||
template=IO.Autogrow.TemplateNames(
|
template=IO.Autogrow.TemplateNames(
|
||||||
@ -197,10 +206,11 @@ class ClaudeNode(IO.ComfyNode):
|
|||||||
cls,
|
cls,
|
||||||
prompt: str,
|
prompt: str,
|
||||||
model: dict,
|
model: dict,
|
||||||
|
seed: int,
|
||||||
images: dict | None = None,
|
images: dict | None = None,
|
||||||
system_prompt: str = "",
|
system_prompt: str = "",
|
||||||
) -> IO.NodeOutput:
|
) -> IO.NodeOutput:
|
||||||
validate_string(prompt, strip_whitespace=False, min_length=1)
|
validate_string(prompt, strip_whitespace=True, min_length=1)
|
||||||
model_label = model["model"]
|
model_label = model["model"]
|
||||||
max_tokens = model["max_tokens"]
|
max_tokens = model["max_tokens"]
|
||||||
temperature = model["temperature"]
|
temperature = model["temperature"]
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user