adieyal / dynamicprompts

Templating language for generating prompts for text to image generators such as Stable Diffusion
MIT License
124 stars 20 forks source link

Allow variable assignments to refer to the same variable name #68

Open akx opened 1 year ago

akx commented 1 year ago

I'd like to make parent-context-referent variable references possible (e.g. ${animal=fox} {${animal=fluffy ${animal} } }, but that will require an API change for SamplingContext (a stack of variables). If we can live with that, sure, I think we can ship.

Originally posted by @akx in https://github.com/adieyal/dynamicprompts/issues/63#issuecomment-1489221413