Closed SmirkingKitsune closed 1 month ago
~~BIG IMPORTANT SPECIAL NOTE:
Since this uses the API, it might require the --api
command argument to be declared at runtime.~~ No longer matters as of https://github.com/Alvi-alvarez/sd-Img2img-batch-interrogator/pull/10/commits/1f8d5373503c2c5f77ab476934180e1813b2fe33.
Supplementary note:
ViT-L-14/openai
model and Fast
mode. This is slightly different from the defaults in 'clip-interrogator-ext', where they use Best
mode.ViT-L-14/openai
model and Best
mode. Changed in https://github.com/Alvi-alvarez/sd-Img2img-batch-interrogator/pull/10/commits/6b1b47f3929bfebeffecf2f81dcf9d494f6e726dwd-v1-4-moat-tagger.v2
model with a 0.35
threshold. Personally I would prefer to set the model to be one of WD's v3 models my preference being wd-swinv2-tagger.v3
, but I also know that wd-vit-v3
is pretty good. Anyways I went with their defaults, since the MOAT tagger is really good with VRAM.The purpose of https://github.com/Alvi-alvarez/sd-Img2img-batch-interrogator/pull/10/commits/6b1b47f3929bfebeffecf2f81dcf9d494f6e726d is so that this script can be run alongside any other script one might want to use in img2img. By making this a AlwaysVisible element on the img2img tab, the script dropdown can select other scripts. Such as in the case of using outpainting or text matrix, but still wanting to interrogate the imported images. Removed pending bug investigation in https://github.com/Alvi-alvarez/sd-Img2img-batch-interrogator/commit/b7f1440367a332d696dd4e217ab3d54f6e5677cf
Always Visible is the source of the bug. Always Visible functions was rolled back in https://github.com/Alvi-alvarez/sd-Img2img-batch-interrogator/pull/10/commits/b7f1440367a332d696dd4e217ab3d54f6e5677cf pending further investigation.
Major overhaul to this patch. I was unsatisfied with the performance and restraints that working through the API caused. So API has been removed in favor of direct extension interactions.
Updated initial pull request comment to reflect these changes.
Thank you. I will test it as soon as I will be at home. I really appreciate.
"0_0", "(o)_(o)", "+_+", "+_-", "._.", "<o>_<o>", "<|>_<|>", "=_=", ">_<", "3_3", "6_9", ">_o", "@_@", "^_^", "o_o", "u_u", "x_x", "|_|", "||_||"
There is a known quirk with the model_selector
, where the models "CLIP (EXT)"
and "WD (EXT)"
will still appear the first time users click on the model_selector
drop down menu, even if the associated extensions are not installed or enabled. The options will not be selectable if associated extensions are not installed or enabled. The options will disappear the 2nd time the user opens up the model_selector
drop down menu.
Attempted Fixes:
"CLIP (EXT)"
and "WD (EXT)"
from the model_options
list."CLIP (EXT)"
and "WD (EXT)"
until update_model_choices
was called. It gets called after user opens the model_selector
.update_model_choices
function at UI
declaration.Since the options are not selectable, it is not dangerous to runtime. Since the associated options disappear after the Fixed as of https://github.com/Alvi-alvarez/sd-Img2img-batch-interrogator/pull/10/commits/b3743e43b22c6d45abdf5b1bff46861a0f2266dfupdate_model_choices
is called after first menu click, it is self correcting. Further investigation required to resolve this quirk.
Changes in https://github.com/Alvi-alvarez/sd-Img2img-batch-interrogator/pull/10/commits/b3743e43b22c6d45abdf5b1bff46861a0f2266df to resolve model_selector
quirk:
update_model_choices
and changed the nature of checking for extensions to resolve quirk. update_model_choices
is now the get_initial_model_options
.model_selector
is no longer dynamic during runtime.Notes on https://github.com/Alvi-alvarez/sd-Img2img-batch-interrogator/pull/10/commits/17b11276b0dcd91c8542ac661ab238d52a81eb5d for bug fix:
There were a lot of things that needed to be changed to get AlwaysVisible
to work correctly and as expected. Along the way, I implemented some tools that I thought would be fun or interesting.
process_batch
method. - This should run even if only one image is in queue.job_no
is less than or equal to 0, as the start of a batch job is uncontaminated.prompt_weight
is no longer on by default.prompt_weight
into the experimental tools section.'s
, ...
. and a variety of emojis as no_puncuation_mode
exaggeration_mode
reverse_mode
UTF-8
, in the event that custom filter prompt includes unusual characters.prompt_weight_mode
from the in_front
logic, so that they operate independently, allowing for contamination cleaner's interrogation collection at the end of a job.prompt_weight
slider's step scale has been increased by a decimal place. batch_number
is not 0, it means that there is a duplicate job, identical to the previous job, so interrogation does not need to be run.remove_punctuation
tool has some known emojis that might trigger the attention syntax system, it needs to be monitored be further investigated on if pruning is necessary. p.prompt
technically has the correct prompt, but modifying it will be staggered to the next job. The same happens with the process_batch
variable prompt[]
, I suspect this to be a silent bug.
p.all_prompts[]
p.negative_prompt
, and p.all_negative_prompts[]
in the reverse_mode
tool.no_punctuation_mode
.custom_filter
read/write functions to encode in utf-8
custom_filter
reusing the new optimized exaggeration code.custom_filter.txt
or custom_replace.txt
cannot be found, a blank will be generated when the specific not found error "[Errno 2] No such file or directory: 'extensions/sd-Img2img-batch-interrogator/custom_replace.txt'"
is logged to the console. ui_components
module.
This update implements a new set of features to improve the interrogations of img2img interrogations. Now additional interrogators from A1111 extensions can be used to interrogate images. Additionally, I added some UI cleanup to keep from over cluttering the UI. This should also resolve issue #9.
New Interaction Suite: Changed in https://github.com/Alvi-alvarez/sd-Img2img-batch-interrogator/pull/10/commits/1f8d5373503c2c5f77ab476934180e1813b2fe33.
Added API awareness.Removed in https://github.com/Alvi-alvarez/sd-Img2img-batch-interrogator/pull/10/commits/1f8d5373503c2c5f77ab476934180e1813b2fe33.UI Overhaul:
up_front
checkbox to a radio.APIinterrogators will not see the option to use them in themodel_selector
. Changed in https://github.com/Alvi-alvarez/sd-Img2img-batch-interrogator/pull/10/commits/1f8d5373503c2c5f77ab476934180e1813b2fe33.Made extension always visible on the img2img tab. This will allow for other scripts to be run alongside extension. Added in https://github.com/Alvi-alvarez/sd-Img2img-batch-interrogator/pull/10/commits/6b1b47f3929bfebeffecf2f81dcf9d494f6e726dRemoved pending investigation in https://github.com/Alvi-alvarez/sd-Img2img-batch-interrogator/pull/10/commits/b7f1440367a332d696dd4e217ab3d54f6e5677cfAdded triggers to determine if the script should run. Triggers are if a model is selected or if an image is present. Added in https://github.com/Alvi-alvarez/sd-Img2img-batch-interrogator/pull/10/commits/6b1b47f3929bfebeffecf2f81dcf9d494f6e726dRemoved pending investigation in https://github.com/Alvi-alvarez/sd-Img2img-batch-interrogator/pull/10/commits/b7f1440367a332d696dd4e217ab3d54f6e5677cfBug Fixes:
\
with forward slashes/
for better OS compatibility.Script will no longer run if there is no image to interrogate, (I think that img2img probably should not run if there is no images anyways...) Added in https://github.com/Alvi-alvarez/sd-Img2img-batch-interrogator/pull/10/commits/6b1b47f3929bfebeffecf2f81dcf9d494f6e726dRemoved pending investigation in https://github.com/Alvi-alvarez/sd-Img2img-batch-interrogator/pull/10/commits/b7f1440367a332d696dd4e217ab3d54f6e5677cfSpecial Notes:
TheRemoved in https://github.com/Alvi-alvarez/sd-Img2img-batch-interrogator/pull/10/commits/1f8d5373503c2c5f77ab476934180e1813b2fe33.get_server_address
function has a fallback from an earlier iteration of this update. As far as I can tell through testing, it will not need the fallback. It can be removed, but it is there just in case.The WD14 Tagger API often deadlocked when I was testing it, but I think it was my system it did not like. I put a timeout on it to prevent A1111 from becoming deadlocked. However, I am unsure if the timeout time is too long or too short.No longer matters as of https://github.com/Alvi-alvarez/sd-Img2img-batch-interrogator/pull/10/commits/1f8d5373503c2c5f77ab476934180e1813b2fe33.There is no way to unload the CLIP Interrogator models fromFixed in https://github.com/Alvi-alvarez/sd-Img2img-batch-interrogator/pull/10/commits/1f8d5373503c2c5f77ab476934180e1813b2fe33.img2img-batch-interrogator
, it must be unloaded from the CLIP Interrogator tab. Unsure if we should place a label indicating that CLIP API models are not unloaded and need to be unloaded in their tab.- I was unsure if we should add the option to unload WD14 models after use. Since it would be unloaded then reloaded over and over in a batch job. However, to do that simply run theAdded this in https://github.com/Alvi-alvarez/sd-Img2img-batch-interrogator/pull/10/commits/e47443ee98ab852e149c8395f98f3bfc1843927bpost_wd_api_unload
function in therun
.