[PR #29] [MERGED] Filtered Prompts and Better A1111 State Intigration Update #31

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

📋 Pull Request Information

Original PR: https://github.com/Extraltodeus/test_my_prompt/pull/29
Author: @SmirkingKitsune
Created: 5/22/2024
Status: ✅ Merged
Merged: 6/3/2024
Merged by: @Extraltodeus

Base: main ← Head: patch-1


📝 Commits (4)

  • 88bcbb8 Filtered Prompts and Better A1111 State Intigration Update
  • 7298733 Update test_my_prompt_custom_script.py
  • 9217078 Bug Fix test_my_prompt_custom_script.py
  • b775eb5 Bug fix for a Bug Fix test_my_prompt_custom_script.py

📊 Changes

1 file changed (+43 additions, -4 deletions)

View changed files

📝 scripts/test_my_prompt_custom_script.py (+43 -4)

📄 Description

Commit includes a feature to filter prompts from the prompt_array and better integration with A1111 shared state.

Filtered Prompts:

  • New UI textbox that will allow users to specifically designate keywords that should not be tested.
  • Textbox will use the separator for string interpretation.
  • The prompt_array array will no longer store empty entries.
  • Designed to work with the shared state job_count system.

Improved Shared State Integration:

  • Script will communicate with the state job system, allowing loading bars to operate correctly and log steps to be calculated for overall jobs.
  • Script will now obey the skip command, allowing users to skip a job_no (In A1111 every image rendered is a job_no, while the overall jobs is job_count)
  • Script will now obey the interrupted and stopping_generation commands. Allowing users to prematurely terminate the job loop.

Special notes:

  • On line 66, filtered_prompt_array can be replaced with prompt_array, but state.job_count will needs to be decremented at the excluded keyword check on line 87. If we use prompt_array there will be an overestimation of steps at the beginning of a run if excluded_keywords is used by the user, but using the aforementioned decrement will fix the overestimation as the excluded keywords are excluded.
    • I got around this problem by counting the number of runs in the prompt_array and excluded the excluded_keyword from that count. I think it looks nicer if the script did not need to correct the job state, so I created the filtered_prompt_array to fix this, but filtered_prompt_array is not used anywhere else.

🔄 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/Extraltodeus/test_my_prompt/pull/29 **Author:** [@SmirkingKitsune](https://github.com/SmirkingKitsune) **Created:** 5/22/2024 **Status:** ✅ Merged **Merged:** 6/3/2024 **Merged by:** [@Extraltodeus](https://github.com/Extraltodeus) **Base:** `main` ← **Head:** `patch-1` --- ### 📝 Commits (4) - [`88bcbb8`](https://github.com/Extraltodeus/test_my_prompt/commit/88bcbb8ae7b61b00a728fc5d044e4507999cdf2b) Filtered Prompts and Better A1111 State Intigration Update - [`7298733`](https://github.com/Extraltodeus/test_my_prompt/commit/7298733ec48e7770ef4fee470877a3e77795791a) Update test_my_prompt_custom_script.py - [`9217078`](https://github.com/Extraltodeus/test_my_prompt/commit/92170783c5e8ee79c522a1eefc330d0b6e7f1a9e) Bug Fix test_my_prompt_custom_script.py - [`b775eb5`](https://github.com/Extraltodeus/test_my_prompt/commit/b775eb56cfc86d72630cca125d0fb8ca51eb7471) Bug fix for a Bug Fix test_my_prompt_custom_script.py ### 📊 Changes **1 file changed** (+43 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `scripts/test_my_prompt_custom_script.py` (+43 -4) </details> ### 📄 Description Commit includes a feature to filter prompts from the `prompt_array` and better integration with A1111 shared state. Filtered Prompts: - New UI textbox that will allow users to specifically designate keywords that should not be tested. - Textbox will use the separator for string interpretation. - The `prompt_array` array will no longer store empty entries. - Designed to work with the shared state `job_count` system. Improved Shared State Integration: - Script will communicate with the state job system, allowing loading bars to operate correctly and log steps to be calculated for overall jobs. - Script will now obey the skip command, allowing users to skip a `job_no` (In A1111 every image rendered is a `job_no`, while the overall jobs is `job_count`) - Script will now obey the `interrupted` and `stopping_generation` commands. Allowing users to prematurely terminate the job loop. ~~Special notes:~~ - ~~On line 66, `filtered_prompt_array` can be replaced with `prompt_array`, but `state.job_count` will needs to be decremented at the excluded keyword check on line 87. If we use `prompt_array` there will be an overestimation of steps at the beginning of a run if `excluded_keywords` is used by the user, but using the aforementioned decrement will fix the overestimation as the excluded keywords are excluded.~~ - ~~I got around this problem by counting the number of runs in the `prompt_array` and excluded the `excluded_keyword` from that count. I think it looks nicer if the script did not need to correct the job state, so I created the `filtered_prompt_array` to fix this, but `filtered_prompt_array` is not used anywhere else.~~ --- <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:43 +00:00
Sign in to join this conversation.
No labels
pull-request
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
Extraltodeus/test_my_prompt#31
No description provided.