[PR #339] [MERGED] Improve compatibility of dynamicprompts YAML wildcards #308

Closed
opened 2026-10-30 21:22:13 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/DominikDoom/a1111-sd-webui-tagcomplete/pull/339
Author: @yak1ex
Created: 3/21/2026
Status: ✅ Merged
Merged: 3/21/2026
Merged by: @DominikDoom

Base: main ← Head: fix-prefix-for-yaml-for-dynamicprompts


📝 Commits (2)

  • 7e49257 Prepend folder path to keys in dynamicprompts YAML files.
  • 9db492f Treat a single string as a collection of one item in dynamicprompts YAML files.

📊 Changes

1 file changed (+10 additions, -6 deletions)

View changed files

📝 scripts/tag_autocomplete_helper.py (+10 -6)

📄 Description

The current implementation for handling YAML wildcards is inconsistent with dynamicprompts in two ways:

  1. Folder paths are prepended to tree structures in YAML.
  2. Single strings are parsed as collections containing a single item.

Folder paths are prepended to tree structures in YAML.

The relevant code can be found at github.com/adieyal/dynamicprompts@58815af851/src/dynamicprompts/wildcards/tree/build.py (L40).

Only the folder component (file_path.parent) is prepended.

Single strings are parsed as collections containing a single item.

See the implementation at github.com/adieyal/dynamicprompts@58815af851/src/dynamicprompts/wildcards/collection/structured.py (L71).

This behavior is not clearly documented in dynamicprompts; I have submitted a PR to update the documentation: https://github.com/adieyal/dynamicprompts/pull/144

Example

# a/b/c.yaml
key: value

With the YAML file above, the placeholder __a/b/key__ expands to value.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/DominikDoom/a1111-sd-webui-tagcomplete/pull/339 **Author:** [@yak1ex](https://github.com/yak1ex) **Created:** 3/21/2026 **Status:** ✅ Merged **Merged:** 3/21/2026 **Merged by:** [@DominikDoom](https://github.com/DominikDoom) **Base:** `main` ← **Head:** `fix-prefix-for-yaml-for-dynamicprompts` --- ### 📝 Commits (2) - [`7e49257`](https://github.com/DominikDoom/a1111-sd-webui-tagcomplete/commit/7e4925737060136ceae6645ce89d41f119a9ab22) Prepend folder path to keys in dynamicprompts YAML files. - [`9db492f`](https://github.com/DominikDoom/a1111-sd-webui-tagcomplete/commit/9db492fd0a1f77f268c11bfb321f57c174aa46e5) Treat a single string as a collection of one item in dynamicprompts YAML files. ### 📊 Changes **1 file changed** (+10 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `scripts/tag_autocomplete_helper.py` (+10 -6) </details> ### 📄 Description The current implementation for handling YAML wildcards is inconsistent with dynamicprompts in two ways: 1. Folder paths are prepended to tree structures in YAML. 2. Single strings are parsed as collections containing a single item. ### Folder paths are prepended to tree structures in YAML. The relevant code can be found at https://github.com/adieyal/dynamicprompts/blob/58815af851848fdfd0ed89e18c483dd37eb2a9b1/src/dynamicprompts/wildcards/tree/build.py#L40. Only the folder component (`file_path.parent`) is prepended. ### Single strings are parsed as collections containing a single item. See the implementation at https://github.com/adieyal/dynamicprompts/blob/58815af851848fdfd0ed89e18c483dd37eb2a9b1/src/dynamicprompts/wildcards/collection/structured.py#L71. This behavior is not clearly documented in dynamicprompts; I have submitted a PR to update the documentation: https://github.com/adieyal/dynamicprompts/pull/144 ### Example ```yaml # a/b/c.yaml key: value ``` With the YAML file above, the placeholder `__a/b/key__` expands to `value`. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-30 21:22:13 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
DominikDoom/a1111-sd-webui-tagcomplete#308
No description provided.