From 98cd5ef79c2d1ea54f7a7b1845100c1d09217dbb Mon Sep 17 00:00:00 2001 From: bennykok Date: Sat, 10 Aug 2024 10:02:01 -0700 Subject: [PATCH] fix: randomize noise RandomNoise, KSamplerAdvanced, SamplerCustom --- custom_routes.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/custom_routes.py b/custom_routes.py index 4b4405d..7703ec2 100644 --- a/custom_routes.py +++ b/custom_routes.py @@ -223,6 +223,15 @@ def apply_random_seed_to_workflow(workflow_api): if workflow_api[key]['class_type'] == "PromptExpansion": workflow_api[key]['inputs']['seed'] = randomSeed(8); continue + if workflow_api[key]['class_type'] == "RandomNoise": + workflow_api[key]['inputs']['noise_seed'] = randomSeed(); + continue + if workflow_api[key]['class_type'] == "KSamplerAdvanced": + workflow_api[key]['inputs']['noise_seed'] = randomSeed(); + continue + if workflow_api[key]['class_type'] == "SamplerCustom": + workflow_api[key]['inputs']['noise_seed'] = randomSeed(); + continue workflow_api[key]['inputs']['seed'] = randomSeed(); def apply_inputs_to_workflow(workflow_api: Any, inputs: Any, sid: str = None):