Closed mwootendev closed 8 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
e377980
) 97.43% compared to head (8e74296
) 97.44%.
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Thanks!
Beyond the inline comments, could you also update the documentation to include this feature?
Where should this be added? It looks like all of the variable functionality is actually documented in the sd-dynamic-prompts project.
Where should this be added? It looks like all of the variable functionality is actually documented in the sd-dynamic-prompts project.
Heck, that's a good question. I opened (EDIT: and merged) https://github.com/adieyal/dynamicprompts/pull/117 and https://github.com/adieyal/sd-dynamic-prompts/pull/701 to improve and sync the docs between the two repos, so please rebase and add the new stuff into docs/SYNTAX.md
:)
Where should this be added? It looks like all of the variable functionality is actually documented in the sd-dynamic-prompts project.
Heck, that's a good question. I opened (EDIT: and merged) #117 and adieyal/sd-dynamic-prompts#701 to improve and sync the docs between the two repos, so please rebase and add the new stuff into
docs/SYNTAX.md
:)
I updated the pull request with a new section in SYNTAX.md
@akx @adieyal are there additional changes needed?
Makes a minor change to the
VariableAssignmentCommand
to include a new booleanpreserve
property, which is set by placing a?
before the=
in the assignment.Updating the
SamplingContext
to test for the newpreserve
property before processing the assignment. The value being assigned is only associated with the variable if the variable did not already exist in the context. Without thepreserve
property, the value will always be assigned.Example Wildcards:
Example Prompts:
The functionality is similar to default values for variables, but will allow the variable values to propagate to other nested prompts and retain some consistency.