96 KiB
Changelog
All notable changes to this project will be documented in this file.
For more details on new features, please check the Manual.
11.0.0 - 31 May 2024
Added
- Template Workflows: You can now save the settings for your active templates and shortcodes to a custom JSON file! Quickly swap between workflows and share them with others
- Wizard
[template]now supports theidkwarg: if specified, this value will be saved to the workflow JSON rather than the template name - this is useful if the name often changes between updates (i.e. if it contains a version number) - Overhauled the introductory section of templates and shortcodes in the Wizard UI: each now has an assortment of tabs (About, Documentation, Changelog)
- Templates that utilize presets (
templates/common/presets/...) will also look intemplates/user/presetsnow - Stylebook v0.1.0
- Bodysnatcher v2.0.0
- Facelift v0.2.0
- Magic Spice v0.1.0
- Distillery v0.2.1
- Regional Prompter Buddy v0.2.0
- New feature
Skip gen, use last image(s): This will pseudo-skip the image generation process by setting inference steps to 1, then it replaces the result with a cached copy of the last image(s) you made - useful for testing Unprompted operations on an existing image - New setting
Config.stable_diffusion.cached_images_limit: Maximum number of generated images to store in the cache for use with the new "Skip generation" feature - Unprompted now has partial support for passing image objects through variables: the new helper function
str_to_pil()converts a string beginning with<PIL.Image.Image...to an image object through the memory address - New shortcode
[image_edit]: Performs a wide variety of image operations [array]: Now supports the_startand_endkwargs, which allow you to retrieve a consecutive range of values from the array[array]: When_startand/or_endare specified in addition to_fill, only values within the specified range will be affected by the_fill[array]: Now supports the_stepkwarg, which adjusts the step size for processing the_startand_endrange (defaults to 1, or every index)[array]: Now supports the_inclusivekwarg, which determines whether the upper bound of the range (_end) should be treated as inclusive or exclusive (defaults to true)[call]: Now supports the_placeskwarg, which lets you define multiple possible locations for the template you're calling - it will use the first location that exists[img2pez]: Theimage_pathkwarg now supports loading all images in a folder via wildcard[img2pez]: Now supports atarget_promptwhich can be used on its own or in addition toimage_path[img2pez]: Now supportsclip_presetwhich provides an easy way to select a compatible pair ofclip_modelandpretrain_clipsettings[wizard]: Now supports thetabblock type[wizard]: Now supports themarkdownblock type[faceswap]: Call the "unload" pipeline to free the cache on demand[filelist]: Improved handling of subdirectory wildcards[filelist]: Now supports the_recursiveparg to enable this option in theglob()filter[filelist]: Now supports parsing multiple paths with a delimiter[filelist]: Now supports the_placeskwarg, which is a delimited list of paths to use in place of%PLACE%of your main path string[replace]: Now supports the_nowparg to run the replacement query before executing inner content[replace]: Now supports the_strictparg to only evaluate "to" expressions on matches[interrogate]: Now supports "WaifuDiffusion as an interrogationmethod[interrogate]: Now supports theconfidence_thresholdkwarg for use with the WaifuDiffusion method, set between 0.0 and 1.0[interrogate]: Now supports theblacklist_tagskwarg for use with the WaifuDiffusion method[restore_faces]: New restoration methodsRestoreFormerandRestoreFormerPlusPlus(Note: These methods are fast, but GPEN is still the king in terms of quality)[restore_faces]: Implemented a series of performance optimizations for GPEN which are now available as a separate restoration methodGPENO(this also disables unnecessary operations such as SR.)[restore_faces]: Now supports thebackbonekwarg for GPEN RetinaFace network[init_image]: Will now return the current image if no pargs are specified[img2img_autosize]: Thetargetproperty now takes your model's architecture into account (sd1/sdxl)[get]: Now supports Image variables[for]: Variable initialization is now optional, allowing for greater control over the loop processing, e.g.[for "some_var < 5" "{set some_var _append}2{/set}"]is a valid loop[txt2mask]: New methodtris(source)[txt2mask]: Now supportsblurkwarg, particularly useful outside of img2img mode- Wizard Template banner images are now automatically loaded; make sure the banner is in the same directory as the template, and has the same filename with a
.pngextension - Wizard dropdown blocks now support
_allow_custom_valueparg - The
wizard_generate_template()function now returns a delimited string for UI elements with list values (e.g. multiselect dropdowns) - The
parse_filepath()method can now take a delimited list of paths - You can override the banner filepath in
[template]using thebannerkwarg - New function
shortcode_install_requirements()to install shortcode dependencies when needed, instead of installing everything at WebUI startup - New setting
Config.syntax.sanitize_last: Rules in this section are immune to the stripping of extra spaces - Special strings
%SPACE%and%NEWLINE%for when you need fine control over the resulting string - New system variable
sd_res: resolution that corresponds to your checkpoint's architecture (i.e. 512 for sd1, 768 for sd2, 1024 for sdxl) docs/TODO.mdfor things I'd like to implement in the future- New routine
goodbye(), the Unprompted order of operations is nowrun()->cleanup()->after()->goodbye()
Changed
- Reworked
wizard_generate_shortcode(),wizard_generate_template(), andwizard_process_autoincludes()methods to eliminate the need for many event listeners - greatly improving the UI performance - The Wizard
[template]shortcode has been converted from a block to an atomic shortcode - Renamed
templates/common/functionstotemplates/common/wizard - Organized built-in Wizard templates into individual subfolders
- Gradio elements created by
[wizard]will no longer save to the WebUI'sui-config.json - Replaced the Wizard banner gradient effect with CSS
- The Wizard dropdown
_multiselectkwarg changed to a parg - The shortcode
ui()method now expects Gradio objects to be returned as a list, which is necessary in order to support the new Workflow event listeners - The Wizard template shortcode generator will always wrap kwargs in quotation marks now, to prevent possible issues with replacement terms
- Moved most install requirements into individual shortcodes
- The Wizard generation text has been converted to a code block
Fixed
[img2pez]: Now requiressentence-transformers==2.2.2to prevent issue with newer versions of the module[faceswap]: Fixed an issue related to caching of face embeddings[array]: Fixed an issue when getting array values from a delimited string[txt2mask]: Removed unnecessary read/write to disk operation- Corrected issue with
install.pyhandling of required modules that include== - Fixed an issue where the
parse_arg()function could interfere with the evaluation ofkwargsandpargsin other methods - Gradio Image components created by the Wizard no longer steal clipboard focus from other WebUI Image components
- Implemented
release()event listeners to more accurately track changes in certain objects such as sliders
Removed
[autotone]: Equivalent functionality available in[image_edit][resize]: Equivalent functionality available in[image_edit]- All legacy shortcodes (
[file],[controlnet],[enable_multi_images])
👴🏼 Older Versions
10.12.0 - 2 May 2024
Added
- New presets at
common/presets/dimensions: Easily set your width and height to popular values, with support for both SD 1.5 and SDXL models - Magic Spice v0.0.3: Replaced
aspect_ratiobuttons with the newcommon/presets/dimensionsfile dropdown - Distillery v0.2.0: Implemented support for the new
Hyper-SD-CFGmethod, which is now the default - Distillery v0.2.0: Can now download LORA files for
Hyper-SDandHyper-SD-CFGfrom Civitai - Distillery v0.2.0: Minor UI improvements
- Magic Spice preset
booru_spice_v3: Refined quality tags to improve prompt adherence [case]: Now supports multiple pargs, e.g. you can use[case "some_val" "another_val"]and if either value matches your switch variable, it will process the[case]content[civitai]: Now parses the_idkwarg as an advanced expression
Fixed
- Fixed an issue with seed reproducibility
- Fixed console warning about empty "Unprompted Negative Prompt"
- Fixed multiple issues related to
wizard_generate_autoinclude()
10.11.0 - 30 April 2024
Added
- Buttons for clearing all shortcode and template auto-includes
- Wizard dropdown menus now have a visual indicator for items that are being auto-included
- Wizard Templates now support
destinationkwarg for the template block, which lets you specify the auto-include destination (defaults to "prompt") - Wizard Shortcodes now support
self.destinationin the__init__()block - Similarly, Wizard Templates and Shortcodes support the
orderkwarg andself.orderto override the default value of 1
Changed
[zoom_enhance]: The default value ofupscale_widthandupscale_heightis now -1, which will be processed as 512px for SD 1.5 and 1024px for SDXL
Fixed
[zoom_enhance]: Updated for compatibility with WebUI v1.9.0- Syntax processing issue related to Generate Shortcode button
10.10.0 - 25 April 2024
Added
- Wizard Autoincludes can now be sent to the
prompt,negative_prompt, anafterblock, or set to a custom variable of your choosing - You can now specify the execution order for your Wizard Autoincludes, overriding the default alphabetical order
- New settings
Config.ui.wizard_template_autoincludesandConfig.ui.wizard_shortcode_autoincludes: Enable certain templates/shortcodes on UI startup (these are dictionaries, where each key is the template name and the value is the autoinclude destination e.g.{"Magic Spice v0.0.2":"prompt"}) - Distillery v0.1.0 template: Now supports the new Hyper-SD technique
Changed
- Renamed the SDXL Lightning template to Distillery, as it will now support various model distillation methods moving forward
- The
namevar in Wizard Template Auto-includes has been changed totemplate_name - Improved Wizard Template field reader logic
- The default value of
Config.ui.wizard_prependschanged to False - The autoinclude checkbox no longer writes to the WebUI's
ui-config.jsonfile (though the entries are not retroactively removed) - Distillery v0.1.0: Changed default values of
new_cfganddistill_strength
Fixed
[img2img]: Updated for compatibility with WebUI 1.9.0 by creating a patched version of the standardimg2img()method[img2img]: Fixed issue related to reading thepromptandnegative_promptvariables on batch index #1[set]: Attempting to_appendor_prependto a variable that doesn't exist will no longer throw an error[set]: Fixed an issue with_choicesand_newwhen the existing value was cast to an int- Fixed an issue with batch processing when initial seed set to -1 producing images with non-sequential seeds
- Fixed an issue that could cause random seeds to become predictable
10.9.0 - 19 April 2024
Added
- New free template SDXL Lightning: Allows you to easily enable use of Lightning LORAs
[civitai]: Now supports parsing shortcodes within the_fileand_mvidkwargs
Changed
- Magic Spice v0.0.2 template: Set the default
inference_presettonone - Magic Spice v0.0.2 template: Set
do_gptto 0
Fixed
- Fixed a bug that prevented Wizard templates from setting slider elements to a float value by default
Removed
- All txt2img
lightningpresets, simply enable the new SDXL Lightning template instead
10.8.0 - 25 March 2024
Added
[gpt]: Now supportstokenizerkwarg to load a separate model as the tokenizer[gpt]: Now supportstransformers_classkwarg to specify the methods of inference, defaults toauto[gpt]: Now supportsprefixandaffixkwargs to include extra strings in the returned result[gpt]: Catch exception when there are issues with themodelortokenizer[replace]: Now supports delimited values in_fromand_tokwargs- Magic Spice preset
booru_spice_v2: Updated syntax for better compatibility with Animagine XL 3.1 - Magic Spice preset
photo_spice_v2: Updated GPT model to SuperPrompt - Magic Spice preset
allspice_v2: Updated GPT model to SuperPrompt - New config setting
Config.ui.wizard_prepends: Determines whether the Wizard's autoincludes are prepended or appended to your prompt (defaults to true; prepend) - New txt2img preset
dpm_lightning_8step_merged_v1: Compatible only with Forge UI, use with models that have prebaked Lightning lora
Fixed
photo_spice_v2: Fixed an issue with thedo_fluffvariable[zoom_enhance]: Fixed a possible crash due to unusedscipypackage[img2img]: Fixed an issue with Forge WebUI
10.7.0 - 6 March 2024
Added
- New shortcode
[autotone]: Adjusts the black point of the image to enhance contrast (should be placed inside an[after]block) - New free template Magic Spice v0.0.1: Produces high-quality images regardless of the simplicity of your prompt, using ideas from Fooocus and elsewhere
[faceswap]: Now supports thegender_bonuskwarg to boost facial similarity score when source and target genders are equal (compatible with insightface pipeline only)[faceswap]: Now supports theage_influencekwarg to penalize facial similarity score based on the difference of ages between source and target faces (compatible with insightface pipeline only)[faceswap]: Now supports theprefer_gpukwarg to run inference on the video card if possible[faceswap]: Themake_embeddingoption will now save gender and age values into the blended embedding[faceswap]: The insightface analyser is now properly cached, improving inference time significantly[gpt]: Now supports theinstructionkwarg to help steer models that are capable of following instruction-response format prompts- Added a customized
insightface_cudapackage that swaps hardcoded CPU references to CUDA equivalents - Wizard UI now supports
_linesand_max_linesto specify number of rows in a textbox UI element - Unprompted now detects if you're using the Forge WebUI
- New txt2img preset
restart_fast_v1 - New txt2img preset
dpm_lightning_8step_v1: Uses the new Lightning sampler and Lora in Forge WebUI for super fast SDXL inference - New helper function
str_to_rgb() - Facelift template banner image
Changed
[gpt]: The default GPT-2 model is nowLykosAI/GPT-Prompt-Expansion-Fooocus-v2[gpt]: Renamed thecacheparg tounloadto match naming convention of other shortcodes- Facelift template now defaults to the
fast_v1preset
Fixed
- The
wizard_generate_shortcode()andwizard_generate_template()methods will no longer escape special HTML characters in the prompt [after]: Fixed compatibility issue with Forge WebUI[faceswap]: Theexport_embeddingparg will now bypass the cache to avoid errors- The
get_local_file_dir()method now uses theunprompted_dirvariable in case Unprompted is not in the usualextensionsdirectory
Removed
- Developer presets
10.6.0 - 1 December 2023
Added
- New settings
Config.ui.wizard_shortcodes,Config.ui.wizard_templates,Config.ui.wizard_capture: Allows you to disable certain Wizard tabs in order to improve WebUI performance [max]and[min]: Supports the_keyparg to return the key of the max/min value instead of the value itself[max]and[min]: Can now parse values given as a list separated byConfig.syntax.delimiter[get]: Supports the_keykwarg to return the names of requested variables instead of their values[get]: Supports the_regexkwarg to return the values of matching variables
Changed
[set]: Now parses the value of the first parg, allowing you to use shortcodes in evaluating the variable name[get]: The default value of_sepis nowConfig.syntax.delimiterinstead of space
Fixed
[faceswap]: Fixedembedding_pathprocessing
10.5.0 - 25 November 2023
About
This update introduces global variables, several image processing shortcodes and improvements to some included templates and presets. The image features were motivated by Unprompted's integration with BooruDatasetTagManager (my own PR.) For example, you can use [image_info] to assess image quality and influence the results of the Autotagger. Enjoy!
Added
- New shortcode
[resize]: Resizes the image to the given dimensions, works with the SD image by default [resize]can be toggled to perform a crop instead- New shortcode
[image_info]: Returns various types of metadata about the image, including quality assessment via the pyiqa toolbox - New shortcode
[cast]: Converts the content to a given datatype - New config setting
globals: Allows you to create variables in key/value format that will be available to all templates and shortcodes - New config setting
Syntax.global_prefix: The prefix for global variables, defaults toglobal_ [get]: Automatically runs variables through the parser if they begin withUnprompted.Config.syntax.global_prefix, which means that global variables can be initialized to complex values such as function names or other shortcodes[get]: New parg_read_only, use with_parsein order to prevent the parser from writing the result back to the variable (which is the new default behavior of_parse)[txt2mask]: New kwargaspect_varwhich returns the aspect ratio of the mask- Regional Prompter Buddy v0.1.0: Now references
global_subjectfor defaultsubject_a - Regional Prompter Buddy v0.1.0: Adjusted default settings to improve speed of workflows
- Bodysnatcher v1.5.0: New setting
max_image_sizesize to limit the dimensions of the output image - Bodysnatcher v1.5.0: New setting
mask_informs_sizewhich uses the mask aspect ratio to determine the inpainting dimensions - Bodysnatcher v1.5.0: New setting
mask_size_limitto cap the dimensions of the aforementioned feature - Bodysnatcher v1.5.0: New setting
mask_paddingto adjust the padding applied by[txt2mask] - Bodysnatcher v1.5.0: Now references
global_subject,global_prefix, andglobal_classfor default values - Bodysnatcher v1.5.0: Now uses the new
vivarium_v3preset by default - Bodysnatcher v1.5.0: Minor UI updates
viviarum_v3ControlNet preset: Now uses thereferencemodel at a low strength to help preserve lightingvivarium_v3ControlNet preset: Adjusts denoising strength depending on whether an inpainting model is activevivarium_v3ControlNet preset: Now referencesglobal_negative_promptfor inferencevivarium_v3ControlNet preset: No longer specifiesmask_methodas I find the preset equally effective with or without it, albeit in different ways - try both!best_quality_v4Facelift preset: Now prefers theTGHQFace8x_500kESRGAN model, as the4xFaceUpDATmodel is throwing errors in the current WebUI- ControlNet image variables can now take a PIL object in addition to a filepath
- New
Reload Unpromptedbutton in the WebUI - Warning message about the (presently significant) limitations of Gradio's dynamic refresh capabilities and temporarily disabled some refresh features
Fixed
[round]: Fixed error with rounding ints- The
Unprompted.current_image()method now takes care to update the size ofimage_maskif needed
10.4.2 - 20 November 2023
Fixed
[max]: Fixed an issue with float values
10.4.1 - 20 November 2023
Changed
- Tweaked
shared.pyimport statements to make importing Unprompted from other locations a bit easier - Updated
requirements.txt
10.4.0 - 10 November 2023
Added
[faceswap]: New kwargvisibilityto control the alpha value of the swapped face, defaults to 1.0[faceswap]: New pargexport_embeddingthat will save a file of the averaged faces to the given filepath (in safetensors format)[faceswap]: New kwargembedding_paththat allows you to specify a filepath for the exported embedding[faceswap]: You can load a composite face embedding by passing it in the first parg, this is only compatible with theinsightfacepipeline- Facelift preset
make_embedding: Generates a composite face embedding from the given face filepaths - Facelift preset
best_quality_v3: Reduces the visibility of the faceswap slightly in order to maintain some of the original textures - Facelift preset
best_quality_v3: Now prefers the4xFaceUpDATESRGAN model - Facelift v0.1.1: The
facesupload window now shows safetensors files in addition to images - Bodysnatcher v1.4.4: Minor UI updates
- Bodysnatcher preset
vivarium_v2: Adjusted inference settings and enabled[txt2mask]support - Wizard UI type
file: The_file_typeskwarg now supports delimited values
Changed
- Regional Prompter Buddy v0.0.4: Reduced default
flip_chanceto 0 - Regional Prompter Buddy v0.0.4: Disabled
base_promptby default to match default setting in Regional Prompter
Fixed
- Wizard: Fixed a crash that could occur while parsing shortcodes inside of a
[wizard]block - Updated "Getting Started" guide for compatibility with current
[overrides]syntax
10.3.1 - 5 November 2023
Fixed
[config]: Hotfix for inline JSON parsing
10.3.0 - 5 November 2023
Added
Config.syntax.cleanup_extra_spaces: Determines default behavior of theprocess_string()function with regard to trimming extra spaces (not thoroughly tested; setting this to false may cause issues with certain shortcodes)- Unprompted will print the contents of the
pobject if your logger is set toDEBUG - Bodysnatcher v1.4.3: Supports
keep_handsandkeep_feeteven whenmask_modeis "none"
Changed
[faceswap]: Improved caching of the face object when adding or changing face filepaths[log]and[logs]: The default logging context is now inherited fromConfig.logging.level[while]: Addedpreprocess_block()to delay execution of inner content until expression is evaluated as true- Bodysnatcher v1.4.3: Sets
inpainting_mask_invertto true whenmask_modeis "none" - Bodysnatcher v1.4.3: Adjusted interrogation syntax
Fixed
[img2img]: Removed unnecessary loop through samplers[upscale]: Fixed shortcode not working whenmodelsvalue did not include a delimiter
10.2.3 - 29 October 2023
Fixed
- Fixed a batch processing issue that could cause the negative prompt to repeat itself
10.2.2 - 29 October 2023
Fixed
- Additional fixes for hires variables not syncing properly with batch process
10.2.1 - 28 October 2023
Added
- New ControlNet preset
vivarium_v1: Uses theinstruct_p2pmodel and opinionated inference settings for a quick and fairly accurate bodyswap - Bodysnatcher v1.4.2: Added option to disable
[txt2mask]feature
Fixed
- Fixed an issue related to the hires prompt not updating correctly for the first image in a batch
10.2.0 - 27 October 2023
Added
- New shortcode
[tags]: Assigns arbitrary metatags that can be used in conjunction with a filter for bypassing the content - New shortcode
[filter_tags]: Bypasses the content of[tags]blocks that do not match the given filter - New shortcode
[logs]: Atomic version of[log]that allows you print multiple messages at once - Blue badge with the number of active Wizard scripts, similar to ControlNet
- New setting
Config.syntax.not_operator: Allows you to change the character used for the "not" operator, defaults to!(currently only used for tags) - New guide: "Using Metatags with Your
[choose]Blocks"
Changed
- Wizard "auto-include" string now contains name of the current script or shortcode
- Shuffle the Unprompted promo on UI load
- Minor CSS improvements
Fixed
[override]: Fixed a syntax error- Fixed an error related to setting
batch_count> 1 with hires fix enabled
10.1.5 - 18 October 2023
Fixed
- Wizard UI: Fixed an issue related to block shortcode content
[txt2mask]: Fixed a crash that could occur with theshowparg[color_correct]: Fixed missing Wizard UI
10.1.4 - 17 October 2023
Fixed
[zoom_enhance]: Additional fixes for thebypass_adaptive_hiresparg
10.1.3 - 16 October 2023
Changed
[interrogate]: Now caches the image and caption to speed up future calls to the same image- Bodysnatcher v1.4.1: Moved the interrogation result to the back of the prompt
Fixed
[zoom_enhance]: Fixed an error related to thebypass_adaptive_hiresparg- The Wizard parser no longer escapes quotation marks
- The Wizard parser will automatically convert brackets into nested alt tags for compatibility with
[call]arguments - The Wizard parser will automatically convert double quotes to single quotes
10.1.2 - 14 October 2023
Fixed
[get]: Fixed the_varkwarg
10.1.1 - 14 October 2023
Fixed
- Resolved an issue with the negative prompt not updating correctly in some batch processing scenarios as well as for Style presets
10.1.0 - 13 October 2023
Added
- New shortcode
[upscale]: Enhances a given image using one the WebUI's upscaler methods - New shortcode
[interrogate]: Generates a caption for the given image using various techniques [civitai]: Now supports_wordsparg to include the activation text in your prompt, also writing it to the companion JSON file- Facelift v0.1.0: Upgraded preset
best_quality_v2which now applies[upscale]as a final step - New helper method
ensure(): Converts a variable to a datatype if it isn't already that datatype - Bodysnatcher v1.4.0: Optionally interrogate the starting image
- ControlNet model variables may now refer to the name presets in
Config.stable_diffusion.controlnet.sd1_models; you can adjust these to match your own filenames - The CN config has a place for SDXL models too, although I haven't added any entries there yet
- Updated img2img preset
full_denoise_v3: Reduced the CFG scale and disabled mask blur
Changed
- The setting
Config.stable_diffusion.controlnet_namehas been renamed toConfig.stable_diffusion.controlnet.extension
Fixed
- The template editor will correctly parse files with emojis now
10.0.2 - 13 October 2023
Added
[else]: Now supportsdebugparg to print diagnostic information- New img2img preset:
subtle_v1 - Updated ControlNet preset
photo_generaland renamed tomagic_mirror_v2 - Updated ControlNet preset
photo_fastand renamed toquickshot_v2
Changed
[faceswap]: Lowered the default value ofminimum_similarityfrom 0 to -1000- Renamed ControlNet preset
photo_inpainting_v1tofidelity_v1 - Renamed ControlNet preset
photo_facetoface_doctor_v1 - Facelift v0.0.2: Now defaults to the
best_qualitypreset - Bodysnatcher v1.3.5: Updated the default
prefixfrom "photo of" to "high detail RAW photo of" - Bodysnatcher v1.3.5: No longer runs
[img2img_autosize]when you are onOnly maskedmode - Bodysnatcher v1.3.5: Now applies 5px of negative mask padding when using the
Keep original handsoption, which can significantly improve blending of new image - Bodysnatcher v1.3.5: The Zoom Enhance features are now disabled by default, as Facelift is a better fit with Bodysnatcher
- Bodysnatcher v1.3.5: Updated the default
inference_presettosubtle_v1 - Bodysnatcher v1.3.5: Updated documentation
- Updated credits in
README.md
Fixed
[else]: Fixed a potential issue related to nested conditional logic[faceswap]: Speculative workaround for an issue related to insightface and a missing Cython dependency- Replaced a few instances of
[file]with[call]in the stock templates - Bodysnatcher v1.3.5: Fixed an error that would occur when
Keep handswas disabled butKeep feetwas enabled
Removed
requirements.txtfrom ghost package to resolve Github security warnings
10.0.1 - 11 October 2023
Fixed
[civitai]: Fixed an issue related to the shorthand syntax and thequerykwarg
10.0.0 - 11 October 2023
About
Important: This is a major update with changes to batch processing that may affect pre-existing templates. Please read the changelog carefully.
Added
- New premium template Beautiful Soul: A highly expressive character generator for the A1111 WebUI. With thousands of wildcards and direct ControlNet integration, this is by far our most powerful Unprompted template to date. Available at half price until November 11th!
- New template Facelift v0.0.1: An all-in-one solution for performing faceswaps by combining different models and postprocessing techniques
- New shortcode
[faceswap]: Replaces the face with that of an arbitrary image using various pipelines, including InsightFace (same tech as Roop extension) - New shortcode
[restore_faces]: Improves the quality of faces using various models, including a custom GPEN implementation exclusive to Unprompted - New shortcode
[civitai]: Downloads a file using the Civitai API (unless it's already on your system) and automatically adds it to your prompt with correct formatting - New shortcode
[overrides]: Allows you to force the value of specific variable(s) using inline kwargs ([override]is now a block shortcode instead) - New config setting
Config.formats.default_encodingfor various file operations (defaults touft8) - New config setting
Config.debug_requirements: Set to true inconfig_user.jsonto potentially fix issues with missing dependencies - New class method
Unprompted.parse_arg(): Formats a parg or kwarg by the key, casting to a given datatype as specified (this will gradually replace other methods of processing shortcode args) - New class method
Unprompted.current_image(): Gets or sets the current image with support for txt2img, img2img, batch processing, and the[after]routine - New class method
Unprompted.escape_tags(): Escapes the bracket characters in a string [get]: Now supports_escapeto remove square brackets, useful when used inside of an expression[get]: Now supports_parseto run the requested variable through the shortcode parser before returning[set]: Now supports_deferwhich bypasses shortcode parsing of the content, allowing you to instead parse the variable with[get _parse].[set]: Now supports_show_labelto control whether the label is visible in the Gradio Wizard UI (defaults to True)- Inference presets for txt2img:
dpm_3m_v1,euler_a_v1,restart_v1, andvariety_hour_v1 - Various enhancements for
download_file()helper method - The Wizard now supports Gradio File, Image, Row, and Column blocks
- The Wizard now supports multiselect dropdown values for both shortcode and template UIs
- Print "main routine completed" message to the console
Changed
[after]: Now has dedicated batch support, which eliminates the need to implement batch support on a per-shortcode basis[after]: Replacedallow_dupe_indexwithdupe_index_modethat can be set toskip,concat,append, orreplace[call]: Now evaluates secondary tags in kwarg values[override]: Converted to a block shortcode that forces the value of the first parg to become the result of the content[color_correct]: Updated batch support[if]: Updated truthy check such that string variables will evaluate to true, e.g.[sets var="something"][if var]this is true![/if][wizard accordion]: renamed to[wizard]that reads a block type from the first parg, eitheraccordion,row, orcolumn- Bodysnatcher v1.3.4: Replaced
[file]blocks with[call] - Regional Prompter Buddy v0.0.3: The
split_negativesoption will add extra terms to further differentiate the two subjects - Migrated helper functions to a standalone
lib_unprompted.helpersmodule in accordance with Python standard practices - Updated img2img inference presets:
general_v2andfull_denoise_v2, moved them frominferencefolder toimg2img Unprompted.Config.txt_formatrenamed toUnprompted.Config.formats.txt- Minor improvements to the extension UI layout
- Improved parser error message about unclosed tag
Fixed
[img2img_autosize]: Fixed a crash that would occur when using the Wizard to auto-include this shortcode[if]: Will return false if the provided key doesn't exist as a user variable[set]: Fixed compatibility issue with_rememberand Wizard UI elements- Fixed the "Generate Shortcode" button for Wizard Templates appearing outside of its tab
- Improved flexibility of the backtick escape character such that it should work with any subsequent character
- Resolved error related to the
simpleandverbosemodes of the Capture tab
Removed
- Legacy function
shortcode_string_log() [zoom_enhance]no longer implements its own batch support, instead now relies on that of the[after]block
9.16.1 - 7 September 2023
Fixed
[img2img]: Fixed missing parameters for default WebUI scriptsseedandrefiner
9.16.0 - 7 September 2023
Added
[get]and[set]: Now support_externalkwarg to read/write a specific variable into an external file[get]and[sets]: Now support_all_externalkwarg to read/write all variables into an external file[set]: You can now set_ui="none"in conjunction with_newto avoid adding this block to the Wizard UI[call]: Replaced filepath handling with the updatedUnprompted.parse_filepath()method, which now supports absolute paths[call]: Now supports_suppress_errorsto avoid writing errors to console- Helper function
str_with_ext()that formats a filepath string to include an extension if it's missing one - Helper function
create_load_json()that creates the requested json file before trying to load it, if necessary
Changed
[##]: Now correctly nullifies any shortcodes in the content, including those with malformed syntax
Fixed
[img2img]: Fixed an issue with this shortcode and the After routine in WebUI v1.6.0- Fixed an issue with batch_count > 1 in the latest WebUI
- Fixed an issue related to Wizard auto-includes and blank prompts
- Fixed a couple issues related to deactivating extra networks in batch processing
- Speculative fix for an issue with nested if/else logic
9.15.2 - 31 August 2023
Changed
[img2img]: Updated for compatibility with WebUI v1.6.0[zoom_enhance]: Lowered the defaultcfg_minandcfg_maxvalues for the new DPM++ 3M samplers to 2.0 and 5.0[zoom_enhance]: Improved support fordiscardmask mode- Unprompted Template Editor: Updated for compatibility with WebUI v1.6.0
- Tested compatibility with WebUI v1.6.0 and updated compatibility blurb as such
Fixed
[zoom_enhance]: Fixed alignment issue related tocountour_padding- Wizard Templates: Fixed an issue related to HTML escape sequences with spaces
- Bodysnatcher 1.3.3: Now uses mask mode
discardwith[zoom_enhance]to ensure compatibility with[txt2mask] - Bodysnatcher 1.3.3: Temporarily switched
[zoom_enhance]to_altmode as a workaround for ControlNet compatibility issue
9.15.1 - 8 August 2023
Added
- Github form templates for bug reports and feature requests
Fixed
- Fixed a potential crash related to the
[base_dir]shortcode of the Wizard UI
9.15.0 - 7 August 2023
Added
- Refresh buttons for Wizard Templates and Shortcodes
- Regional Prompter Buddy v0.0.2: New setting
region_delimiterwhich lets you customize the term that separates each region (defaults toBREAK, but you may want to switch it toANDfor Latent Couple) - Regional Prompter Buddy v0.0.2: New setting
prompt_stylewhich determines the overall prompt structure, try setting it toBasicif you want to use this template without another extension - New config setting
logging.deprecated_warnings: Turn this off if you don't wish to see console messages about the use of deprecated or legacy code
Changed
- Updated documentation
Fixed
[img2pez]: Workaround for conflict betweenoptim_utils.pyand WebUI batch processing
9.14.0 - 3 August 2023
About
Unprompted v9.14.0 introduces support for custom functions, greatly improves flexibility of [else] statements, and perhaps most exciting of all: implements [gpt] for text autocompletion and summarization. Enjoy!
Added
- New shortcode
[gpt]: Autocompletes the content with a given GPT model (similar to "Magic Prompt" from Dynamic Prompts) - New shortcode
[function]: Contains arbitrary code that you can call at will - New shortcode
[call]: Allows you to execute a specific[function]or filepath [else]: Now supportsidkwarg which lets you tie specific if/else statements together (thus the[else]block can appear anywhere in the script) - do this by matching the if block's_else_idkwarg with the else block'sidkwarg[call]: Compatible with[else]if a function fails, if the filepath doesn't exist, or if either return the term_false- New config setting
subdirectories.models: determines the folder within your Unprompted directory to store various model files in - New manual category: "For Programmers"
Changed
[else]: Improved comprehension of nested if/else statements[file]: Now considered a legacy shortcode in favor of[call], but will remain available for a while due to widespread use- Separated processing flow into new methods for the Unprompted object:
start(),cleanup()andafter()
Fixed
[get]: Fixed a crash related to the_defaultkwarg
9.13.3 - 1 August 2023
Added
[zoom_enhance]: Now supportsupscale_minwhich is the minimum area that a selected mask must occupy in order to be eligible for enhancement, defaults to 0.03 (which is what it was previously hardcoded to)
Changed
[zoom_enhance]: Theupscale_minvalue is specifically compared against the size of a 512x512 canvas[zoom_enhance]: Updated debug image names and log messages for clarity
Fixed
[zoom_enhance]: Fixed alignment issue related to using the_altparg in txt2img mode
9.13.2 - 1 August 2023
Added
- New special variable
sd_vae: allows you to change the vae file programmatically, similar tosd_model
Changed
- Unprompted will warn you if you try to
[get]or[set]a deprecated variable - Unprompted will warn you if you haven't renamed the extension folder for compatibility with other scripts
- The
populate_stable_diffusion_vars()method has been renamed toupdate_user_vars() - Updated documentation
Fixed
- The
p_copyobject was not functioning correctly in the latest versions of the WebUI, so it has been replaced with direct modifications to the mainpobject instead, hopefully fixing recent issues with[img2img]and[zoom_enhance] - Generating a shortcode with the Wizard no longer strips lora tags from text fields (escapes HTML characters)
[zoom_enhance]: Fixed multiple issues that prevented the use of this shortcode outside of an after block (now you can!)
Removed
- Retired the
log_error()function in favor oflog.exceptionwhich preserves the shortcode name as the logger id
9.13.1 - 30 July 2023
Fixed
- Fixed an issue with updating Extra Networks during batch processing
9.13.0 - 30 July 2023
About
This update improves compatibility with batch_size. You can now mix batch_size and batch_count to your heart's content, and Unprompted will parse each prompt independently. Give it a try!
Added
- New shortcode
[seed]: Allows you to call therandom.seed()method at will, setting it to thep.seedvalue by default - New config setting
stable_diffusion.batch_size_method: allows you to determine how Unprompted will handle tasks wherebatch_size> 1 - New special variable
batch_size_index: Returns the batch_size counter of the current process, e.g. if your batch_size is 4 this will return 0 to 3 - New proxy variable
batch_count_index: Returns the same thing asbatch_index, which may be removed in a future update as the name lacks specificity
Changed
- Config setting
stable_diffusion.batch_methodrenamed tostable_diffusion.batch_count_method - The
stable_diffusion.batch_count_methodvalue oflegacyhas been renamed tosafefor clarity - The
stable_diffusion.batch_count_methodvalue ofnonehas been renamed tounifyfor clarity - Tested compatibility with WebUI v1.5.1 and updated compatibility blurb as such
9.12.0 - 30 July 2023
Added
- New template
Regional Prompter Buddy v0.0.1: This is an experimental template that streamlines and optimizes the prompt for use with the Regional Prompter extension (thank you to @hako-mikan for helping make this possible) [after]: Now handles the bypassing of specific extensions that have known compatibility issues[after]: Supportsallow_unsafe_scriptsparg to bypass the bypasser- New config setting
logging.improve_alignment: responsible for handling separation space between columns of console messages
Changed
- Clipdrop SDXL Styles v0.0.2: Negative prompt terms will be appended to your existing negative prompt, rather than overwriting it
- The default label of a Wizard UI element has been changed from "Setting" to the variable name in titlecase format
- Added top border to Wizard "autoinclude" UI element
- Further improvements to formatting of console messages
Fixed
[after]: Bypasses the Regional Prompter extension as it was causing errors with additional img2img tasks[zoom_enhance]: It is now possible to chain together[zoom_enhance]blocks, at least in txt2img mode- Fixed an issue with
single_seedvariable - Fixed crash related to SDXL and hires fix
9.11.0 - 28 July 2023
Added
- New Wizard template
Clipdrop SDXL Styles: Clipdrop recently disclosed their prompt pre-processing terms for various SDXL presets (comic book, fantasy, etc) so I have adapted them to a simple Wizard UI [img2img]: Can now process multiple init images (better batch support)[img2img]: Now supportsbatch_testexpression[unset]: Now supports pattern matching with*to delete multiple variables from memory, useful if you need to disable ControlNet for the[after]block e.g.[unset cn_* controlnet_*][zoom_enhance]: Now supportsno_syncparg which prevents updates to thepobject, may help to ensure compatibility with other extensions
Changed
- Adjusted a few console messages
Fixed
[txt2mask]: Fixed an issue with updating themodevariable at the end of the process- Bodysnatcher v1.3.2: Unsets the ControlNet units for
[after]processing
9.10.0 - 27 July 2023
About
Unprompted v9.10.0 overhauls the logger and brings quality-of-life improvements for the newly-released SDXL. Congratulations to Stability AI for their incredible work!
Added
- New example template
sdxl_refinerthat automatically refines the image via img2img (this is not the most efficient means of using the refiner, but I believe it's the best that A1111 supports at the time of writing) [zoom_enhance]: The default values ofupscale_widthandupscale_heightwill automatically become 1024 if you have an SDXL model loaded (otherwise 512)- New special variable
sd_base: returns the base type of the selected checkpoint, i.e.sd1,sd2,sdxlornone - The logger has been implemented anew using Python's
loggingmodule - The format and colors of the new logger are adopted from ControlNet to help ensure a consistent-looking console
- New setting
Config.stable_diffusion.controlnet_nameif for some reason your environment expects it to be something other thansd-webui-controlnet - New setting
Config.logging.colors: A dictionary of escape sequences that correspond to colors for the various logging levels - New setting
Config.logging.format: String that defines the structure of a log message - New setting
Config.logging.file: An optional filepath for writing log messages to disk - New setting
Config.logging.filemode: If writing log messages to disk, you can specify filemodeato append messages to the file orwto overwrite the existing file - New setting
Config.logging.level: This defines the lowest-priority messages you wish to see in your console, set it toDEBUGfor verbose output - New setting
Config.logging.use_colors: Set to false if you hate colors
Changed
- Hardcoded references to ControlNet location have been replaced with path returned by
modules.extensions, which may allow CN variables to work with third-party forks of the WebUI (which are nevertheless considered unsupported by this extension - try them at your own risk)
Fixed
- Template Editor: No longer creates an entire Unprompted object, as it only needed the object for its config-parsing capabilities
Removed
[pix2pix_zero]: This shortcode presented a dependency conflict with theultralyticspackage required by [txt2mask]. I have decided to simply remove this shortcode given its legacy status.- Config setting
log_contextssuperceded by the new settinglogging.level - The log contexts
SETUPandRESULTdo not have direct equivalents in the new logger and have been replaced withINFOlevel messages
9.9.0 - 25 July 2023
Added
[array]: Now accepts variable names as kwargs for updating array indexes dynamically, as in the case of a[for]loop- New example template
batch_seeds_custom_step_sizethat allows you to override the WebUI's behavior of incrementing the seed by 1 in a batch process
Fixed
- Ensured compatibility with WebUI v1.5.0
- Hotfix for
batch_indexuser variable handling
9.8.3 - 24 July 2023
Changed
- Stable Diffusion variables will be synchronized with your Unprompted variables whenever an img2img task is called, including
[zoom_enhance]and[img2img] - Optimized
Unprompted.update_stable_diffusion_vars()performance
9.8.2 - 24 July 2023
Fixed
- Updated the batch processing code to fix compatibility with Extra Networks as well as the
templates.defaultsetting [zoom_enhance]: Fixed handling ofbatch_indexwhenbatch_size> 1
9.8.1 - 23 July 2023
Fixed
- Hotfix for
sd_modelhandling - Hotfix for
batch_size> 1 crash - Updated documentation
9.8.0 - 22 July 2023
About
This update integrates batch processing with the WebUI's process_batch() routine - this allows Unprompted to change system variables such as CFG scale or model checkpoint between each image generation. I hope the added flexibility proves useful for your prompting workflows. If you find that the new system is incompatible with a particular shortcode, please open an issue for me and use the legacy setting as a short-term workaround. Thanks!
Changed
- Batch processing will now update Stable Diffusion vars after each image
- Due to the above change, the
Unprompted.Config.stable_diffusion.batch_supportsetting has been renamed toUnprompted.Config.stable_diffusion.batch_methodwith a default setting ofstandard - You can set the
batch_methodtolegacyif you prefer the old implementation, ornoneto disable batch support altogether
Fixed
[round]: Fixed_upand_downwith floats[choose]: The_rawparg no longer replaces linebreaks with the delimiter character in a selected[file][remember]: Fixed this shortcode unintentionally adding "None" to prompt
9.7.0 - 20 July 2023
Added
- New shortcode
[round]: Rounds the first parg to a certain level of precision, e.g. 1.345 at_place=1yields 1.3, and 1644 at_place=2yields 1600 [remember]: Added Wizard UI- New WebUI Template Editor tab by o0oradaro0o (PR #146)
- Minor UI updates for the Template Editor after merging
- New config setting
stable_diffusion.template_editor: you can set tofalseto disable the Template Editor tab
9.6.0 - 20 July 2023
About
This update resolves a number of issues related to batch_index evaluation, which were causing degraded image quality with [zoom_enhance].
Beta
[img2img]: updated for compatibility with the A1111 dev branch
Added
- New shortcode
[remember]: Allows you to declare the names of variables you would like to keep over the course of a batch run [set]and[sets]: Now support_rememberparg, which invokes the[remember]shortcode with your variable(s)- New special variable
batch_test: Shortcodes that implement batch processing--such as[zoom_enhance]--will evaluate yourbatch_testexpression against the batch item index to determine if it should be bypassed, e.g. ifbatch_testis<= 5and we're on the seventh image, it won't be processed by[zoom_enhance].
Changed
- Enabled Python formatter yapf with args
{use_tabs: 1,column_limit: 999}, please make sure any code submitted in a PR adheres to the same formatting rules
Fixed
[zoom_enhance]: Improved batch support forreplacementandnegative_replacement[zoom_enhance]: Can accessbatch_indexvariable correctly[zoom_enhance]: Fixedseedvalue not synchronizing correctly with batch process- Fixed an issue where explicitly setting the
negative_promptin a batch run wherebatch_index> 0 would not take effect
9.5.1 - 3 July 2023
Fixed
[txt2img]: Fixed an issue with this shortcode not receiving updates to thepobject while in txt2img mode
9.5.0 - 2 July 2023
Added
- New special variable
single_seed: forces the same seed value for all images in a batch [array]: New kwarg_filllets you replace all values in the array with a specified value
Changed
- Wizard Capture tab no longer prints special extension attributes such as
unprompted_original_promptsince they are not needed for image reproduction [enable_multi_images]: Now considered a legacy shortcode as it is reportedly incompatible with recent version of the WebUI (this shortcode was originally merged from a PR)
Fixed
- Img2img batch tab should now correctly re-evaluate shortcodes when batch_count > 1
- Resolved compatibility issue with hires. fix in newer versions of the WebUI
9.4.0 - 29 June 2023
Added
- Attempting to introduce img2img batch tab support, this is experimental and may not work with every shortcode
[txt2mask]: Compatibility with img2img batch tab tensor masks[zoom_enhance]: Now supports_altwhich uses the[img2img]shortcode for processing instead of the nativeprocess_images_inner()function - may improve compatibility for some users[choose]: Now supports_rawwhich prevents inner shortcodes from running except the one that is chosen[img2img_autosize]: Now supportsunitwhich lets you adjust the rounding multiplier of the output resolution, defaults to 64- Added "WARNING" as a default console message log type
Fixed
[choose]: Parses secondary tags after selecting an option[img2img]: Fixed bug inupdate_controlnet_var()call- Improved error catching in
unprompted_dry.py - The
update_controlnet_var()script will check to see if the given att has a number to avoid false positives (such ascontrolnet_initial_noise_modifier)
9.3.1 - 28 June 2023
Added
- New guide: "Setting up Replacement Terms"
Changed
[zoom_enhance]: Improved Wizard GUI- Moved older changelog entries into their own accordion menu
- Wizard Capture
simpleinference settings no longer capture inf values - Tested compatibility with WebUI 1.4.0 and updated compatibility blurb as such
Fixed
- The
autocast()function no longer crashes when given infinity [choose]: Fixed a crash related to using secondary shortcode arguments in the content[if]: Fixedcontextvalue[autocorrect]: Fixed missingpunktdependency download- Merged #159 by bsweezy: Fix restore_faces brackets in example template
9.3.0 - 24 June 2023
Added
- New shortcode
[bypass]: allows you to bypass specific shortcodes, useful for debugging - New Wizard Capture tab that assembles code for the last image you generated
[txt2mask]: now supportsfastsammask method[zoom_enhance]: now supportsinherit_negativeparg to copy your main negative prompt to the replacement img2img task- Bodysnatcher v1.3.1: now supports the aforementioned
inherit_negativefeature of[zoom_enhance](true by default) - You can minimize startup time by setting
skip_requirementsto true inconfig_user.json - Atomic shortcodes may now utilize
run_preprocess()similar to block shortcodes
Changed
[txt2mask]: Improved Wizard GUI- Bodysnatcher v1.3.1: Improved Wizard GUI
- Tested compatibility with WebUI 1.3.2 and updated compatibility blurb as such
Fixed
[zoom_enhance]: Potentially fixed a compatibility issue with newer versions of ControlNet- Updated checkpoint name detection, hopefully more reliable as a result
- Temporarily lowered sampling steps of img2img_general_v1 and img2img_full_denoise_v1 from 25 to 24 as a workaround for an odd visual glitch
Removed
[txt2mask]: mask methodgrounded_samhas been removed due to inferior results compared toclip_surgeryandfastsam, all of which are based on similar technology
9.2.1 - 21 May 2023
Fixed
- Crash related to install issue with legacy controlnet requirements
9.2.0 - 13 May 2023
Added
- New shortcode
[txt2img]for use within the[after]block - New directory
templates/common/presets/inferencewith a few presets - Bodysnatcher v1.3.0: new setting
inference_presetthat will load settings from the aforementioned directory - New function
Unprompted.update_stable_diffusion_vars()to write changes fromshortcode_user_varsto a specifiedpobject - Compatibility blurb added to About panel
Changed
- The promo boxart is now loaded from the local filesystem instead of an online imagehost
- The
templates/common/controlnet_presetsdirectory has been moved totemplates/common/presets/controlnet - Rewrote
install.pyto be more modular - Bodysnatcher v1.3.0: minor UI updates
- Updated the manual
Removed
- Bodysnatcher v1.3.0: removed
use_optimized_inference_settingsin favor of the newinference_presetsetting
9.1.2 - 5 May 2023
Fixed
[img2img]: updated for compatibility with latest WebUI
9.1.1 - 29 April 2023
Changed
- Fixed an issue with reading
controlnet_x_imagevariable - Speculative fix for
postprocess()routine not receiving updated images
9.1.0 - 28 April 2023
Added
[choose]: supports_sanitizeto override the default content sanitization rules[filelist]: now supports_basenameto return filenames instead of full paths[filelist]: now supports_hide_extto discard file extensions from the returned string[filelist]: will now substitute%BASE_DIR%with an absolute path to the Unprompted extension[replace]: now supports_insensitivefor enabling case-insensitive operations[replace]: now supports_loadfor importing from:to replacement directions from one or more external JSON files[sets]: now supports_loadfor importing key:value pairs from one or more external JSON files[zoom_enhance]: now supportscontrolnet_preset[zoom_enhance]: now supports experimentaluse_starting_facewhich will upscale the initial image's face as opposed to the resulting img2img's face[zoom_enhance]: more arguments available in the Wizard UI[txt2mask]: more arguments available in the Wizard UI- New shortcode
[log]: prints a message to the console - Bodysnatcher v1.2.0: now supports
face_controlnet_presetwhich is applied during the[zoom_enhance]step - New ControlNet preset
photo_fast_v1: tries to retain as much of the composition as possible with only a single CN unit - New ControlNet preset
photo_face_v1: work-in-progress preset that attempts to maximize likeness of a close-up portrait image - ControlNet variables can be set with the shorthand prefix
cn_instead ofcontrolnet_
Changed
- Bodysnatcher v1.2.0: now populates the list of ControlNet presets with files from
templates/common/controlnet_presets - Bodysnatcher v1.2.0: enabled
pixel_perfectfor all ControlNet templates
9.0.1 - 25 April 2023
Changed
[switch],[case]: fixed issue with new nested syntax compatibility[case]: fixed issue with default case[choose]: fixed an issue with[choose][file somefile][/choose]syntax[zoom_enhance]: fixed issue withcolor_correct_timingset topost[zoom_enhance]: speculative fix for crash related tounsharp_mask()function
9.0.0 - 25 April 2023
About
Important: This version features a number of changes to Unprompted's syntax that may break existing templates. Please see the latest announcement for more details.
Added
- Block shortcodes can now implement
preprocess_block()which allows them to take priority over any inner shortcodes [if],[else],[elif],[do],[for],[while],[repeat],[switch]: now utilizepreprocess_block()such that you no longer have to write secondary shortcode tags for nested statements[choose]: utilizes the newpreprocess_block()to temporarily replace the value ofUnprompted.Config.sanitize_afterto{"\\n":"|"}which should allow the following syntax to select a random line from another file:[choose][file some_file][/choose][chance],[do],[for],[while],[set]: now sanitize the content per the newUnprompted.Config.syntax.sanitize_blockrules[chance],[do],[for],[while],[set]: support_rawto disable content sanitization- New function
shortcode_var_is_true(): allows shortcodes to check if a given variable key is found in pargs or set to True in kwargs (still needs to be implemented across most shortcodes) [sets]: supports advanced expressions- Unprompted now includes extra generation paramters in the output window
- You can disable the above behavior by setting
Unprompted.Config.stable_diffusion.show_extra_generation_paramsto false - New config setting
Unprompted.Config.log_contexts: a comma-delimited string that dictates which types of log messages to include in the console (only showsERRORandRESULTmessages by default, but can be extended to showDEBUGorALL) - Debug message displaying startup load time
- Simple
unprompted_dry.batthat activates a given conda environment and launchesunprompted_dry.py(you will need to edit it for your own setup)
Changed
[zoom_enhance]: fixed bug with manual mask behavior[zoom_enhance]: updated Wizard shortcode generation for compatibility with new syntax[get]: the_beforeand_afterarguments no longer update the variable's stored value- Bodysnatcher: updated template for compatibility with new syntax
- img2img_folder: updated template for compatibility with new syntax
- txt2img2img: update template for compatibility with new syntax
- Fixed an issue that prevented
controlnet_x_pixel_perfectvariables from working correctly - Moved
importcalls of various Stable Diffusion shortcodes into therun()block to prevent issues with the standaloneunprompted_dry.py
Removed
Unprompted.Config.debugin favor of the newUnprompted.Config.log_contexts- Shortcodes that allow nested statements without use of secondary shortcode tags will no longer parse those secondary tags, unfortunately this means some templates will have to be updated for compatibility
- Outdated
choose_weightedexample template
8.3.1 - 22 April 2023
About
Over the last couple days, I have been experimenting with changes to the adaptive scaling features of [zoom_enhance]. I believe it will produce more consistent results across different resolutions, but you should take a backup of the current shortcode if you're happy with its performance - many of the default settings have changed, and I will likely continue finetuning it over the next few weeks. Your feedback is appreciated!
Changed
[zoom_enhance]: rewrote most of the adaptive scaling calculations[zoom_enhance]: introduced several try-catch blocks for better exception handling[zoom_enhance]: fixed a couple issues withshow_original[zoom_enhance]: fixed an issue that caused the shortcode to call Unprompted'sprocess()routine a second time
8.3.0 - 21 April 2023
Added
- New shortcode
[color_correct]: provides the same automatic color grading features as Bodysnatcher, but in the form of a standalone block [color_correct]: supports thesourceargument, which is a string that processes the initial image with[txt2mask]and uses the resulting masked image as a source for color correction, as opposed to the entire image[txt2mask]: implemented CLIP Surgery as a new method type ("clip_surgery") which optionally supports Segment Anything (dev comment: this is better thanclipsegat certain tasks but worse at others -clipsegis still default for the time being)[txt2mask]: new argumentstampthat pastes a temporary PNG onto the init image before running mask processing, useful for redacting a portion of the image for example[txt2mask]: supportsstamp_methodto choose sizing and positioning logic[txt2mask]: supportsstamp_xandstamp_yfor precise positioning of the stamp[txt2mask]: supportsstamp_blurradius to engage optional gaussian filter[txt2mask]: 10 basic stamps are included by default[zoom_enhance]: now supportsmask_method[template]: any kwargs in the Wizard template block will be passed to the constructed[file]block[file]: experimental new argument_bypass_ifthat skips file processing if the value returns true (intended to be used with Wizard templates)[get sd_model]should now work as expected- Bodysnatcher: new option
background_modethat inverts the mask and disables the zoom_enhance step - Bodysnatcher: new setting
stamp
Changed
[zoom_enhance]: thecolor_correct_methoddefault value is nownone[zoom_enhance]: fix for adaptive CFG scaling[zoom_enhance]: minor tweaks to the adaptive scaling algorithm[zoom_enhance]: speculative fix for an issue with batch processing, which may also resolve an infinite loop that could occur with Bodysnatcher[txt2mask]: the "sam"methodhas been renamed to "grounded_sam"[txt2mask]: fixed a crash related to switching back and forth betweenmethodtypes- Moved legacy shortcodes into their own
legacyfolder - Fixed a crash related to empty shortcode arguments
- Updated the manual
8.2.0 - 18 April 2023
Added
[substring]: you can now pass strings into thestartandendarguments and it will find the index of those strings within the content[zoom_enhance]: includednegative_maskin the Wizard UI
Changed
[txt2mask]: settingmethod="sam"will attempt to install the required GroundingDINO library automatically, YMMV[array]: fixed crash related to_shuffle- Unprompted will now store downloaded models into
modelsrather thanlib_unprompted - On startup, Unprompted will move its models to the new location
8.1.0 - 17 April 2023
Added
- You can now use
[set]to manage various ControlNet settings - Bodysnatcher: new setting
use_optimized_inference_settings - Bodysnatcher: new setting
use_controlnet_preset [zoom_enhance]: implements thecolor-matcherlibrary for higher quality swaps[zoom_enhance]: supportscolor_correct_methodto choose from different grading algorithms, or disable color correction by setting this tonone[zoom_enhance]: supportscolor_correct_strengthwhich is an integer that determines how many times to run thecolor_correct_method[zoom_enhance]: theadaptive_hiresfeature will now ajdust CFG scale and apply a bit of sharpening- Wizard UI
numberelements can now specify_minimumand_maximumvalue range (however, this isn't supported by Gradio yet) - Specified default values for Wizard UI
sliderelements to prevent crashing
Changed
[zoom_enhance]: speculative fix for final image not showing up in the output window[zoom_enhance]: theuse_workaroundparg has been renamed toshow_original[zoom_enhance]: hotfix for broken txt2img mode[case]: fixed an issue with default case always firing- Bodysnatcher: decreased the default value of
zoom_enhance_denoising_maxfrom 0.35 to 0.30 - Bodysnatcher: debug images are no longer saved by default, but you can toggle them in the UI
8.0.0 - 16 April 2023
Added
- New
BodysnatcherGUI template - New option
Unprompted.Config.beta_featuresto opt into unfinished doodads - Unprompted now creates a copy of the
pobject at the beginning of theprocess()routine namedUnprompted.p_copy, which allows for greater compatibility with extensions that hijack the inference pipeline (e.g. ControlNet) - With the help of the above change,
[zoom_enhance]is now compatible with ControlNet - The
[zoom_enhance]shortcode now applies a sharpening filter to the final image as determined by thesharpen_amountarg - The
[zoom_enhance]shortcode now supports manual mask behaviormodesimilar to[txt2mask] - The
[zoom_enhance]shortcode seeks to improve support withOnly Maskedmode by scaling up some settings to account for your original image resolution - The
[zoom_enhance]shortcode supportsbypass_adaptive_hiresto disable the above behavior - The
[zoom_enhance]shortcode now supportshires_size_maxwhich limits the adaptive resolution to avoid OOM errors (defaults to 1024) - Wizard Templates now support
[wizard accordion]to group a collection of settings into a collapsible menu - Wizard Template UI elements now support
_infofor showing descriptive text - New
Known Issuessection in the manual - The
[txt2mask]shortcode now supports the Segment Anything Model with GroundingRINO (setmethod="sam"), although you need to install the latter manually--it doesn't work with pip at the time of writing--and I'm not particularly impressed by its results compared to clipseg (after installing manually: you'll need to move GroundingRINO into yourvenvfolder and replace anyimport groundingrinocalls with relative imports e.g.import ...utils.something) - CSS style for prose hyperlinks so I can actually see the darn things
Changed
- Wizard Functions have been renamed to Wizard Templates
- The
[zoom_enhance]shortcode now runs the nativeprocess_images_inner()function as opposed to piggybacking the[img2img]shortcode - The
[zoom_enhance]saveparg has been renamed todebug - Increased the
[zoom_enhance]mask_size_maxdefault value from 0.3 to 0.5 - A bit of UI polish
- Fixed a crash related to calling
Unprompted.parse_alt_tags()with an empty string - Fixed typo related to Wizard Template radio buttons
- Fixed CSS padding of list elements in the latest version of WebUI
- Fixed CSS spacing between
<detail>elements - Fixed Wizard Template radio button default value
- Fixed an issue with nested Wizard UI event listeners
- Wizard UI values are updated on Gradio's unfocus event due to the unreliable nature of the
change()event as demonstrated here: https://github.com/gradio-app/gradio/issues/3876 - Improved logging in various places
- Wizard Templates are now explicitly loaded as
utf8(compatible with emoji 😎)
Removed
- The
settingsplaceholder UI files for the time being, although I would like to implement a UI forconfig_user.jsoneventually
7.9.1 - 17 March 2023
Changed
- Hotfix for
[zoom_enhance]"Advanced Options" menu
7.9.0 - 17 March 2023
Added
- New
match_main_seedsetting that synchronizes the Unprompted seed with the WebUI seed - The
[txt2mask]shortcode will now cache its model to improve performance (for reference, this saves about 3 seconds per run on my 3090) - New
[txt2mask]settingunload_modelto disable the above behavior - The
[zoom_enhance]Wizard UI now includesunload_model - New
[zoom_enhance]settingupscale_method - The
[zoom_enhance]default upscaling method is now Nearest Neighbor which should result in a more accurate final image - New
[zoom_enhance]settingdownscale_methodwhich controls the resample filter used with the final image - The
[zoom_enhance]default downscaling method is now Lanczos, which should result in sharper images
Changed
- Fixed an issue related to
[img2img]and a previously interrupted generation - The
[zoom_enhance]shortcode does a better job of ensuring that img2img settings are correct - Most of the
[zoom_enhance]Wizard settings have been moved into an "Advanced Options" accordion menu - Fixed a CSS issue related to the promo box and the newest version of the WebUI
7.8.0 - 13 March 2023
Added
- The
[zoom_enhance]shortcode now accepts multiple values forreplacementandnegative_replacement, usingUnprompted.Config.syntax.delimiter(vertical pipe by default) - The
[zoom_enhance]shortcode now supportsmask_sort_methodwhich determines the order of multiple matching regions, defaults toleft-to-right - The
[zoom_enhance]shortcode will now adjust CFG scale dynamically, in the same fashion as denoising strength - The
[zoom_enhance]Wizard GUI now lets you overridedenoising_strengthandcfg_scalewith arbitary values, bypassing the "dynamic" mechanism - Every
[zoom_enhance]argument now supports advanced expressions - Improved console logging for
[zoom_enhance]
Changed
- The
[img2img]shortcode temporarily bypassesalwayson_scriptsto avoid errors with many extensions - Fixed an issue related to
[zoom_enhance]not responding after a previously interrupted generation or error - Fixed a minor issue related to the
[zoom_enhance]sigmoid curve evaluation - Speculative fix for an issue related to
[txt2mask]on non-CUDA devices
7.7.2 - 13 March 2023
Added
- The
[zoom_enhance]shortcode now supports experimentaluse_workaroundto hopefully resolve issues with output window
7.7.1 - 13 March 2023
Changed
- Fixed a few typos in the
[zoom_enhance]shortcode
7.7.0 - 12 March 2023
Added
- New
[zoom_enhance]shortcode for automatically fixing issues with low-resolution details like faces or hands - The
[after]shortcode now supportsallow_dupe_indexwhen you want to run the sameaftercontent in batch mode - The
[txt2mask]and[img2img]shortcodes now supportreturn_imagewhich lets you call them directly in the source of other shortcodes - Shortcodes can now declare custom
wizard_prependandwizard_appendvalues in the event that they need to be called in an unusual way
Changed
- Fixed an issue with
[img2img]when used from the img2img tab
7.6.0 - 25 February 2023
Added
- New
img2img_folder.txttemplate function - The
[info]shortcode now supportssentence_count - The
[info]shortcode now supportsfilename - The
[after]shortcode now stores a self-referentialafter_indexvariable - The
[length]shortcode can now accept[array]variables directly
Changed
- Fixed a crash related to setting index values with
[array] - Fixed a crash when sending an empty string to
parse_advanced() - Fixed a crash related to
[img2img]when using multiple[after]blocks - Fixed a few mistakes in the Manual
7.5.9 - 15 February 2023
About
The [controlnet] shortcode is now considered a "legacy" feature as it is generally less robust than Mikubill's dedicated ControlNet extension. I have decided to re-allocate my energy into other aspects of Unprompted as I prefer to work on features that are not amply represented in the SD community.
Added
- The
[controlnet]shortcode now supports theopenpose_handsargument
Removed
- Unnecessary Gradio files from ControlNet library
7.5.8 - 14 February 2023
Changed
- Fixed a startup crash that could occur when a ControlNet model was listed as previously selected
7.5.7 - 13 February 2023
Changed
- Fixed
[controlnet]save button
7.5.6 - 13 February 2023
Added
- The
[controlnet]shortcode now supports the Canny, HED Boundary, and Segementation Map models - Implemented Wizard UI for the
[controlnet]shortcode
Changed
- Fixed a syntax issue related to sliders and the Wizard Shortcode generator
7.5.5 - 13 February 2023
Added
- The
[controlnet]shortcode now supports the Normal Map model
Changed
- Fixed another memory leak related to
[controlnet]
7.5.4 - 13 February 2023
Added
- The
[controlnet]shortcode now supports the Depth model
Changed
- The
[controlnet]ETA is no longer mistakenly assigned to denoising strength - Potentially fixed memory leak related to
[controlnet]
7.5.3 - 13 February 2023
Added
- The
[controlnet]shortcode now supports face restoration
Changed
- Fixed bug causing
[controlnet]to run inadvertently
7.5.2 - 13 February 2023
Added
- The
[controlnet]shortcode now supports Scribble and M-LSD Line models with themodelargument
7.5.1 - 13 February 2023
Changed
- The
[controlnet]shortcode now expects its models to be in theStable-diffusiondirectory like a normal model
7.5.0 - 13 February 2023
About
The new features in this release are still under development and may or may not work as intended.
Added
- New WIP
[controlnet]shortcode, only supports "pose2image" at the moment - New WIP
[pix2pix_zero]shortcode - New WIP setting to enable compatibility with extra networks such as Lora, not yet functional
Changed
- Moved the
pez_open_clipdependency into thestable_diffusionsubfolder
7.4.0 - 10 February 2023
Added
- The
[img2pez]shortcode now accepts multiple image paths and will optimize a single prompt across all of them - The
[img2pez]shortcode now supportsfree_memory - The
[img2pez]shortcode log now outputs the best candidates in realtime, courtesy of @bakkot
Changed
- Reduced the
[img2pez]default value foriterationsfrom 3000 to 200 (thank you to @bakkot for the suggested optimizations) - Increased the
[img2pez]default value forprompt_lengthfrom 8 to 16 - The
template_directorysetting changed from./templatestotemplatesfor Linux compatibility, may also help with colab setups - The
[...nyms]shortcodes will now perform a download check for the requiredwordnetpackage - Fixed Usage section in README.md
- Fixed a few filepaths in
templates/common/examples/human/main.txt - Rewrote the Wizard Shortcode generator function to fix a few issues
7.3.0 - 8 February 2023
Added
- The
[img2pez]shortcode now supports all settings from the Hard Prompts Made Easy method - The
[img2pez]shortcode now supportsimage_pathif you wish to use something other than the initial img2img image - Full Wizard GUI compatibility for
[img2pez]
Changed
- The
parse_filepath()function has been updated to support choosing a random file from a directory
7.2.0 - 8 February 2023
Added
- New
[img2pez]shortcode (Hard Prompts Made Easy)
7.1.0 - 7 February 2023
Added
- Added pattern package to install.py for additional language processing features
- New
[article]shortcode - New
[pluralize]shortcode - New
[singularize]shortcode - New
[conjugate]shortcode - New
[autocorrect]shortcode - The
txt2img2imgtemplate is now available as a Wizard Function
Changed
- Updated the
[img2img]shortcode for compatibility with the latest A1111 WebUI - Updated the look of generated result text
- Updated the promo panel with info about the new DemonCrawl Avatar Generator
7.0.0 - 28 January 2023
Added
- Added NLTK to install.py to enable natural language processing features
- New
[synonyms]shortcode - New
[antonyms]shortcode - New
[hypernyms]shortcode - New
[hyponyms]shortcode - The
[txt2mask]shortcode now supports the optionalsketch_colorargument - The
[txt2mask]shortcode now supports the optionalsketch_alphaargument - The above arguments provide compatibility with Inpaint Sketch mode, albeit with some workarounds for A1111 limitations
Changed
- The
[switch]shortcode now supports advanced expressions - Rewrote Wizard function generator for better layout handling
- Fixed issue with
[for] - Fixed issue with Unprompted seed locking the main seed
- Fixed issue with dropdown and radio Wizard UI delimiters
- Fixed SyntaxWarning related to Wizard function generator
6.0.0 - 25 January 2023
Added
- You can now change the active SD checkpoint with
[set sd_model] - New
[instance2mask]shortcode by WeberSamuel (PR #48) - New
[invert_mask]shortcode by WeberSamuel (PR #48) - New
[enable_multi_images]shortcode by WeberSamuel (PR #48) - The
[txt2mask]shortcode now supports GPU (PR #48) - New
[txt2mask]arguments:neg_precision,neg_padding, andneg_smoothingby WeberSamuel (PR #48) - The
[txt2mask]argumentshowwill also append a segmentation mask (PR #48) - New UI option
Unprompted Seedallows you to reproduce images that feature shortcodes with randomness, such as[choose]
Changed
- Wizard Function default values are no longer written to ui-config.json
- Fixed
[img2img]syntax for compatibility with latest A1111 - Fixed a rounding issue with Wizard shortcode number fields
- The Manual and Starter Guide have been reorganized into collapsible sections
- Moved all included templates into
templates\commonfor simplicity
5.2.0 - 24 January 2023
Added
- The
[set]shortcode now supports the_choicesargument which accepts an array of valid values - The
[set]shortcode now supports the Wizard UI_placeholderargument - The
[sets]shortcode has been rewritten to pass off its arguments to[set], which means it now supports all current and future system arguments of[set] - Wizard Functions now support
dropdown,radioandslideras valid_uitypes - Wizard Function textboxes show the
[set]content as a placeholder - Wizard Functions will now include a gr.Label title element by default
- The Wizard shortcode parser now supports
[base_dir]which is useful for linking to files within the template directory (note that this function is broken in the version of Gradio that A1111 currently uses) - Updated the manual
Changed
- Renamed the
libfolder tolib_unpromptedin order to resolve import calls conflicting with other extensions, possibly due to a flaw in the A1111 extension framework (more research needed)
5.1.0 - 23 January 2023
Added
- The Wizard now includes Function mode, which houses custom UIs for your
[file]templates - New
example_function.txtto demonstrate the basics of the Wizard Function mode - The Wizard auto-include option is now determined on a per-shortcode or function basis
Changed
- Several fixes and workarounds to ensure compatibility with latest version of A1111 WebUI
Removed
Config.ui.wizard_autoincludetemporarily removed for logistical reasons- CLIPSeg weights no longer included with this repo (the txt2mask shortcode will automatically download the weights if necessary)
5.0.0 - 2 January 2023
Added
- New shortcode
[array]which can be used to manage groups or lists of values - The
[txt2mask]paddingargument now supports negative values - The
[txt2mask]smoothingargument now supports advanced expressions - The
[choose]_weightedargument now supports floats - The
[get]function can return formatted lists, including those created by[array] - New config
uisettings for customizing the open state of accordion menus - New button in the About tab to quickly open your templates folder
- The
[eval]shortcode now supports asigmoid()distribution curve function - New function
is_system_arg()to simplify the skipping of certain shortcode arguments
Changed
- Rewrote the
[txt2mask]paddingimplementation (PR #38 - thank you, @credman0!) - The
[txt2mask]default value ofsmoothinghas changed from 0 to 20 - No longer need to specify entire sub-dictionary blocks in
config_user.jsonto apply partial changes, thanks to flatdict library - The
[config]shortcode also supports the flatdict library mentioned above - Workaround for Gradio checkbox value being overwritten by A1111 stock config
4.3.1 - 29 December 2022
Changed
- Fixed issue with
[choose]
Removed
- Unnecessary Javascript file
4.3.0 - 27 December 2022
Added
- New Wizard panel, an experimental GUI shortcode builder
- New config section
uifor adjusting the default appearance of the extension - The
[choose]shortcode now supports_weightedfor a more convenient approach to weighing the list of options
Changed
- Minor interface improvements
- Fixed an issue related to txt2mask in the new version of A1111 WebUI
- Fixed an issue related to the postprocess() routine in the new version of A1111 WebUI
4.2.1 - 23 December 2022
Changed
- Fixed an issue related to
[switch]
4.2.0 - 22 December 2022
Added
- New shortcode
[file2mask]that allows you to modify or replace your img2img mask with arbitrary files - New shortcode
[filelist]that returns a delimited string containing the full paths of all files in a given path - New shortcode
[length]that returns the number of items in a delimited string - The
[txt2mask]shortcode utilizes the new refined CLIPseg weights - The
[txt2mask]shortcode now supportslegacy_weightswhich will fallback to the old weights - The
[txt2mask]shortcode now supportssmoothingwhich lets you define the sharpness of your mask selection - The
[txt2mask]shortcode now supportssize_varwhich lets you store the percentage of the canvas that your text selection occupies - The
[get]shortcode can now return multiple variables - The
[get]shortcode allows you to specify a separator when returning multiple variables via_sep - The
[file]shortcode now supports_encodingwhich lets you change the expected encoding type
Changed
- Improved error handling for the
[file]shortcode - Minor improvements to the Manual and Readme
4.1.0 - 14 December 2022
Added
- New
after()routine that allows Unprompted to modify the outcome of a generation - New shortcode
[after]that allows you to process text post-generation - New shortcode
[img2img], which is used inside of[after]for appending an img2img task to the output, effectively replacing my old txt2img2img script - New shortcode
[img2img_autosize]that automatically adjusts the width and height parameters in img2img mode based on the proportions of the input image - New shortcode
[init_image]that loads an image from the given filepath for use with img2img - New config options
templates.defaultandtemplates.default_negativethat let you apply certain shortcodes to every run - The
[txt2mask]shortcode now supportsshowwhich will append the final image mask to your generation output - The
[txt2mask]shortcode now supports advanced expressions
Changed
- Fixed an issue with advanced expressions and multi-word string values
4.0.0 - 11 December 2022
Added
- New shortcode
[txt2mask]which is a port of my script by the same name - Collapsible menus to docs
- "Enabled" checkbox in the extension UI as a convenient way of bypassing Unprompted
- The extension now features inline resources, including the announcements, changelog, manual and starter guide
Changed
- Redesigned the extension interface
- The Dry Run feature has been decoupled from the WebUI's "Generate" button, meaning it no longer generates a dummy image
- The
[choose]delimiter is now specified in the config assyntax.delimiter
Removed
- Custom CSS and Javascript for handling the collapsible advertisement in favor of native Gradio elements
3.0.0 - 10 December 2022
Added
- The
[info]shortcode now supportsclip_count
Changed
- Fixed an issue with the negative prompt in batch sizes greater than 2
Removed
- The
[chance]shortcode no longer supports_probabilityas the first argument now automatically accepts expressions and secondary shortcode tags
2.0.2 - 7 December 2022
Changed
- Overhauled Github README.md
- Possibly fixed compatibility issue with Dynamic Prompts
2.0.1 - 7 December 2022
Changed
2.0.0 - 7 December 2022
Added
- Implemented advanced expression support for nearly all shortcodes
- New shortcode
[do]for "do until" style loops - New shortcode
[min]for returning the value of the smallest variable among the arguments - New shortcode
[max]for returning the value of the greatest variable among the arguments - New shortcode
[unset]that removes one or more variables from memory - New function
parse_advancedthat consolidates calls to simpleeval - The
[choose]shortcode can now return multiple options - The
[choose]shortcode now supports the optional_separgument, which is a string delimeter used when returning multiple options - The
[info]shortcode now supports thestring_countargument, which returns the number of matching strings in the content - The
[replace]shortcode now supports the_countvariable, which defines the number of occurances to replace - The
[set]and[sets]shortcodes now support the_newargument, which will bypass the shortcode if the variable(s) already exist - Advanced expression support can be toggled in config.json
- New example
reverse_string.txt
Changed
- Secondary shortcode tags have been changed from
<>to{}for compatibility with advanced expression statements - Updated example
update_variable.txt - Fixed potential crash related to
autocastfunction - Fixed a bug in the
[sets]shortcode - Fixed a couple bugs related to advanced expressions
Removed
- The
[repeat]shortcode no longer supports_timesas the first argument now automatically accepts expressions and secondary shortcode tags - The
[switch]shortcode no longer supports_varas the first argument now automatically accepts expressions and secondary shortcode tags
Important Note: the change to secondary shortcode tags will unfortunately break some existing templates. In general, I try to avoid making such changes, but in this case it was the best way to get secondary tags to interact well with advanced expressions - the <> characters conflicted with less-than, greater-than conditional checks. On the plus side, we can now do stuff like this: [if "{file some_script} < 2"]print me[/if]. Should be quite powerful!
If you wish to revert this behavior (not recommended) you can do so by creating a file called config_user.json, setting advanced_expressions to false, tag_start_alt to <, and tag_start_end to >. Refer to config.json for exact formatting. Be aware that these changes will break advanced expressions.
1.2.0 - 2 December 2022
Added
- New
[sets]atomic shortcode for setting multiple variables at once
Changed
[eval]can now read user variables
1.1.0 - 2 December 2022
Added
- New
[for]shortcode, as in for loops - New
[casing]shortcode powered by @dmlls casefy library - The
[if]and[while]shortcodes now support advanced expressions via simpleeval, e.g.[if "var_a==10 and var_b<=50"] - The
[if]and[while]shortcodes now support!=as an operator type for_is
1.0.0 - 1 December 2022
Added
- New
[info]shortcode that prints metadata about the content (eithercharacter_countorword_countat the moment) - New
[substring]shortcode for slicing content - The
[file]shortcode now supports the setting of variables through keyword arguments, which effectively allows you to use this shortcode like a function in programming - The
[get]shortcode now supports optional_defaultargument, the value of which is returned if the selected variable does not exist - The
[replace]shortcode now supports optional_fromand_toarguments which can process secondary shortcode tags - New example
random_emphasis.txt
Changed
- The
[eval]shortcode now utilizes the simpleeval library by @danthedeckie, which should be safe for networked environments (no gurantees though - use Unprompted at your own risk) - Check
shortcodes/basic/eval.pyfor instructions on reverting the shortcode to its old, strictly-for-local-use behavior - The tab character is now replaced with a blank string instead of space
0.10.0 - 30 November 2022
Added
- New
[replace]shortcode
Changed
- Replaced
n_tempandn_finalconfig settings withsanitize_beforeandsanitize_afterthat let you define any number of characters to modify before/after processing - Tab character (
\t) is now ignored by default, which will hopefully make it easier to format complex templates for readability - All string sanitization logic has been moved into the
process_string()function - Fixed an issue with
negative_promptlogic
0.9.0 - 29 November 2022
Added
- Updated
negative_promptto support the latest version of Automatic1111's WebUI, which permits batch support for negative prompts
0.8.0 - 13 November 2022
Added
- New system variable
batch_indexfor making decisions based on the progress into a batch run - The
[choose]shortcode now accepts_casewhich bypasses the random selection with a given number or variable
0.7.0 - 11 November 2022
Added
- New
[config]shortcode - The
[choose]delimiter is now specified in config.json (defaults to|) - New
parse_filepath(string, context)function in shared.py that supports both relative and absolute path handling - Merged
.gitignorePR (thank you @MaikoTan!)
0.6.0 - 6 November 2022
Added
- New
[elif]shortcode - The
[repeat]shortcode now accepts floats, e.g. 4.6 has a 60% chance of repeating 5 times instead of 4 - The
[repeat]shortcode now supports_sepwhich is a string delimiter to insert after each output, excluding the final output - New
autocast()function in shared.py that will convert a variable to str, int, or float automatically - New
templates/examplesfor snippets of code that demonstrate cool ways of combining shortcodes you may not have considered
Changed
- Fixed an issue with
[repeat]outputting its content once more than intended
0.5.1 - 5 November 2022
Changed
- Fixed an issue with
[set]converting to float in situations where int is preferred
0.5.0 - 5 November 2022
Added
- Button for dismissing the ad
- The ad will be dismissed automatically if you purchase the Fantasy Template Pack
0.4.0 - 4 November 2022
Added
- Config option
batch_supportwhich, if enabled, will generate random prompts for every image in a batch as opposed to using the same prompt for the entire batch
0.3.0 - 4 November 2022
Added
- Support for infinite nesting of secondary shortcode tags
- New shortcode
[while]for looping content until the condition returns false [chance]now supports_sideswhich determines the upper bound of the chance roll (default is 100)
Changed
- The
[if]_operatorargument has been renamed to_isfor readability
0.2.0 - 4 November 2022
Added
- New shortcode
[##]for multiline comments - Documentation for
config.json [if]now supports_anywhich flips from "and" to "or" multivar processing[if]now supports_operatorwhich determines the comparison logic for your arguments
Changed
- Overhauled codebase in order to load as an A1111 extension rather than a script, please re-review the installation instructions!
- Renamed
DOCUMENTATION.mdtoMANUAL.md
0.1.1 - 2 November 2022
Added
[get]now supports_beforeand_afterarguments[set]now supports secondary shortcode tags
Changed
[file]now strips leading and trailing newline characters
0.1.0 - 1 November 2022
Added
- Added
[switch]and[case]shortcodes - Added
[repeat]shortcode - Added
is_equal()function to Unprompted object that checks for loose equality of two variables
Changed
- Fixed
_appendand_prependbehavior of[set]when used with int values
0.0.1 - 31 October 2022
Added
- Initial release