Commit Graph

296 Commits (bda8701734e584969eeb98e74de453da9344cc27)

Author SHA1 Message Date
DominikDoom b28497764f Check keywords for .pt and .ckpt loras too
Especially for custom keywords, the preset list mostly uses safetensors
2023-07-23 11:27:02 +02:00
DominikDoom 0d9d5f1e44 Safety check & remove log 2023-07-23 11:08:29 +02:00
DominikDoom de3380818e Quote lora filenames to handle commas in filenames
Fixes #206
2023-07-23 11:05:44 +02:00
DominikDoom e47c14ab5e Refresh temp files now also reloads the keyword dict 2023-07-22 15:33:42 +02:00
DominikDoom c41372143d Add option to load only user list for keywords 2023-07-22 14:08:32 +02:00
DominikDoom f1d911834b Fix keyword name check for single element dicts
(important for user defined mappings with a unique hash)
2023-07-22 13:41:48 +02:00
DominikDoom 40d9fc1079 Add ability to undo keyword insertion directly after 2023-07-22 13:07:06 +02:00
DominikDoom 88fa4398c8 Fix for hash collisions as long as the mapping file specifies a name in addition 2023-07-22 12:06:00 +02:00
DominikDoom 3496fa58d9 Add trigger word completion using the model-keyword extension
Works for both the built-in and user defined list
Restructure some of the python helper for path reusability
2023-07-22 12:06:00 +02:00
DominikDoom 737b697357 Fix for insertion adding space before comma even if not needed 2023-07-08 18:03:44 +02:00
DominikDoom 707202ed71 Add override option for space at end of prompt
Closes #196
2023-07-06 12:53:16 +02:00
DominikDoom 922414b4ba Add separate "append spaces" setting
Also rewrote settings to use newer webui features
2023-07-06 12:39:47 +02:00
DominikDoom 4923c8a177 Add first-difference based wildcard completion
along with an option to choose the wanted mode
2023-06-20 18:22:08 +02:00
DominikDoom 9632909f72 Add safeguards so a wrong translation file format setting doesn't break the script
This should also prevent the issue in #189
2023-06-20 10:00:28 +02:00
DominikDoom 7be3066d77 Partial wildcard completion & color coding for subfolders
As proposed in #190
2023-06-20 09:58:57 +02:00
DominikDoom 9b66d42111 Fix wildcards selection closing after mouse select
Fixes #184
2023-06-05 21:50:30 +02:00
DominikDoom 2d7e6181f5 Fix embed refresh & JS selector 2023-05-26 17:18:53 +02:00
DominikDoom eff53d0ca7 Reset embeds too 2023-05-26 16:47:42 +02:00
DominikDoom a7da670e97 New "setting" for reloading temp files
This allows refreshing Lora, lycos, hypernets and wildcards without having to restart the UI
2023-05-26 15:40:25 +02:00
DominikDoom 6997558714 Support for hires fix prompts
Only available on the webui dev branch for now.
Closes #179
2023-05-21 13:54:38 +02:00
DominikDoom a95f422f10 Merge branch 'feature-rubytext' into main
Live translation feature, pretty WIP so expect some bugs
2023-05-15 19:06:09 +02:00
DominikDoom 3169c4c653 Support searching chants by name 2023-05-11 21:17:55 +02:00
DominikDoom 1d40449942 Use file selection for chants, fix sorting 2023-05-11 18:37:55 +02:00
DominikDoom 495feb026c Fix formatting 2023-05-11 17:30:47 +02:00
Gin 79b670eaea fix chants search issue 2023-05-11 13:46:45 +08:00
Gin 6b51dc806b fix chants search issue 2023-05-11 12:47:01 +08:00
Gin 5b9af499c3 吟唱模板功能基本完成 2023-05-11 12:11:18 +08:00
Gin aed449c882 fix chant issue 2023-05-11 11:21:53 +08:00
Gin a724da362c try chants 2023-05-11 10:18:49 +08:00
DominikDoom cc67adf82f Fix quicksettings dropdown changes not being detected
Fixes #176
2023-05-09 14:42:32 +02:00
DominikDoom c1d610e390 Fix list sometimes not scrolling to top (again) 2023-05-08 19:06:11 +02:00
DominikDoom 7fabc84a1e Prefix CFG and loading vars to prevent collisions 2023-05-08 18:47:05 +02:00
DominikDoom 5d5db7bafe Fix for gradio 3.16
Should resolve part of #175
2023-05-07 20:45:20 +02:00
DominikDoom 40edb89974 Fix model name not being detected after startup
Fixes #174
2023-05-06 20:09:24 +02:00
DominikDoom f9f7732c69 Add missing safety check
Fixes #173
2023-05-06 11:54:34 +02:00
DominikDoom e7af9dbfba Remove unnecessary css
Has become obsolete with recent gradio update
2023-05-05 16:00:52 +02:00
DominikDoom 64cf9b2159 Make model dropdown selectors a bit more compact 2023-05-05 15:58:47 +02:00
DominikDoom ba38d1b893 Fix model change detection in newest gradio
Fixes #172
2023-05-05 11:28:01 +02:00
DominikDoom 4442cb78ec Add theme detection fallback for old versions 2023-05-04 13:06:10 +02:00
DominikDoom 68b4224f37 Add support for tiled-diffusion
https://github.com/pkuliyi2015/multidiffusion-upscaler-for-automatic1111
2023-05-04 12:26:55 +02:00
DominikDoom fc6c1ff579 Add on-demand textarea setup for accordions
Closes #170
2023-05-04 12:25:49 +02:00
ReUnknown 664ae50c1a Support for Tagger 2023-05-03 19:49:42 +09:00
ReUnknown 8912957a26 Support for image browser 2023-05-03 19:35:27 +09:00
DominikDoom 0e177d0945 Add option for live preview 2023-05-02 17:59:36 +02:00
DominikDoom 94365630c7 Fix end-of-tag detection for brackets before a weight modifier 2023-05-02 17:46:04 +02:00
DominikDoom d4941c7b73 Fix rt color 2023-05-02 17:46:04 +02:00
DominikDoom 91fb1cba38 Fix replacer matching partial words
Now checks for end of word / string or tag boundary correctly
2023-05-02 17:46:04 +02:00
DominikDoom 3169420fd3 Fix parentheses parsing 2023-05-02 17:46:04 +02:00
DominikDoom 84b6a0394e Fix more bugs related to replacing
Also some involving parentheses
2023-05-02 17:46:04 +02:00
DominikDoom 38fd2523e6 Fix issue with self-containing tags, add auto select on click 2023-05-02 17:46:04 +02:00
DominikDoom 85db4a61df Adjust styling for bigger translation 2023-05-02 17:46:04 +02:00
DominikDoom b18823e88f Sliding window search, fix double replacement 2023-05-02 17:46:04 +02:00
DominikDoom 83461e2f54 Ruby Text live translation feature (WIP) 2023-05-02 17:46:04 +02:00
DominikDoom a2e7b6bf6c Also fix dark mode detection for tag colors 2023-05-02 12:30:04 +02:00
derrian-distro 672d409e46 fixed issue in which dark mode was not detected on new auto 2023-05-01 15:06:05 -04:00
DominikDoom 3b51035c26 Fix extra file translations being overwritten if translation file changes 2023-04-21 21:21:21 +02:00
DominikDoom dcc6602056 Allow translations directly in extra file
QoL feature so you don't need to switch files for the small extra sets
Closes #164
2023-04-21 10:32:52 +02:00
Kamilowaty122 11d94e11f9 Add support for LyCORIS
Adds support for LyCORIS from https://github.com/KohakuBlueleaf/a1111-sd-webui-lycoris
2023-04-15 07:49:11 +02:00
DominikDoom 5fbc18ed1d Use correct separator for extra networks
Now uses the dedicated webui option for it instead of comma
Closes #160
2023-04-13 20:54:48 +02:00
DominikDoom 873a15b5f6 Move user mappings to options to prevent override
Adresses #127
2023-04-03 14:14:39 +02:00
Dominik Reh 811d4622e9 Model switch fallback for older gradio versions
Fixes #149
2023-03-28 20:49:09 +02:00
Dominik Reh 296b9456cc Don't block enter if no tag is selected
Fixes #147
2023-03-27 01:19:24 +02:00
Dominik Reh 2571a4f70a Fix for last commit 2023-03-26 10:56:11 +02:00
Dominik Reh f8e15307c6 Set notranslate class & attribute for results
Potential fix for #144
2023-03-26 10:45:03 +02:00
Dominik Reh 95ebde9fce Small check to prevent error during UI restart
Not completely fixed due to gradioApp() stack overflow, but the only thing I can do on my side.
2023-03-25 14:01:37 +01:00
Dominik Reh c08746a2c0 Fix model name based blacklist
Now also based on the hash mutation observer
2023-03-25 13:40:04 +01:00
DominikDoom 39abf1fe3a
Merge pull request #141 from space-nuko/gradio-3.22.1 2023-03-25 13:22:13 +01:00
space-nuko b047095f80 Fix for `gradioApp()` 2023-03-21 19:13:05 -04:00
space-nuko caf65bfda0 Fixes for Gradio 3.22.1 2023-03-20 04:21:05 -04:00
Dominik Reh e7fa5aca18 Allow longer weighted editing
Also ignores closing parentheses now for writing a prompt in brackets
See #107
2023-03-18 16:03:21 +01:00
Dominik Reh f026e7631c Fix "Only show alias" option
Fixes #140
2023-03-16 16:30:17 +01:00
Dominik Reh d1fff7bfa7 Use _ as a stand-in for spaces in < completion
Allows to continue typing embeddings, loras and hypernets if they have spaces in their file name
Closes #130
2023-03-01 11:14:06 +01:00
Dominik Reh 90664d47bf Fixes for PR #128
Replaced the caret position detection with a more robust version
Added option to turn it off
2023-02-26 17:58:00 +01:00
For-ACGN bc56c3ca72
add function getTextWidth and improve showResults. 2023-02-26 15:39:17 +08:00
Dominik Reh 712c4a5862 Trigger on unabbreviated lora/hypernet prefix
Makes going back to edit or switch out stuff easier since you don't need to erase the prefix anymore
2023-02-24 14:59:20 +01:00
Dominik Reh b5817b8d4a Use built-in input update event
This also solves the annoying console error after completion, which was due to missing the target property
See https://github.com/gradio-app/gradio/issues/2981 for details
2023-02-21 18:25:17 +01:00
Dominik Reh 6269c40580 Custom key bindings
Closes #127
2023-02-18 13:25:13 +01:00
Dominik Reh 76bd983ba3 Fix right alignment for count/meta text 2023-02-11 15:26:18 +01:00
Dominik Reh 2de1c720ee Merge branch 'feature-extendability' into main 2023-02-11 15:15:46 +01:00
Dominik Reh f2c3574da7 Rework extra file system
Now just for adding new custom tags either before or after the rest
2023-02-11 14:13:42 +01:00
Dominik Reh b4fe4f717a Extract sanitization / text edit before insertion 2023-02-11 13:36:39 +01:00
Dominik Reh 9ff721ffcb Fix word break behavior for new max-width change
Closes #72, at least with a simple solution
2023-02-11 12:32:42 +01:00
viyiviyi f74cecf0aa
Fixes repeated file loads during setup and limits result width (#126)
Thanks to @viyiviyi
2023-02-11 12:10:31 +01:00
Dominik Reh b540400110 Allow spaces in wildcard file names 2023-02-10 12:23:52 +01:00
Dominik Reh d29298e0cc Move anti-caching parameter to load function
For less repetition and shorter paths in the higher level functions.
Active by default, but can be disabled.
2023-02-10 11:59:06 +01:00
Dominik Reh cbeced9121 Extract file load to queue
This enables other parsers to keep their load function in the same file
2023-02-10 11:55:56 +01:00
Dominik Reh c70a18919b Make tag regex work with more < configurations
Will now allow completion of a < tag if the one directly after is also a < tag only separated by a space.
(Happens often now that Loras are a thing and <>'s stay in the prompt with them)
2023-02-02 18:56:07 +01:00
Dominik Reh db3319b0d3 Fix long lists not scrolling to top on reset 2023-01-29 18:43:09 +01:00
Dominik Reh a588e0b989 Extract embeddings, hypernets and loras 2023-01-29 18:36:09 +01:00
Dominik Reh b22435dd32 Extract wildcard keep open as well 2023-01-29 17:58:21 +01:00
Dominik Reh b0347d1ca7 Extract UMI after insert update 2023-01-29 17:36:02 +01:00
Dominik Reh fad8b3dc88 Safety checks 2023-01-29 17:19:24 +01:00
Dominik Reh 95eb9dd6e9 Extract UMI completion (base) 2023-01-29 17:19:15 +01:00
Dominik Reh 93ee32175d Wildcard fixes & cleanup 2023-01-29 17:16:09 +01:00
Dominik Reh 86fafeebf5 Fix for undefined returns 2023-01-29 17:14:05 +01:00
Dominik Reh 29d1e7212d Rename queues to fit const naming convention 2023-01-29 16:40:04 +01:00
Dominik Reh 8e14221739 Extract wildcard completion 2023-01-29 01:00:02 +01:00
Dominik Reh cd80710708 Implement parser queue 2023-01-29 00:45:00 +01:00
Dominik Reh 3e0a7cc796 Custom error for missing override 2023-01-29 00:37:39 +01:00
Dominik Reh 98000bd2fc Fix copy-paste error 2023-01-28 23:46:22 +01:00
Dominik Reh d1d3cd2bf5 Add queue processing & callbacks 2023-01-28 23:28:15 +01:00
Dominik Reh b70b0b72cb Add base parser 2023-01-28 22:58:29 +01:00
Dominik Reh a831592c3c Rename globals file to ensure it's loaded first 2023-01-28 22:57:58 +01:00
Dominik Reh e00199cf06 Move potentially shared vars to separate file
to ensure that they exist when other parts reference them
2023-01-28 22:36:16 +01:00
Dominik Reh dc34db53e4 Trim carriage return from hyp and lora txts 2023-01-28 22:30:04 +01:00
Dominik Reh e418a867b3 Merge branch 'hyp-lora-support' into main 2023-01-24 15:23:53 +01:00
Dominik Reh 040be35162 Don't escape parentheses for loras and hypernets 2023-01-24 15:03:56 +01:00
Dominik Reh 316d45e2fa Use extra network multiplier from settings 2023-01-24 15:03:35 +01:00
Dominik Reh 8ab0e2504b Fix meta display, add mixed results
< will show all three, while <e: <h: or <l: will limit it to that type.
2023-01-24 14:51:55 +01:00
Dominik Reh b29b496b88 Simplify lora and hypernetwork loading 2023-01-24 14:08:11 +01:00
Dominik Reh e144f0d388 Make script work without settings tab
Fixes #116
2023-01-24 13:08:43 +01:00
JM ae01f41f30 add support for hypernetworks and lora 2023-01-22 19:24:59 +01:00
Dominik Reh 7fdad1bf62 Add back ability to use hashes in black/whitelist
They are displayed in the UI after all, just not in the dropdown but at the bottom
2023-01-14 14:57:39 +01:00
Dominik Reh a91a098243 Change blacklist to use model name instead of hash
Hotfix for recent webui changes to use proper sha256 hashes, which is currently not displayed in the UI
2023-01-14 14:24:44 +01:00
Dominik Reh c663abcbcb Fix wiki links showing on embeddings & wildcards 2023-01-13 19:33:43 +01:00
Dominik Reh bec222f2b3 Fix for 1-letter completion
Completion would sometimes not show if the prompt was only one letter long and identical to the previous completion
2023-01-12 15:54:57 +01:00
Dominik Reh d4db6a7907 Option to show ? wiki links for danbooru/e621 tags
Disabled by default since the wiki pages likely contain NSFW images.
Closes #109
2023-01-12 15:49:53 +01:00
Dominik Reh 52593e6ac8 Update setting descriptions for black/whitelist 2023-01-12 14:45:16 +01:00
Dominik Reh 849e346924 Black/whitelisting options for models
Enables selective (de)activation based on model hash.
Closes #14
2023-01-12 14:35:54 +01:00
Dominik Reh 25b285bea3 Styling adjustments 2023-01-10 15:10:13 +01:00
Dominik Reh 984a7e772a File comments 2023-01-10 15:01:22 +01:00
Dominik Reh 964b4fcff3 Rework results system
Now uses object properties instead of array indices, much less confusing
2023-01-10 14:59:09 +01:00
Dominik Reh 54641ddbfc Move utility functions to their own file 2023-01-10 14:58:25 +01:00
Dominik Reh 552c6517b8 Make new settings id the default behavior instead of fallback 2023-01-03 11:14:16 +01:00
MMaker 2ba513bedc
fix: Add fallback to applySettingsButton var
Need due to layout change in recent webui update
269f6e8676
2023-01-03 00:07:15 -05:00
Dominik Reh 454c13ef6d Fix for embedding search without v1/v2 prefix 2023-01-02 00:44:56 +01:00
Dominik Reh 6deefda279 Show version info for embeddings
Also allows searching by version to quickly find v1 or v2 model embeddings
Closes #97
2023-01-02 00:38:48 +01:00
Dominik Reh b57042edd0 Remove leftover debug logs 2022-12-26 13:31:04 +01:00
ctwrs 0c3397aee6 Fix umi tag autocomplete filtering logic 2022-12-26 01:57:15 +01:00
ctwrs d2b5142d7d Umi filtering - initial version 2022-12-24 01:32:45 +01:00
Dominik Reh bdd8cf68c7 Fix show all condition 2022-12-22 12:39:00 +01:00
Dominik Reh 63a0d2e73e Bugfixes for change detection & multiple umi tags
(WIP)
2022-12-20 19:45:07 +01:00
Dominik Reh 34ba08d804 Extract regexes for easier editing & testing 2022-12-20 18:25:37 +01:00
Dominik Reh f1a437ff48 Autocompletion for UMI yaml wildcards 2022-12-20 17:08:09 +01:00
Dominik Reh 3d1ca6893a Fix formatting 2022-12-19 10:32:47 +01:00
Dominik Reh 73c3424ab3 Fix for script load if no third party found
Added missing null check
Fixes #87
2022-12-19 10:23:34 +01:00
Dominik Reh 1c22a22abe Support third party textboxes
Base functionality for third party textboxes, specifically Dataset Tag Editor
Closes #83
2022-12-18 14:15:37 +01:00
Dominik Reh 4f68a50a25 Fix styling for tac refresh buttons
Add change listener for settings of type 'select'
2022-11-26 14:45:43 +01:00
Dominik Reh 05c11c9781 Finalize settings migration
- Dropdown selection & refresh for tag files
- Tag, Extra & Translation file reloading without restart
- Any options can now be added to the quicksettings bar
- Standalone colors.json file
2022-11-26 14:29:20 +01:00
Dominik Reh def6ebb798 Initial changes for settings migration 2022-11-21 19:11:20 +01:00
Dominik Reh e4a8ee7439 Move settings inline
As mentioned in #71
2022-11-20 12:28:47 +01:00
Dominik Reh 1c3e60cfb2 Use fetch instead of XmlHttpRequest
Easier to use and also seems to be faster
2022-11-19 18:43:04 +01:00
batvbs 894335f1de
Improved search function (#75)
Now only searches for matches at the start of tags or sub-words in multi-word-tags.
Old behavior can still be used by typing * at the beginning of the word.
2022-11-14 12:56:59 +01:00
Dominik Reh 2d45d6c796 Dynamic css construction for less duplicate code
Inserts variables for light/dark mode instead of keeping separate css for both
Fixes scrollbar space being reserved in chrome where it's not needed.
2022-11-07 19:25:51 +01:00
Dominik Reh ca8a0c433e Fix result text cutoff in Firefox
Fixes #65
2022-11-06 14:33:11 +01:00
Dominik Reh 535c2a6753 Safety checks for translations
Should prevent list getting cut off if no translation or alias matches
2022-11-06 14:16:56 +01:00
Dominik Reh e86c604903 Fix for translations failing to match sometimes
Fixes #62 (again)
2022-11-06 14:00:34 +01:00
Dominik Reh 4eabf00f01 Remove max width for resutls
Fixes #65
2022-11-05 18:27:53 +01:00
Dominik Reh 18556c6115 Rework translation to be separate from aliases
Enables two-way translation where the translation is always visible.
Closes #62.
2022-11-05 15:54:26 +01:00
Dominik Reh 2c6b6e7f13 Count and Alias support
The data and script have been updated to include post count and common aliases for tags.
Aliases are added the same way as translations.
Closes #60.
2022-11-04 15:50:27 +01:00