fix: enable cache seed widget controls

This commit is contained in:
silveroxides
2026-09-11 19:04:32 +02:00
parent 0383cd2871
commit 41353885b4
2 changed files with 10 additions and 1 deletions
+1 -1
View File
@@ -117,7 +117,7 @@ class SSL_GeminiAPIKeyConfig(IO.ComfyNode):
IO.String.Input("google_application_credentials", default="", optional=True, multiline=False, tooltip="Optional absolute path to an application default credentials JSON file for Vertex AI."),
IO.Boolean.Input("use_cache", default=False, optional=True, tooltip="Reuse unchanged Gemini input context through the API cache after a local result-cache miss."),
IO.Int.Input("cache_ttl_minutes", default=60, min=1, step=1, optional=True, tooltip="How long Gemini keeps explicitly cached context."),
IO.Int.Input("cache_seed", default=0, min=0, max=2147483647, optional=True, tooltip="Gemini generation seed used when context caching is enabled."),
IO.Int.Input("cache_seed", default=0, min=0, max=2147483647, control_after_generate=True, optional=True, tooltip="Gemini generation seed used when context caching is enabled."),
],
outputs=[
cls.GemConfig.Output("config")
+9
View File
@@ -11,6 +11,15 @@ from PIL import Image
from custom_nodes.ComfyUI_Gemini_Expanded_API import gemini_nodes
def test_cache_seed_explicitly_enables_seed_widget_control():
inputs = gemini_nodes.SSL_GeminiAPIKeyConfig.INPUT_TYPES()
kind, options = inputs["optional"]["cache_seed"]
assert kind == "INT"
assert options["control_after_generate"] is True
assert options["min"] == 0
assert options["max"] == 2147483647
def _execute_kwargs(config):
return {
"config": config,