diff --git a/comfy/choices.py b/comfy/choices.py index ed5e22dd4..70cf35026 100644 --- a/comfy/choices.py +++ b/comfy/choices.py @@ -15,7 +15,7 @@ class LogicError(Exception): def get_seed(): return int.from_bytes(os.urandom(8), byteorder='big') -def translate_choices(text, seed=None): +def translate(text, seed=None): ''' Parses the text, translating "{A|B|C}" choices into a single choice. An option is chosen randomly from the available options. diff --git a/nodes.py b/nodes.py index 70da7ec3e..92d58d7cc 100644 --- a/nodes.py +++ b/nodes.py @@ -14,7 +14,7 @@ from PIL.PngImagePlugin import PngInfo import numpy as np import safetensors.torch -from comfy.choices import translate_choices +import comfy.choices sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(__file__)), "comfy")) @@ -1479,7 +1479,7 @@ class DynamicPrompt: CATEGORY = "conditioning" def dynamic_prompt(self, text, seed): - translated_prompt_text = translate_choices(text, seed) + translated_prompt_text = comfy.choices.translate(text, seed) return (translated_prompt_text,)