Skip to content

An advanced updated parser designed for A1111. provides advanced parsing and scheduling functionality for prompts in Stable Diffusion models

License

Notifications You must be signed in to change notification settings

Kittensx/Prompt-Architect-for-A1111

Repository files navigation

Bug Fix 7/18/2025

A bug was found and reported and fixed. A check inside this block was added to check for number node and resolve it to ta tree if it was needed. Before we just tried doing v=float(number_node) without first extracting it.

Convert number_node to a float (scheduling weight or total steps percentage)
            try:
                # Ensure we extract a leaf if it's a Tree
                if isinstance(number_node, lark.Tree):
                    number_node = resolve_tree(number_node)

                v = float(number_node)
            except ValueError:
                return

Prompt-Architect-for-A1111

Updated 1/10/2025

Forge - rename the file to "prompt_parser" full file is "prompt_parser.py" and place in your modules folder.

A1111 - rename the file to "prompt_parser" full file is "prompt_parser.py" and place in your modules folder.

Updated 12/6/2024

Each sequential folder adds a new function. The last "08_updated Sequence" changed a few things to properly address the new functions. Use that version to have the most up to date parse rules.

The original first version has been renamed to "prompt_parser(version1).py"

An advanced updated parser designed for A1111. provides advanced parsing and scheduling functionality for prompts in Stable Diffusion models

Conceptual Review Groupings (Using {} for Related Elements):

Pros: Grouping is excellent for controlling related elements, such as combining a scene’s objects (e.g., "lush rainforest, serene waterfall") or managing single-item appearances (e.g., "a majestic buck on moss-covered rocks"). It avoids unintended duplication (e.g., multiple deer appearing when only one is desired). Allows for logical organization of prompt sections, which makes complex prompts easier to manage.

Cons: Requires precision. Overweighting within groups can sometimes limit the diversity of generated results. May reduce randomization if weights heavily favor one item.

Suggested Use: Use groupings for related but distinct components of a scene (e.g., objects, wildlife, or lighting effects). When precision is critical (e.g., a single subject like a deer), use groupings to limit multiplicity.

Scheduling Transitions with More Than Two Objects: Pros: Provides a natural evolution of elements within the image (e.g., "misty clouds transitioning to clear skies"). Adds dynamism and variety to the output, making the scene feel alive or multi-layered. Allows finer-grained control over gradual changes in composition (e.g., more mist in the background as the scene progresses).

Cons: Too many transitions can dilute the impact of specific visual elements. If not weighted properly, key details may be underrepresented. Adds complexity that may not always translate into visible differences.

Suggested Use: Use scheduling transitions sparingly for atmospheric or lighting elements (e.g., mist, lighting, or depth effects). Limit to 2–3 transitions in a single prompt unless you’re exploring variations intentionally.

About

An advanced updated parser designed for A1111. provides advanced parsing and scheduling functionality for prompts in Stable Diffusion models

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages