Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support new SYNTAX something like __&wildcard__ in yaml #791

Open
bluelovers opened this issue Jun 9, 2024 · 3 comments
Open

support new SYNTAX something like __&wildcard__ in yaml #791

bluelovers opened this issue Jun 9, 2024 · 3 comments

Comments

@bluelovers
Copy link

test-wildcards-root:
  # new Syntax
  random1:
    # should for return >= 2
    - >-
      {2-$$__test-wildcards-root/a1__}
    # should for return >= 3
    - >-
      {3-$$__test-wildcards-root/a3__}
    # should for return >= 6
    - >-
      {6-$$__test-wildcards-root/a4__}
  # new Syntax for make a1 = [bbb1, bbb2, bbb3, bbb4]
  a1:
    - __&test-wildcards-root/b1__
  # new Syntax for make a3 = [bbb1, bbb2, bbb3, bbb4, a333]
  a3:
    - __&test-wildcards-root/b1__
    - a333
  # new Syntax for make a4 = [bbb1, bbb2, bbb3, bbb4, b222, b2222, b22222, a333]
  a4:
    - __&test-wildcards-root/b*__
    - a333
  # current always return only 1
  random2:
    - >-
      {2-$$__test-wildcards-root/a2__}
  a2:
    - __test-wildcards-root/b1__
  b1:
    - bbb1
    - bbb2
    - bbb3
    - bbb4
  b2:
    - b222
    - b2222
    - b22222
@ryankhart
Copy link

Any luck on finding a solution to this yet? This is what I've been trying to figure out as well. I'm trying to figure out which extension is the best place to request this change since I use this, plus a1111-sd-webui-tagcomplete, plus Umi-AI-Embeds to allow the autocomplete to work with YAML wildcards as per the tagcomplete extension's readme. But it seems like those other two extensions might just deal with the autocomplete aspect as YAML wildcards still work with just sd-dymanic-prompts installed alone.

@akx
Copy link
Collaborator

akx commented Sep 10, 2024

I'm sorry, the examples don't help me understand what this feature would do.

@ryankhart
Copy link

ryankhart commented Sep 11, 2024

I don't really know what of all that example yaml text has to do with anything. I was just looking at the title of this issue.

The problem is that the sd-dymanic-prompt feature to "Save template to metadata: Write prompt template into the PNG metadata" does not work when the prompt template includes wildcards that come from .yaml files. Instead, it just takes the end prompt with the expanded text taken from all wildcards (.yaml or .txt) and puts that into the template metadata instead.

What we want is for that template to include the text that existed in the positive and negative prompt boxes before we clicked on the "Generate" button.

Edit:
I'm just realizing that this might be a separate issue. I might just open this up in a new issues and copy and paste what I wrote there. I just saw "wildcard" and "yaml" and my mind made an assumption.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants