bc5196dc96c0d356d524094de81b5265c061dae7
Moved the random number generator (rng) from a class-level attribute to an instance-level attribute. This is initialized in the __init__ method using a provided seed. This change allows each instance of PromptGenerator to have its own random number generator, ensuring independent behavior across instances and improving reproducibility when a seed is provided Adjusted the seed handling logic in the generate_prompt method to allow 0 as a valid seed. This change ensures that all valid seed values are handled correctly. Replaced random.choice and random.sample with self.rng.choices and self.rng.sample respectively, throughout the generate_prompt method and other methods where random operations are performed. This change ensures that all random operations use the instance-level random number generator, improving reproducibility. Updated method names to follow the PEP 8 convention of lowercase with words separated by underscores. This change improves readability and consistency with Python naming conventions.
comfyui_dagthomas
Custom nodes for ComfyUI
SDXL Auto Prompter
"subject" input field can be changed to support your style or lora, just add your subject and it will overwrite "man, woman ..." etc.
Easy prompting for generation of endless random art pieces and photographs!
Languages
Python
84%
JavaScript
15%
HTML
1%