fix: randomize noise RandomNoise, KSamplerAdvanced, SamplerCustom

This commit is contained in:
bennykok 2024-08-10 10:02:01 -07:00
parent 4bce5cadfb
commit 98cd5ef79c

View File

@ -223,6 +223,15 @@ def apply_random_seed_to_workflow(workflow_api):
if workflow_api[key]['class_type'] == "PromptExpansion": if workflow_api[key]['class_type'] == "PromptExpansion":
workflow_api[key]['inputs']['seed'] = randomSeed(8); workflow_api[key]['inputs']['seed'] = randomSeed(8);
continue 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(); workflow_api[key]['inputs']['seed'] = randomSeed();
def apply_inputs_to_workflow(workflow_api: Any, inputs: Any, sid: str = None): def apply_inputs_to_workflow(workflow_api: Any, inputs: Any, sid: str = None):