From 92b959b121ea33d1aa0458be7f3d00844b98d762 Mon Sep 17 00:00:00 2001
From: ThereforeGames <95403634+ThereforeGames@users.noreply.github.com>
Date: Fri, 31 May 2024 20:22:32 -0400
Subject: [PATCH] v11.0.0
---
README.md | 2 +-
config.json | 12 +-
docs/ABOUT.md | 14 +-
docs/ANNOUNCEMENTS.md | 84 +
docs/CHANGELOG.md | 94 +-
docs/GUIDE.md | 37 +
docs/MANUAL.md | 1929 +----------
docs/TODO.md | 11 +
docs/shortcodes/##.md | 11 +
docs/shortcodes/#.md | 5 +
docs/shortcodes/after.md | 24 +
docs/shortcodes/antonyms.md | 15 +
docs/shortcodes/array.md | 72 +
docs/shortcodes/article.md | 18 +
docs/shortcodes/autocorrect.md | 12 +
docs/shortcodes/bypass.md | 12 +
docs/shortcodes/call.md | 34 +
docs/shortcodes/case.md | 1 +
docs/shortcodes/casing.md | 23 +
docs/shortcodes/cast.md | 9 +
docs/shortcodes/chance.md | 7 +
docs/shortcodes/choose.md | 27 +
docs/shortcodes/civitai.md | 31 +
docs/shortcodes/config.md | 15 +
docs/shortcodes/conjugate.md | 26 +
docs/shortcodes/do.md | 9 +
docs/shortcodes/elif.md | 7 +
docs/shortcodes/else.md | 9 +
docs/shortcodes/eval.md | 7 +
docs/shortcodes/faceswap.md | 29 +
docs/shortcodes/file2mask.md | 12 +
docs/shortcodes/filelist.md | 19 +
docs/shortcodes/filter_tags.md | 30 +
docs/shortcodes/for.md | 17 +
docs/shortcodes/function.md | 24 +
docs/shortcodes/get.md | 25 +
docs/shortcodes/gpt.md | 25 +
docs/shortcodes/hypernyms.md | 11 +
docs/shortcodes/hyponyms.md | 11 +
docs/shortcodes/if.md | 20 +
docs/shortcodes/image_edit.md | 130 +
docs/shortcodes/image_info.md | 25 +
docs/shortcodes/img2img.md | 13 +
docs/shortcodes/img2img_autosize.md | 15 +
docs/shortcodes/img2pez.md | 27 +
docs/shortcodes/info.md | 20 +
docs/shortcodes/init_image.md | 11 +
docs/shortcodes/instance2mask.md | 115 +
docs/shortcodes/interrogate.md | 20 +
docs/shortcodes/invert_mask.md | 7 +
docs/shortcodes/length.md | 10 +
docs/shortcodes/log.md | 7 +
docs/shortcodes/logs.md | 9 +
docs/shortcodes/max.md | 9 +
docs/shortcodes/min.md | 9 +
docs/shortcodes/override.md | 7 +
docs/shortcodes/overrides.md | 9 +
docs/shortcodes/pluralize.md | 10 +
docs/shortcodes/random.md | 9 +
docs/shortcodes/remember.md | 19 +
docs/shortcodes/repeat.md | 12 +
docs/shortcodes/replace.md | 24 +
docs/shortcodes/resize.md | 23 +
docs/shortcodes/restore_faces.md | 13 +
docs/shortcodes/round.md | 24 +
docs/shortcodes/seed.md | 9 +
docs/shortcodes/set.md | 33 +
docs/shortcodes/sets.md | 9 +
docs/shortcodes/singularize.md | 10 +
docs/shortcodes/substring.md | 18 +
docs/shortcodes/switch.md | 16 +
docs/shortcodes/synonyms.md | 13 +
docs/shortcodes/tags.md | 7 +
docs/shortcodes/txt2img.md | 7 +
docs/shortcodes/txt2mask.md | 58 +
docs/shortcodes/unset.md | 10 +
docs/shortcodes/upscale.md | 11 +
docs/shortcodes/while.md | 28 +
docs/shortcodes/zoom_enhance.md | 61 +
images/posts/11.0.0/bodysnatcher.png | Bin 0 -> 729422 bytes
images/posts/11.0.0/docs.png | Bin 0 -> 51030 bytes
images/posts/11.0.0/gpeno.png | Bin 0 -> 584778 bytes
images/unprompted_banner.png | Bin 0 -> 347783 bytes
install.py | 10 +-
javascript/jquery-3.7.1.min.js | 2 +
javascript/{active_wizards.js => wizard.js} | 27 +
lib_unprompted/gpen/face_enhancement.py | 7 +-
lib_unprompted/gpen/face_model/face_gan.py | 4 +-
lib_unprompted/gpeno/.gitignore | 129 +
lib_unprompted/gpeno/README.md | 148 +
lib_unprompted/gpeno/__init_paths.py | 23 +
lib_unprompted/gpeno/align_faces.py | 266 ++
lib_unprompted/gpeno/demo.py | 128 +
lib_unprompted/gpeno/distributed.py | 126 +
lib_unprompted/gpeno/face_colorization.py | 32 +
lib_unprompted/gpeno/face_detect/.DS_Store | Bin 0 -> 12292 bytes
.../gpeno/face_detect/data/FDDB/img_list.txt | 2845 +++++++++++++++++
.../gpeno/face_detect/data/__init__.py | 3 +
.../gpeno/face_detect/data/config.py | 42 +
.../gpeno/face_detect/data/data_augment.py | 237 ++
.../gpeno/face_detect/data/wider_face.py | 101 +
.../gpeno/face_detect/facemodels/__init__.py | 0
.../gpeno/face_detect/facemodels/net.py | 137 +
.../face_detect/facemodels/retinaface.py | 127 +
.../gpeno/face_detect/layers/__init__.py | 2 +
.../face_detect/layers/functions/prior_box.py | 34 +
.../face_detect/layers/modules/__init__.py | 3 +
.../layers/modules/multibox_loss.py | 125 +
.../gpeno/face_detect/retinaface_detection.py | 131 +
.../gpeno/face_detect/utils/__init__.py | 0
.../gpeno/face_detect/utils/box_utils.py | 330 ++
.../gpeno/face_detect/utils/nms/__init__.py | 0
.../gpeno/face_detect/utils/nms/py_cpu_nms.py | 38 +
.../gpeno/face_detect/utils/timer.py | 40 +
lib_unprompted/gpeno/face_enhancement.py | 122 +
lib_unprompted/gpeno/face_inpainting.py | 18 +
lib_unprompted/gpeno/face_model/face_gan.py | 67 +
lib_unprompted/gpeno/face_model/gpen_model.py | 818 +++++
.../gpeno/face_model/op/__init__.py | 2 +
.../gpeno/face_model/op/fused_act.py | 96 +
.../gpeno/face_model/op/fused_bias_act.cpp | 21 +
.../face_model/op/fused_bias_act_kernel.cu | 99 +
.../gpeno/face_model/op/upfirdn2d.cpp | 23 +
.../gpeno/face_model/op/upfirdn2d.py | 194 ++
.../gpeno/face_model/op/upfirdn2d_kernel.cu | 272 ++
lib_unprompted/gpeno/face_parse/blocks.py | 127 +
.../gpeno/face_parse/face_parsing.py | 56 +
.../gpeno/face_parse/face_parsing_broken.py | 58 +
lib_unprompted/gpeno/face_parse/mask.png | Bin 0 -> 9303 bytes
.../gpeno/face_parse/parse_model.py | 77 +
lib_unprompted/gpeno/face_parse/test.png | Bin 0 -> 178505 bytes
lib_unprompted/gpeno/misc/cog.yaml | 17 +
lib_unprompted/gpeno/misc/onnx_export.py | 182 ++
lib_unprompted/gpeno/misc/predict.py | 105 +
lib_unprompted/gpeno/requirements.txt | 9 +
.../training/data_loader/dataset_face.py | 103 +
.../training/data_loader/degradations.py | 765 +++++
lib_unprompted/gpeno/training/loss/helpers.py | 119 +
lib_unprompted/gpeno/training/loss/id_loss.py | 50 +
.../gpeno/training/loss/model_irse.py | 85 +
.../gpeno/training/lpips/__init__.py | 178 ++
lib_unprompted/gpeno/training/lpips/lpips.py | 238 ++
.../training/lpips/pretrained_networks.py | 180 ++
.../gpeno/training/lpips/trainer.py | 280 ++
.../training/lpips/weights/v0.0/alex.pth | Bin 0 -> 5455 bytes
.../training/lpips/weights/v0.0/squeeze.pth | Bin 0 -> 10057 bytes
.../gpeno/training/lpips/weights/v0.0/vgg.pth | Bin 0 -> 6735 bytes
.../training/lpips/weights/v0.1/alex.pth | Bin 0 -> 6009 bytes
.../training/lpips/weights/v0.1/squeeze.pth | Bin 0 -> 10811 bytes
.../gpeno/training/lpips/weights/v0.1/vgg.pth | Bin 0 -> 7289 bytes
lib_unprompted/helpers.py | 72 +-
.../restoreformerplusplus/.gitignore | 19 +
lib_unprompted/restoreformerplusplus/LICENSE | 201 ++
.../restoreformerplusplus/README.md | 178 ++
.../restoreformerplusplus/RF_requirements.txt | 8 +
.../RestoreFormer/RestoreFormer.py | 107 +
.../RestoreFormer/data/ffhq_dataset_aug.py | 144 +
.../data/ffhq_degradation_dataset.py | 238 ++
.../data/ffhq_uneven_degradation_dataset.py | 371 +++
.../RestoreFormer/distributed/__init__.py | 13 +
.../RestoreFormer/distributed/distributed.py | 143 +
.../RestoreFormer/distributed/launch.py | 92 +
.../RestoreFormer/download_util.py | 36 +
.../RestoreFormer/models/vqgan_v1.py | 223 ++
.../modules/discriminator/model.py | 140 +
.../RestoreFormer/modules/losses/__init__.py | 2 +
.../RestoreFormer/modules/losses/lpips.py | 145 +
.../modules/losses/vqperceptual.py | 280 ++
.../RestoreFormer/modules/util.py | 98 +
.../modules/vqvae/arcface_arch.py | 198 ++
.../vqvae/facial_component_discriminator.py | 40 +
.../RestoreFormer/modules/vqvae/utils.py | 41 +
.../RestoreFormer/modules/vqvae/vqvae_arch.py | 747 +++++
.../RestoreFormer/util.py | 157 +
.../restoreformerplusplus/__init__.py | 0
.../configs/HQ_Dictionary.yaml | 61 +
.../restoreformerplusplus/configs/ROHQD.yaml | 80 +
.../configs/RestoreFormer.yaml | 110 +
.../configs/RestoreFormerPlusPlus.yaml | 135 +
.../gradio_demo/.gitattributes | 35 +
.../gradio_demo/.gitignore | 1 +
.../gradio_demo/README.md | 13 +
.../gradio_demo/RestoreFormer.py | 117 +
.../gradio_demo/RestoreFormer_arch.py | 742 +++++
.../restoreformerplusplus/gradio_demo/app.py | 243 ++
.../gradio_demo/packages.txt | 3 +
.../gradio_demo/requirements.txt | 12 +
.../restoreformerplusplus/images/fig1.png | Bin 0 -> 3091573 bytes
.../restoreformerplusplus/images/fig3.png | Bin 0 -> 3260036 bytes
.../restoreformerplusplus/inference.py | 173 +
lib_unprompted/restoreformerplusplus/main.py | 618 ++++
.../scripts/metrics/cal_fid.py | 82 +
.../scripts/metrics/cal_identity_distance.py | 110 +
.../scripts/metrics/cal_psnr_ssim.py | 101 +
.../scripts/metrics/run.sh | 39 +
.../restoreformerplusplus/scripts/run.sh | 30 +
.../restoreformerplusplus/scripts/test.py | 285 ++
.../restoreformerplusplus/scripts/test.sh | 30 +
lib_unprompted/shared.py | 315 +-
lib_unprompted/shortcodes.py | 8 +-
.../hard_prompts_made_easy.py | 19 +-
.../pez_open_clip/pretrained.py | 328 +-
lib_unprompted/tris/CLIP/clip/__init__.py | 3 +
.../CLIP/clip/bpe_simple_vocab_16e6.txt.gz | Bin 0 -> 1356917 bytes
lib_unprompted/tris/CLIP/clip/clip.py | 240 ++
lib_unprompted/tris/CLIP/clip/model.py | 644 ++++
.../tris/CLIP/clip/simple_tokenizer.py | 133 +
lib_unprompted/tris/IRNet/imutils.py | 193 ++
lib_unprompted/tris/IRNet/misc/imutils.py | 285 ++
lib_unprompted/tris/IRNet/misc/indexing.py | 167 +
lib_unprompted/tris/IRNet/misc/pyutils.py | 101 +
lib_unprompted/tris/IRNet/misc/torchutils.py | 91 +
lib_unprompted/tris/IRNet/net/resnet50.py | 122 +
lib_unprompted/tris/IRNet/net/resnet50_aff.py | 118 +
lib_unprompted/tris/IRNet/net/resnet50_cam.py | 173 +
lib_unprompted/tris/IRNet/net/resnet50_irn.py | 245 ++
lib_unprompted/tris/IRNet/net/resnet50_v2.py | 123 +
lib_unprompted/tris/IRNet/run_sample_refer.py | 171 +
.../tris/IRNet/step_refer/cam_to_ir_label.py | 93 +
.../IRNet/step_refer/make_ins_seg_labels.py | 184 ++
.../tris/IRNet/step_refer/train_irn.py | 110 +
lib_unprompted/tris/IRNet/torch_utils.py | 123 +
lib_unprompted/tris/IRNet/train_refer.sh | 52 +
lib_unprompted/tris/IRNet/train_refer1.sh | 67 +
lib_unprompted/tris/IRNet/utils.py | 439 +++
lib_unprompted/tris/IRNet/voc12/dataloader.py | 351 ++
lib_unprompted/tris/LICENSE | 21 +
lib_unprompted/tris/README.md | 152 +
lib_unprompted/tris/__init__.py | 0
lib_unprompted/tris/adamw.py | 123 +
lib_unprompted/tris/args.py | 99 +
.../tris/dataset/Dataset_referit.py | 205 ++
lib_unprompted/tris/dataset/ReferDataset.py | 270 ++
lib_unprompted/tris/dataset/__init__.py | 0
lib_unprompted/tris/dataset/refer.py | 360 +++
lib_unprompted/tris/dataset/tfs.py | 132 +
lib_unprompted/tris/dataset/transform.py | 64 +
lib_unprompted/tris/dataset/utils.py | 135 +
lib_unprompted/tris/demo.py | 103 +
lib_unprompted/tris/environment.yml | 147 +
lib_unprompted/tris/figs/demo.png | Bin 0 -> 298728 bytes
.../tris/figs/demo_(man on the right).png | Bin 0 -> 239076 bytes
lib_unprompted/tris/figs/pipeline.png | Bin 0 -> 703430 bytes
lib_unprompted/tris/logger.py | 41 +
lib_unprompted/tris/loss/clip_loss.py | 21 +
lib_unprompted/tris/loss/seg_loss.py | 49 +
lib_unprompted/tris/model/__init__.py | 0
lib_unprompted/tris/model/attn.py | 142 +
lib_unprompted/tris/model/model_stage1.py | 141 +
lib_unprompted/tris/model/model_stage2.py | 127 +
lib_unprompted/tris/model/utils.py | 12 +
lib_unprompted/tris/scripts/train_stage1.sh | 16 +
lib_unprompted/tris/scripts/train_stage2.sh | 15 +
.../tris/scripts/validate_stage1.sh | 84 +
.../tris/scripts/validate_stage2.sh | 68 +
lib_unprompted/tris/train_stage1.py | 449 +++
lib_unprompted/tris/train_stage2.py | 413 +++
lib_unprompted/tris/utils/__init__.py | 0
lib_unprompted/tris/utils/box_eval_utils.py | 75 +
lib_unprompted/tris/utils/box_utils.py | 118 +
lib_unprompted/tris/utils/poly_lr_decay.py | 39 +
lib_unprompted/tris/utils/util.py | 197 ++
lib_unprompted/tris/validate.py | 424 +++
lib_unprompted/tris/validate_referit.py | 267 ++
requirements.txt | 13 +-
scripts/unprompted.py | 847 +++--
shortcodes/basic/#.py | 13 +-
shortcodes/basic/after.py | 20 +-
shortcodes/basic/array.py | 41 +-
shortcodes/basic/autotone.py | 84 -
shortcodes/basic/bypass.py | 16 +-
shortcodes/basic/call.py | 24 +-
shortcodes/basic/case.py | 7 +-
shortcodes/basic/casing.py | 40 +-
shortcodes/basic/cast.py | 24 +-
shortcodes/basic/chance.py | 12 +-
shortcodes/basic/choose.py | 18 +-
shortcodes/basic/do.py | 25 +-
shortcodes/basic/filelist.py | 67 +-
shortcodes/basic/filter_tags.py | 30 +-
shortcodes/basic/for.py | 41 +-
shortcodes/basic/function.py | 14 +-
shortcodes/basic/get.py | 66 +-
shortcodes/basic/gpt.py | 34 +-
shortcodes/basic/if.py | 16 +-
shortcodes/basic/image_edit.py | 257 ++
shortcodes/basic/image_info.py | 37 +-
shortcodes/basic/info.py | 23 +-
shortcodes/basic/length.py | 26 +-
shortcodes/basic/logs.py | 12 +-
shortcodes/basic/override.py | 14 +-
shortcodes/basic/overrides.py | 10 +-
shortcodes/basic/random.py | 14 +-
shortcodes/basic/repeat.py | 25 +-
shortcodes/basic/replace.py | 38 +-
shortcodes/basic/resize.py | 85 +-
shortcodes/basic/round.py | 21 +-
shortcodes/basic/set.py | 49 +-
shortcodes/basic/sets.py | 9 +-
shortcodes/basic/substring.py | 42 +-
shortcodes/basic/switch.py | 17 +-
shortcodes/basic/tags.py | 62 +-
shortcodes/basic/template.py | 12 +-
shortcodes/basic/unset.py | 4 +-
shortcodes/basic/while.py | 24 +-
shortcodes/basic/wizard.py | 11 +-
shortcodes/legacy/controlnet.py | 236 --
shortcodes/legacy/enable_multi_images.py | 148 -
shortcodes/legacy/file.py | 56 -
shortcodes/stable_diffusion/color_correct.py | 21 +-
shortcodes/stable_diffusion/faceswap.py | 74 +-
shortcodes/stable_diffusion/file2mask.py | 23 +-
shortcodes/stable_diffusion/img2img.py | 16 +-
.../stable_diffusion/img2img_autosize.py | 10 +-
shortcodes/stable_diffusion/img2pez.py | 57 +-
shortcodes/stable_diffusion/init_image.py | 29 +-
shortcodes/stable_diffusion/instance2mask.py | 83 +-
shortcodes/stable_diffusion/interrogate.py | 183 +-
shortcodes/stable_diffusion/remember.py | 4 +-
shortcodes/stable_diffusion/restore_faces.py | 90 +-
shortcodes/stable_diffusion/seed.py | 4 +-
shortcodes/stable_diffusion/txt2mask.py | 421 ++-
shortcodes/stable_diffusion/upscale.py | 29 +-
shortcodes/stable_diffusion/zoom_enhance.py | 146 +-
style.css | 28 +-
.../common/functions/clipdrop_sdxl_styles.txt | 79 -
templates/common/functions/distillery.png | Bin 129450 -> 0 bytes
templates/common/functions/facelift.png | Bin 61362 -> 0 bytes
templates/common/functions/facelift.txt | 15 -
templates/common/functions/magic_spice.txt | 57 -
.../functions/regional_prompter_buddy.png | Bin 80294 -> 0 bytes
templates/common/helpers/wizard_tab.txt | 3 +
.../presets/controlnet/xl_quickshot_v1.txt | 3 +
.../presets/dimensions/landscape_3-2.txt | 2 +-
.../presets/dimensions/portrait_2-3.txt | 2 +-
.../presets/dimensions/small_square_1-1.txt | 2 +-
.../common/presets/dimensions/square_1-1.txt | 2 +-
.../presets/dimensions/vertical_9-16.txt | 2 +-
.../presets/dimensions/widescreen_16-9.txt | 2 +-
templates/common/presets/facelift/fast_v1.txt | 1 -
templates/common/presets/facelift/fast_v2.txt | 1 +
.../presets/facelift/make_embedding.txt | 2 +-
.../presets/img2img/full_denoise_v3.txt | 1 -
.../presets/img2img/full_denoise_v4.txt | 1 +
.../presets/magic_spice/allspice_v2.txt | 33 +-
.../presets/magic_spice/booru_spice_v3.txt | 18 +-
.../presets/magic_spice/photo_spice_v2.txt | 31 +-
.../magic_spice/pony_photoreal_spice_v1.txt | 12 +
.../presets/stylebook/clipdrop/3d_model.txt | 2 +
.../stylebook/clipdrop/analog_film.txt | 2 +
.../presets/stylebook/clipdrop/anime.txt | 2 +
.../presets/stylebook/clipdrop/cinematic.txt | 2 +
.../presets/stylebook/clipdrop/comic_book.txt | 2 +
.../presets/stylebook/clipdrop/craft_clay.txt | 2 +
.../stylebook/clipdrop/digital_art.txt | 2 +
.../presets/stylebook/clipdrop/enhance.txt | 2 +
.../stylebook/clipdrop/fantasy_art.txt | 2 +
.../presets/stylebook/clipdrop/isometric.txt | 2 +
.../presets/stylebook/clipdrop/line_art.txt | 2 +
.../presets/stylebook/clipdrop/lowpoly.txt | 2 +
.../presets/stylebook/clipdrop/neonpunk.txt | 2 +
.../presets/stylebook/clipdrop/origami.txt | 2 +
.../stylebook/clipdrop/photographic.txt | 2 +
.../presets/stylebook/clipdrop/pixel_art.txt | 2 +
.../presets/stylebook/clipdrop/texture.txt | 2 +
.../presets/stylebook/lovecraftian_photo.txt | 1 +
.../presets/stylebook/surreal_watercolor.txt | 2 +
.../_examples/example_template.txt} | 7 +-
.../_examples}/img2img_folder.txt | 3 +-
.../_examples}/txt2img2img.txt | 3 +-
.../common/wizard/bodysnatcher/CHANGELOG.md | 142 +
.../common/wizard/bodysnatcher/MANUAL.md | 34 +
.../bodysnatcher}/bodysnatcher.png | Bin
.../bodysnatcher}/bodysnatcher.txt | 134 +-
.../common/wizard/distillery/CHANGELOG.md | 9 +
.../common/wizard/distillery/distillery.png | Bin 0 -> 185457 bytes
.../distillery}/distillery.txt | 52 +-
templates/common/wizard/facelift/CHANGELOG.md | 10 +
templates/common/wizard/facelift/MANUAL.md | 26 +
templates/common/wizard/facelift/facelift.png | Bin 0 -> 94798 bytes
templates/common/wizard/facelift/facelift.txt | 33 +
.../common/wizard/magic_spice/CHANGELOG.md | 9 +
templates/common/wizard/magic_spice/MANUAL.md | 16 +
.../magic_spice}/magic_spice.png | Bin
.../common/wizard/magic_spice/magic_spice.txt | 77 +
.../regional_prompter_buddy/CHANGELOG.md | 9 +
.../wizard/regional_prompter_buddy/MANUAL.md | 8 +
.../regional_prompter_buddy.png | Bin 0 -> 131041 bytes
.../regional_prompter_buddy.txt | 47 +-
.../common/wizard/stylebook/CHANGELOG.md | 11 +
.../stylebook/stylebook.png} | Bin
.../common/wizard/stylebook/stylebook.txt | 34 +
.../common/Reserved for native workflows | 0
393 files changed, 30063 insertions(+), 4034 deletions(-)
create mode 100644 docs/TODO.md
create mode 100644 docs/shortcodes/##.md
create mode 100644 docs/shortcodes/#.md
create mode 100644 docs/shortcodes/after.md
create mode 100644 docs/shortcodes/antonyms.md
create mode 100644 docs/shortcodes/array.md
create mode 100644 docs/shortcodes/article.md
create mode 100644 docs/shortcodes/autocorrect.md
create mode 100644 docs/shortcodes/bypass.md
create mode 100644 docs/shortcodes/call.md
create mode 100644 docs/shortcodes/case.md
create mode 100644 docs/shortcodes/casing.md
create mode 100644 docs/shortcodes/cast.md
create mode 100644 docs/shortcodes/chance.md
create mode 100644 docs/shortcodes/choose.md
create mode 100644 docs/shortcodes/civitai.md
create mode 100644 docs/shortcodes/config.md
create mode 100644 docs/shortcodes/conjugate.md
create mode 100644 docs/shortcodes/do.md
create mode 100644 docs/shortcodes/elif.md
create mode 100644 docs/shortcodes/else.md
create mode 100644 docs/shortcodes/eval.md
create mode 100644 docs/shortcodes/faceswap.md
create mode 100644 docs/shortcodes/file2mask.md
create mode 100644 docs/shortcodes/filelist.md
create mode 100644 docs/shortcodes/filter_tags.md
create mode 100644 docs/shortcodes/for.md
create mode 100644 docs/shortcodes/function.md
create mode 100644 docs/shortcodes/get.md
create mode 100644 docs/shortcodes/gpt.md
create mode 100644 docs/shortcodes/hypernyms.md
create mode 100644 docs/shortcodes/hyponyms.md
create mode 100644 docs/shortcodes/if.md
create mode 100644 docs/shortcodes/image_edit.md
create mode 100644 docs/shortcodes/image_info.md
create mode 100644 docs/shortcodes/img2img.md
create mode 100644 docs/shortcodes/img2img_autosize.md
create mode 100644 docs/shortcodes/img2pez.md
create mode 100644 docs/shortcodes/info.md
create mode 100644 docs/shortcodes/init_image.md
create mode 100644 docs/shortcodes/instance2mask.md
create mode 100644 docs/shortcodes/interrogate.md
create mode 100644 docs/shortcodes/invert_mask.md
create mode 100644 docs/shortcodes/length.md
create mode 100644 docs/shortcodes/log.md
create mode 100644 docs/shortcodes/logs.md
create mode 100644 docs/shortcodes/max.md
create mode 100644 docs/shortcodes/min.md
create mode 100644 docs/shortcodes/override.md
create mode 100644 docs/shortcodes/overrides.md
create mode 100644 docs/shortcodes/pluralize.md
create mode 100644 docs/shortcodes/random.md
create mode 100644 docs/shortcodes/remember.md
create mode 100644 docs/shortcodes/repeat.md
create mode 100644 docs/shortcodes/replace.md
create mode 100644 docs/shortcodes/resize.md
create mode 100644 docs/shortcodes/restore_faces.md
create mode 100644 docs/shortcodes/round.md
create mode 100644 docs/shortcodes/seed.md
create mode 100644 docs/shortcodes/set.md
create mode 100644 docs/shortcodes/sets.md
create mode 100644 docs/shortcodes/singularize.md
create mode 100644 docs/shortcodes/substring.md
create mode 100644 docs/shortcodes/switch.md
create mode 100644 docs/shortcodes/synonyms.md
create mode 100644 docs/shortcodes/tags.md
create mode 100644 docs/shortcodes/txt2img.md
create mode 100644 docs/shortcodes/txt2mask.md
create mode 100644 docs/shortcodes/unset.md
create mode 100644 docs/shortcodes/upscale.md
create mode 100644 docs/shortcodes/while.md
create mode 100644 docs/shortcodes/zoom_enhance.md
create mode 100644 images/posts/11.0.0/bodysnatcher.png
create mode 100644 images/posts/11.0.0/docs.png
create mode 100644 images/posts/11.0.0/gpeno.png
create mode 100644 images/unprompted_banner.png
create mode 100644 javascript/jquery-3.7.1.min.js
rename javascript/{active_wizards.js => wizard.js} (81%)
create mode 100644 lib_unprompted/gpeno/.gitignore
create mode 100644 lib_unprompted/gpeno/README.md
create mode 100644 lib_unprompted/gpeno/__init_paths.py
create mode 100644 lib_unprompted/gpeno/align_faces.py
create mode 100644 lib_unprompted/gpeno/demo.py
create mode 100644 lib_unprompted/gpeno/distributed.py
create mode 100644 lib_unprompted/gpeno/face_colorization.py
create mode 100644 lib_unprompted/gpeno/face_detect/.DS_Store
create mode 100644 lib_unprompted/gpeno/face_detect/data/FDDB/img_list.txt
create mode 100644 lib_unprompted/gpeno/face_detect/data/__init__.py
create mode 100644 lib_unprompted/gpeno/face_detect/data/config.py
create mode 100644 lib_unprompted/gpeno/face_detect/data/data_augment.py
create mode 100644 lib_unprompted/gpeno/face_detect/data/wider_face.py
create mode 100644 lib_unprompted/gpeno/face_detect/facemodels/__init__.py
create mode 100644 lib_unprompted/gpeno/face_detect/facemodels/net.py
create mode 100644 lib_unprompted/gpeno/face_detect/facemodels/retinaface.py
create mode 100644 lib_unprompted/gpeno/face_detect/layers/__init__.py
create mode 100644 lib_unprompted/gpeno/face_detect/layers/functions/prior_box.py
create mode 100644 lib_unprompted/gpeno/face_detect/layers/modules/__init__.py
create mode 100644 lib_unprompted/gpeno/face_detect/layers/modules/multibox_loss.py
create mode 100644 lib_unprompted/gpeno/face_detect/retinaface_detection.py
create mode 100644 lib_unprompted/gpeno/face_detect/utils/__init__.py
create mode 100644 lib_unprompted/gpeno/face_detect/utils/box_utils.py
create mode 100644 lib_unprompted/gpeno/face_detect/utils/nms/__init__.py
create mode 100644 lib_unprompted/gpeno/face_detect/utils/nms/py_cpu_nms.py
create mode 100644 lib_unprompted/gpeno/face_detect/utils/timer.py
create mode 100644 lib_unprompted/gpeno/face_enhancement.py
create mode 100644 lib_unprompted/gpeno/face_inpainting.py
create mode 100644 lib_unprompted/gpeno/face_model/face_gan.py
create mode 100644 lib_unprompted/gpeno/face_model/gpen_model.py
create mode 100644 lib_unprompted/gpeno/face_model/op/__init__.py
create mode 100644 lib_unprompted/gpeno/face_model/op/fused_act.py
create mode 100644 lib_unprompted/gpeno/face_model/op/fused_bias_act.cpp
create mode 100644 lib_unprompted/gpeno/face_model/op/fused_bias_act_kernel.cu
create mode 100644 lib_unprompted/gpeno/face_model/op/upfirdn2d.cpp
create mode 100644 lib_unprompted/gpeno/face_model/op/upfirdn2d.py
create mode 100644 lib_unprompted/gpeno/face_model/op/upfirdn2d_kernel.cu
create mode 100644 lib_unprompted/gpeno/face_parse/blocks.py
create mode 100644 lib_unprompted/gpeno/face_parse/face_parsing.py
create mode 100644 lib_unprompted/gpeno/face_parse/face_parsing_broken.py
create mode 100644 lib_unprompted/gpeno/face_parse/mask.png
create mode 100644 lib_unprompted/gpeno/face_parse/parse_model.py
create mode 100644 lib_unprompted/gpeno/face_parse/test.png
create mode 100644 lib_unprompted/gpeno/misc/cog.yaml
create mode 100644 lib_unprompted/gpeno/misc/onnx_export.py
create mode 100644 lib_unprompted/gpeno/misc/predict.py
create mode 100644 lib_unprompted/gpeno/requirements.txt
create mode 100644 lib_unprompted/gpeno/training/data_loader/dataset_face.py
create mode 100644 lib_unprompted/gpeno/training/data_loader/degradations.py
create mode 100644 lib_unprompted/gpeno/training/loss/helpers.py
create mode 100644 lib_unprompted/gpeno/training/loss/id_loss.py
create mode 100644 lib_unprompted/gpeno/training/loss/model_irse.py
create mode 100644 lib_unprompted/gpeno/training/lpips/__init__.py
create mode 100644 lib_unprompted/gpeno/training/lpips/lpips.py
create mode 100644 lib_unprompted/gpeno/training/lpips/pretrained_networks.py
create mode 100644 lib_unprompted/gpeno/training/lpips/trainer.py
create mode 100644 lib_unprompted/gpeno/training/lpips/weights/v0.0/alex.pth
create mode 100644 lib_unprompted/gpeno/training/lpips/weights/v0.0/squeeze.pth
create mode 100644 lib_unprompted/gpeno/training/lpips/weights/v0.0/vgg.pth
create mode 100644 lib_unprompted/gpeno/training/lpips/weights/v0.1/alex.pth
create mode 100644 lib_unprompted/gpeno/training/lpips/weights/v0.1/squeeze.pth
create mode 100644 lib_unprompted/gpeno/training/lpips/weights/v0.1/vgg.pth
create mode 100644 lib_unprompted/restoreformerplusplus/.gitignore
create mode 100644 lib_unprompted/restoreformerplusplus/LICENSE
create mode 100644 lib_unprompted/restoreformerplusplus/README.md
create mode 100644 lib_unprompted/restoreformerplusplus/RF_requirements.txt
create mode 100644 lib_unprompted/restoreformerplusplus/RestoreFormer/RestoreFormer.py
create mode 100644 lib_unprompted/restoreformerplusplus/RestoreFormer/data/ffhq_dataset_aug.py
create mode 100644 lib_unprompted/restoreformerplusplus/RestoreFormer/data/ffhq_degradation_dataset.py
create mode 100644 lib_unprompted/restoreformerplusplus/RestoreFormer/data/ffhq_uneven_degradation_dataset.py
create mode 100644 lib_unprompted/restoreformerplusplus/RestoreFormer/distributed/__init__.py
create mode 100644 lib_unprompted/restoreformerplusplus/RestoreFormer/distributed/distributed.py
create mode 100644 lib_unprompted/restoreformerplusplus/RestoreFormer/distributed/launch.py
create mode 100644 lib_unprompted/restoreformerplusplus/RestoreFormer/download_util.py
create mode 100644 lib_unprompted/restoreformerplusplus/RestoreFormer/models/vqgan_v1.py
create mode 100644 lib_unprompted/restoreformerplusplus/RestoreFormer/modules/discriminator/model.py
create mode 100644 lib_unprompted/restoreformerplusplus/RestoreFormer/modules/losses/__init__.py
create mode 100644 lib_unprompted/restoreformerplusplus/RestoreFormer/modules/losses/lpips.py
create mode 100644 lib_unprompted/restoreformerplusplus/RestoreFormer/modules/losses/vqperceptual.py
create mode 100644 lib_unprompted/restoreformerplusplus/RestoreFormer/modules/util.py
create mode 100644 lib_unprompted/restoreformerplusplus/RestoreFormer/modules/vqvae/arcface_arch.py
create mode 100644 lib_unprompted/restoreformerplusplus/RestoreFormer/modules/vqvae/facial_component_discriminator.py
create mode 100644 lib_unprompted/restoreformerplusplus/RestoreFormer/modules/vqvae/utils.py
create mode 100644 lib_unprompted/restoreformerplusplus/RestoreFormer/modules/vqvae/vqvae_arch.py
create mode 100644 lib_unprompted/restoreformerplusplus/RestoreFormer/util.py
create mode 100644 lib_unprompted/restoreformerplusplus/__init__.py
create mode 100644 lib_unprompted/restoreformerplusplus/configs/HQ_Dictionary.yaml
create mode 100644 lib_unprompted/restoreformerplusplus/configs/ROHQD.yaml
create mode 100644 lib_unprompted/restoreformerplusplus/configs/RestoreFormer.yaml
create mode 100644 lib_unprompted/restoreformerplusplus/configs/RestoreFormerPlusPlus.yaml
create mode 100644 lib_unprompted/restoreformerplusplus/gradio_demo/.gitattributes
create mode 100644 lib_unprompted/restoreformerplusplus/gradio_demo/.gitignore
create mode 100644 lib_unprompted/restoreformerplusplus/gradio_demo/README.md
create mode 100644 lib_unprompted/restoreformerplusplus/gradio_demo/RestoreFormer.py
create mode 100644 lib_unprompted/restoreformerplusplus/gradio_demo/RestoreFormer_arch.py
create mode 100644 lib_unprompted/restoreformerplusplus/gradio_demo/app.py
create mode 100644 lib_unprompted/restoreformerplusplus/gradio_demo/packages.txt
create mode 100644 lib_unprompted/restoreformerplusplus/gradio_demo/requirements.txt
create mode 100644 lib_unprompted/restoreformerplusplus/images/fig1.png
create mode 100644 lib_unprompted/restoreformerplusplus/images/fig3.png
create mode 100644 lib_unprompted/restoreformerplusplus/inference.py
create mode 100644 lib_unprompted/restoreformerplusplus/main.py
create mode 100644 lib_unprompted/restoreformerplusplus/scripts/metrics/cal_fid.py
create mode 100644 lib_unprompted/restoreformerplusplus/scripts/metrics/cal_identity_distance.py
create mode 100644 lib_unprompted/restoreformerplusplus/scripts/metrics/cal_psnr_ssim.py
create mode 100644 lib_unprompted/restoreformerplusplus/scripts/metrics/run.sh
create mode 100644 lib_unprompted/restoreformerplusplus/scripts/run.sh
create mode 100644 lib_unprompted/restoreformerplusplus/scripts/test.py
create mode 100644 lib_unprompted/restoreformerplusplus/scripts/test.sh
create mode 100644 lib_unprompted/tris/CLIP/clip/__init__.py
create mode 100644 lib_unprompted/tris/CLIP/clip/bpe_simple_vocab_16e6.txt.gz
create mode 100644 lib_unprompted/tris/CLIP/clip/clip.py
create mode 100644 lib_unprompted/tris/CLIP/clip/model.py
create mode 100644 lib_unprompted/tris/CLIP/clip/simple_tokenizer.py
create mode 100644 lib_unprompted/tris/IRNet/imutils.py
create mode 100644 lib_unprompted/tris/IRNet/misc/imutils.py
create mode 100644 lib_unprompted/tris/IRNet/misc/indexing.py
create mode 100644 lib_unprompted/tris/IRNet/misc/pyutils.py
create mode 100644 lib_unprompted/tris/IRNet/misc/torchutils.py
create mode 100644 lib_unprompted/tris/IRNet/net/resnet50.py
create mode 100644 lib_unprompted/tris/IRNet/net/resnet50_aff.py
create mode 100644 lib_unprompted/tris/IRNet/net/resnet50_cam.py
create mode 100644 lib_unprompted/tris/IRNet/net/resnet50_irn.py
create mode 100644 lib_unprompted/tris/IRNet/net/resnet50_v2.py
create mode 100644 lib_unprompted/tris/IRNet/run_sample_refer.py
create mode 100644 lib_unprompted/tris/IRNet/step_refer/cam_to_ir_label.py
create mode 100644 lib_unprompted/tris/IRNet/step_refer/make_ins_seg_labels.py
create mode 100644 lib_unprompted/tris/IRNet/step_refer/train_irn.py
create mode 100644 lib_unprompted/tris/IRNet/torch_utils.py
create mode 100644 lib_unprompted/tris/IRNet/train_refer.sh
create mode 100644 lib_unprompted/tris/IRNet/train_refer1.sh
create mode 100644 lib_unprompted/tris/IRNet/utils.py
create mode 100644 lib_unprompted/tris/IRNet/voc12/dataloader.py
create mode 100644 lib_unprompted/tris/LICENSE
create mode 100644 lib_unprompted/tris/README.md
create mode 100644 lib_unprompted/tris/__init__.py
create mode 100644 lib_unprompted/tris/adamw.py
create mode 100644 lib_unprompted/tris/args.py
create mode 100644 lib_unprompted/tris/dataset/Dataset_referit.py
create mode 100644 lib_unprompted/tris/dataset/ReferDataset.py
create mode 100644 lib_unprompted/tris/dataset/__init__.py
create mode 100644 lib_unprompted/tris/dataset/refer.py
create mode 100644 lib_unprompted/tris/dataset/tfs.py
create mode 100644 lib_unprompted/tris/dataset/transform.py
create mode 100644 lib_unprompted/tris/dataset/utils.py
create mode 100644 lib_unprompted/tris/demo.py
create mode 100644 lib_unprompted/tris/environment.yml
create mode 100644 lib_unprompted/tris/figs/demo.png
create mode 100644 lib_unprompted/tris/figs/demo_(man on the right).png
create mode 100644 lib_unprompted/tris/figs/pipeline.png
create mode 100644 lib_unprompted/tris/logger.py
create mode 100644 lib_unprompted/tris/loss/clip_loss.py
create mode 100644 lib_unprompted/tris/loss/seg_loss.py
create mode 100644 lib_unprompted/tris/model/__init__.py
create mode 100644 lib_unprompted/tris/model/attn.py
create mode 100644 lib_unprompted/tris/model/model_stage1.py
create mode 100644 lib_unprompted/tris/model/model_stage2.py
create mode 100644 lib_unprompted/tris/model/utils.py
create mode 100644 lib_unprompted/tris/scripts/train_stage1.sh
create mode 100644 lib_unprompted/tris/scripts/train_stage2.sh
create mode 100644 lib_unprompted/tris/scripts/validate_stage1.sh
create mode 100644 lib_unprompted/tris/scripts/validate_stage2.sh
create mode 100644 lib_unprompted/tris/train_stage1.py
create mode 100644 lib_unprompted/tris/train_stage2.py
create mode 100644 lib_unprompted/tris/utils/__init__.py
create mode 100644 lib_unprompted/tris/utils/box_eval_utils.py
create mode 100644 lib_unprompted/tris/utils/box_utils.py
create mode 100644 lib_unprompted/tris/utils/poly_lr_decay.py
create mode 100644 lib_unprompted/tris/utils/util.py
create mode 100644 lib_unprompted/tris/validate.py
create mode 100644 lib_unprompted/tris/validate_referit.py
delete mode 100644 shortcodes/basic/autotone.py
create mode 100644 shortcodes/basic/image_edit.py
delete mode 100644 shortcodes/legacy/controlnet.py
delete mode 100644 shortcodes/legacy/enable_multi_images.py
delete mode 100644 shortcodes/legacy/file.py
delete mode 100644 templates/common/functions/clipdrop_sdxl_styles.txt
delete mode 100644 templates/common/functions/distillery.png
delete mode 100644 templates/common/functions/facelift.png
delete mode 100644 templates/common/functions/facelift.txt
delete mode 100644 templates/common/functions/magic_spice.txt
delete mode 100644 templates/common/functions/regional_prompter_buddy.png
create mode 100644 templates/common/helpers/wizard_tab.txt
create mode 100644 templates/common/presets/controlnet/xl_quickshot_v1.txt
delete mode 100644 templates/common/presets/facelift/fast_v1.txt
create mode 100644 templates/common/presets/facelift/fast_v2.txt
delete mode 100644 templates/common/presets/img2img/full_denoise_v3.txt
create mode 100644 templates/common/presets/img2img/full_denoise_v4.txt
create mode 100644 templates/common/presets/magic_spice/pony_photoreal_spice_v1.txt
create mode 100644 templates/common/presets/stylebook/clipdrop/3d_model.txt
create mode 100644 templates/common/presets/stylebook/clipdrop/analog_film.txt
create mode 100644 templates/common/presets/stylebook/clipdrop/anime.txt
create mode 100644 templates/common/presets/stylebook/clipdrop/cinematic.txt
create mode 100644 templates/common/presets/stylebook/clipdrop/comic_book.txt
create mode 100644 templates/common/presets/stylebook/clipdrop/craft_clay.txt
create mode 100644 templates/common/presets/stylebook/clipdrop/digital_art.txt
create mode 100644 templates/common/presets/stylebook/clipdrop/enhance.txt
create mode 100644 templates/common/presets/stylebook/clipdrop/fantasy_art.txt
create mode 100644 templates/common/presets/stylebook/clipdrop/isometric.txt
create mode 100644 templates/common/presets/stylebook/clipdrop/line_art.txt
create mode 100644 templates/common/presets/stylebook/clipdrop/lowpoly.txt
create mode 100644 templates/common/presets/stylebook/clipdrop/neonpunk.txt
create mode 100644 templates/common/presets/stylebook/clipdrop/origami.txt
create mode 100644 templates/common/presets/stylebook/clipdrop/photographic.txt
create mode 100644 templates/common/presets/stylebook/clipdrop/pixel_art.txt
create mode 100644 templates/common/presets/stylebook/clipdrop/texture.txt
create mode 100644 templates/common/presets/stylebook/lovecraftian_photo.txt
create mode 100644 templates/common/presets/stylebook/surreal_watercolor.txt
rename templates/common/{functions/example_function.txt => wizard/_examples/example_template.txt} (63%)
rename templates/common/{functions => wizard/_examples}/img2img_folder.txt (97%)
rename templates/common/{functions => wizard/_examples}/txt2img2img.txt (93%)
create mode 100644 templates/common/wizard/bodysnatcher/CHANGELOG.md
create mode 100644 templates/common/wizard/bodysnatcher/MANUAL.md
rename templates/common/{functions => wizard/bodysnatcher}/bodysnatcher.png (100%)
rename templates/common/{functions => wizard/bodysnatcher}/bodysnatcher.txt (52%)
create mode 100644 templates/common/wizard/distillery/CHANGELOG.md
create mode 100644 templates/common/wizard/distillery/distillery.png
rename templates/common/{functions => wizard/distillery}/distillery.txt (74%)
create mode 100644 templates/common/wizard/facelift/CHANGELOG.md
create mode 100644 templates/common/wizard/facelift/MANUAL.md
create mode 100644 templates/common/wizard/facelift/facelift.png
create mode 100644 templates/common/wizard/facelift/facelift.txt
create mode 100644 templates/common/wizard/magic_spice/CHANGELOG.md
create mode 100644 templates/common/wizard/magic_spice/MANUAL.md
rename templates/common/{functions => wizard/magic_spice}/magic_spice.png (100%)
create mode 100644 templates/common/wizard/magic_spice/magic_spice.txt
create mode 100644 templates/common/wizard/regional_prompter_buddy/CHANGELOG.md
create mode 100644 templates/common/wizard/regional_prompter_buddy/MANUAL.md
create mode 100644 templates/common/wizard/regional_prompter_buddy/regional_prompter_buddy.png
rename templates/common/{functions => wizard/regional_prompter_buddy}/regional_prompter_buddy.txt (66%)
create mode 100644 templates/common/wizard/stylebook/CHANGELOG.md
rename templates/common/{functions/clipdrop.png => wizard/stylebook/stylebook.png} (100%)
create mode 100644 templates/common/wizard/stylebook/stylebook.txt
create mode 100644 workflows/common/Reserved for native workflows
diff --git a/README.md b/README.md
index ed1e336..9082870 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
-
+
Links: 📣 Announcements | 📘 Manual | ⏱ Changelog | 🎓 Starter Guide
diff --git a/config.json b/config.json
index 9f9231a..f42ad0e 100644
--- a/config.json
+++ b/config.json
@@ -4,12 +4,12 @@
"beta_features":false,
"advanced_expressions":true,
"template_directory":"templates",
- "txt_format":".txt",
"base_dir":"",
"subdirectories":
{
"shortcodes":"shortcodes",
- "models":"models"
+ "models":"models",
+ "workflows":"workflows"
},
"globals":
{
@@ -48,8 +48,9 @@
"syntax":
{
"sanitize_before":{"\n":"\\n","\t":""},
- "sanitize_after":{"\\n":" ","NEWLINE":"\n"},
- "sanitize_block":{"\n":"","NEWLINE":"\n"},
+ "sanitize_after":{"\\n":" "},
+ "sanitize_block":{"\n":""},
+ "sanitize_last":{"%SPACE%":" ", "%NEWLINE%":"\n"},
"tag_start":"[",
"tag_end":"]",
"tag_start_alt":"{",
@@ -73,6 +74,8 @@
"batch_size_method":"standard",
"show_extra_generation_params":true,
"template_editor":true,
+ "cached_images_limit":4,
+ "resolutions":{"sd1":512,"sd2":768,"sdxl":1024,"none":1024},
"controlnet":
{
"extension":"sd-webui-controlnet",
@@ -109,6 +112,7 @@
"wizard_shortcodes":true,
"wizard_templates":true,
"wizard_capture":true,
+ "wizard_workflows":true,
"wizard_open":false,
"wizard_default_shortcode":"txt2mask",
"wizard_prepends":false,
diff --git a/docs/ABOUT.md b/docs/ABOUT.md
index 0d2aaa0..d84bef0 100644
--- a/docs/ABOUT.md
+++ b/docs/ABOUT.md
@@ -1,12 +1,20 @@
-#### Running Unprompted v$VERSION via the official Automatic1111 WebUI extension.
+Running **Unprompted v$VERSION** via the official Automatic1111 WebUI extension.
Unprompted is a powerful templating language written in Python. Unlike most templating languages, Unprompted was designed for **maximum readibility with natural language.** It is built around `[shortcodes]` and inspired by the likes of BBCode.
+
+
**Online resources:**
- 🏠 [Github Project Page](https://github.com/ThereforeGames/unprompted) *(* ⭐ *for visibility!)*
- 💬 [Discussion Board](https://github.com/ThereforeGames/unprompted/discussions)
- 🔧 [Issue Tracker](https://github.com/ThereforeGames/unprompted/issues)
-Software created by [Therefore Games](https://therefore.games). If you like my work, you can [sponsor the project on ☕ Github](https://github.com/sponsors/ThereforeGames) or [support me on ┃🔴 Patreon](https://patreon.com/thereforegames). Thank you!
+**Support my work:**
+- ☕ [GitHub Sponsorship](https://github.com/sponsors/ThereforeGames)
+- ┃🔴 [Patreon](https://patreon.com/thereforegames)
-*Compatible with Python v3.10.6 and WebUI v1.9.0.*
\ No newline at end of file
+
+
+Developed by [Therefore Games](https://therefore.games) as a gift to the Stable Diffusion community.
+
+*Compatible with **Python v3.10.6** and **WebUI v1.9.0**.*
\ No newline at end of file
diff --git a/docs/ANNOUNCEMENTS.md b/docs/ANNOUNCEMENTS.md
index a72ba5d..80ad3d4 100644
--- a/docs/ANNOUNCEMENTS.md
+++ b/docs/ANNOUNCEMENTS.md
@@ -1,6 +1,90 @@
# Unprompted Announcements
Stay informed on the latest Unprompted news and updates.
+Workflows Are Here! — 31 May 2024
+
+Hi folks,
+
+I'm pleased to announce the release of Unprompted v11, which is possibly the biggest update since version one.
+
+Let's dive into some of the new features:
+
+### Workflows
+
+In Unprompted, you can chain together various shortcodes and templates through the Wizard UI. But what if you want to save your configuration for future use? Now you can, using **workflows!**
+
+This new feature exports your active shortcodes and templates into a consolidated JSON file. You can give it a unique name and even share it with others, much like you can do in ComfyUI.
+
+Since workflows are saved as JSON, you can quickly and efficiently tweak them in your favorite text editor. Changes are reflected in the WebUI upon re-loading the template.
+
+### Streamlined Documentation
+
+Although I have spent a great deal of time on Unprompted's documentation, the manual was tricky to navigate and sometimes overlooked altogether.
+
+In Unprompted v11, I have migrated all of the shortcode docs to [standalone markdown files](https://github.com/ThereforeGames/unprompted/tree/main/docs/shortcodes), which are available inside of the Wizard GUI in the new `Documentation` tabs:
+
+
+
+Similarly, Wizard templates now have tabs for `About`, `Documentation`, and `Changelog`, which I hope will make it a lot easier to find the information you're looking for.
+
+### Bodysnatcher Upgrade
+
+The Bodysnatcher template has received numerous updates, including:
+
+- Better support for SDXL.
+- Smarter image interrogation, such that it only describes the masked subject instead of the entire input image.
+- New presets and bug fixes.
+
+
+
+Bodysnatcher is my goto tool for hassle-free inpainting. Give it a try with still-life subjects, too!
+
+### GPEN Optimizations
+
+GPEN is widely considered the best face restoration technique available right now. I have gone to some lengths optimizing this pipeline for Unprompted, resulting in much faster inference times - anecdotally, it's down from ~5s to ~0.3s with all caching features enabled on my GeForce 3090.
+
+As far as I know, this is the most efficient implementation of GPEN out there, and the results look fantastic.
+
+
+
+### Smarter Dependency Handling
+
+As a swiss army knife for Stable Diffusion, Unprompted has accumulated a lot of extra dependencies.
+
+The `requirements.txt` file was becoming unwieldy, leading to long startup times. You can use the `Config.skip_requirements` setting as a workaround, but this is an all-or-nothing approach - we can do better.
+
+In v11, Unprompted will now check for/install missing dependencies **only when needed.** For example, if you don't have the `ultralytics` module required by `[txt2mask]`, Unprompted will not attempt to download it until you use `[txt2mask]` in a prompt.
+
+### The `[image_edit]` Block
+
+Unprompted has a few tools for modifying images, such as `[autotone]` and `[resize]`. For the sake of simplicity, I have decided to consolidate these features into a single powerful `[image_edit]` shortcode.
+
+This block is super flexible - you can perform multiple operations on your image in a single call, e.g.:
+
+```
+[image_edit width=768 height=1024 mask="C:/some/picture.png" paste="C:/another/picture.png"]
+```
+
+It will also respect the order of operations of your arguments, making it quite useful as a code-based image editor.
+
+Future updates will extend the shortcode with support for various other operations.
+
+### Enhanced shortcode behaviors and much more
+
+I know "much more" is a cliché, but it's true! I encourage you to [check out the changelog](https://github.com/ThereforeGames/unprompted/blob/main/docs/CHANGELOG.md) for all the details, such as:
+
+- Greatly improved UI performance by eliminating many Gradio event listeners
+- Dozens of new options for existing shortcodes
+- Updates for most of the included templates
+- Special string macros `%SPACE%` and `%NEWLINE%` for fine control over the resulting prompt
+- Wizard UI improvements
+
+---
+
+I hope you enjoy the patch, and thank you for your continued support!
+
+
+
Beefier Auto-Includes — 25 April 2024
Hi folks,
diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md
index ebcd974..17a2532 100644
--- a/docs/CHANGELOG.md
+++ b/docs/CHANGELOG.md
@@ -3,7 +3,97 @@ All notable changes to this project will be documented in this file.
For more details on new features, please check the [Manual](./MANUAL.md).
-10.12.0 - 2 May 2024
+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 the `id` kwarg: 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 in `templates/user/presets` now
+- 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 ` `cleanup()` -> `after()` -> `goodbye()`
+
+### Changed
+- Reworked `wizard_generate_shortcode()`, `wizard_generate_template()`, and `wizard_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/functions` to `templates/common/wizard`
+- Organized built-in Wizard templates into individual subfolders
+- Gradio elements created by `[wizard]` will no longer save to the WebUI's `ui-config.json`
+- Replaced the Wizard banner gradient effect with CSS
+- The Wizard dropdown `_multiselect` kwarg 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 requires `sentence-transformers==2.2.2` to 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.py` handling of required modules that include `==`
+- Fixed an issue where the `parse_arg()` function could interfere with the evaluation of `kwargs` and `pargs` in 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
@@ -471,8 +561,6 @@ This update introduces global variables, several image processing shortcodes and
-
-👴🏼 Older Versions
9.16.1 - 7 September 2023
### Fixed
diff --git a/docs/GUIDE.md b/docs/GUIDE.md
index d419074..14843b6 100644
--- a/docs/GUIDE.md
+++ b/docs/GUIDE.md
@@ -251,6 +251,43 @@ Add an entry called `templates` as shown below:
The asterisk wildcard represents any prompt. Restart the WebUI and you're all set!
+## Supercharging [replace] with additional options
+
+I would like to bring a couple pargs (positional arguments) available in `[replace]` that may improve your workflow:
+
+### _strict
+
+This will prevent `[replace]` from processing the shortcodes in your JSON values *unless* the key matches a string in your content. In other words, you need to use this if you wish to add shortcodes to your dictionary values.
+
+### _now
+
+Runs the `[replace]` operations *before* executing any shortcodes in the content. For example, let's say you have a replacement query that includes the setting of a variable:
+
+```
+ "char_john_smith" : "male, brown hair[set name='John']"
+```
+
+And you have a prompt like this:
+
+```
+char_john_smith, [get name]
+```
+
+The `[get name]` will return an empty string because it runs *before* `[replace]` sets the variable.
+
+So you must add `_now` to avoid this.
+
+Putting both options together, your config setting may look like this:
+
+```
+{
+ "templates":
+ {
+ "default":"[replace _load='user/replace.json' _now _strict]*[/replace]"
+ }
+}
+```
+
Using Metatags with Your [choose] Blocks
diff --git a/docs/MANUAL.md b/docs/MANUAL.md
index 1cd66dc..54b6bee 100644
--- a/docs/MANUAL.md
+++ b/docs/MANUAL.md
@@ -1,3 +1,5 @@
+> 💡 **Notice:** Shortcode documentation has moved! It is now available inside of the Wizard panel of the WebUI. [You may also view the individual markdown files on GitHub.](https://github.com/ThereforeGames/unprompted/tree/main/docs/shortcodes)
+
# Unprompted Manual
Shortcode syntax is subject to change based on community feedback.
@@ -8,22 +10,12 @@ If you encounter any confusing, incomplete, or out-of-date information here, ple
WebUI slowdowns
-Due to the nature of Gradio, creating many UI elements leads to performance issues in the WebUI. This may be resolved in Gradio 4, as [suggested here](https://github.com/gradio-app/gradio/issues/4841#issuecomment-1632141732).
+Due to the nature of Gradio, creating many UI elements or event listeners leads to performance issues in the WebUI. This may be resolved in Gradio 4, as [suggested here](https://github.com/gradio-app/gradio/issues/4841#issuecomment-1632141732).
In the meantime, you can improve performance by disabling Wizard tabs you do not use. For example, you can disable the Shortcodes tab by setting `ui.wizard_shortcodes` to false in `config_user.json`.
-Wizard Slider Values
-
-When you generate a shortcode in the Wizard, some values may not quite match your sliders in the UI. This is due to a Gradio bug that will be resolved once the Web UI upgrades to Gradio 4:
-
-https://github.com/gradio-app/gradio/issues/1453
-
-As a workaround, you can type values into the box as opposed to dragging the sliders.
-
-
-
Compatibility with ControlNet
To achieve compatibility between Unprompted and ControlNet, you must manually rename the `unprompted` extension folder to `_unprompted`. This is due to [a limitation in the Automatic1111 extension framework](https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/8011) whereby priority is determined alphabetically.
@@ -45,6 +37,99 @@ The following extension(s) are known to cause issues with Unprompted:
The WebUI setting "Lora/Networks: use old method [...]" is not compatible with Unprompted and will cause a crash during image generation.
+
+
+## 🧙 The Wizard
+
+What is the Wizard?
+
+The Unprompted WebUI extension has a dedicated panel called the Wizard. It is a GUI-based shortcode builder.
+
+Pressing **"Generate Shortcode"** will assemble a ready-to-use block of code that you can add to your prompts.
+
+Alternatively, you can enable `Auto-include this in prompt` which will add the shortcode to your prompts behind the scenes. This essentially lets you use Unprompted shortcodes as if they were standalone scripts. You can enable/disable this setting on a per-shortcode basis.
+
+The Wizard includes three distinct modes: Shortcodes, Templates, and Capture.
+
+
+
+Shortcodes Mode
+
+This mode presents you with a list of all shortcodes that have a `ui()` block in their source code.
+
+You can add Wizard UI support to your own custom shortcodes by declaring a `ui()` function as shown below:
+
+```
+ def ui(self,gr):
+ gr.Radio(label="Mask blend mode 🡢 mode",choices=["add","subtract","discard"],value="add",interactive=True)
+ gr.Checkbox(label="Show mask in output 🡢 show")
+ gr.Checkbox(label="Use legacy weights 🡢 legacy_weights")
+ gr.Number(label="Precision of selected area 🡢 precision",value=100,interactive=True)
+ gr.Number(label="Padding radius in pixels 🡢 padding",value=0,interactive=True)
+ gr.Number(label="Smoothing radius in pixels 🡢 smoothing",value=20,interactive=True)
+ gr.Textbox(label="Negative mask prompt 🡢 negative_mask",max_lines=1)
+ gr.Textbox(label="Save the mask size to the following variable 🡢 size_var",max_lines=1)
+```
+
+The above code is the entirety of txt2mask's UI at the time of writing. We recommend examining the .py files of other shortcodes if you want to see additional examples of how to construct your UI.
+
+Every possible shortcode argument is exposed in the UI, labeled in the form of `Natural description 🡢 technical_argument_name`. The Wizard only uses the technical_argument_name when constructing the final shortcode.
+
+There are a few reserved argument names that will modify the Wizard's behavior:
+
+- `arg_verbatim`: This will inject the field's value directly into the shortcode. Useful for shortcodes that can accept multiple, optional arguments that do not have pre-determined names.
+- `arg_str`: This will inject the field's value into the shortcode, enclosing it in quotation marks.
+- `arg_int`: This will inject the field's value into the shortcode, casting it as an integer.
+
+Note that every `technical_argument_name` must be unique, so if you need to re-use one of the above reserved names, you can append a number to it. For example, `arg_verbatim_1`, `arg_verbatim_2`, etc.
+
+
+
+Templates Mode
+
+This mode presents you with a list of txt files inside your `Unprompted/templates` directory that begin with a `[template]` block.
+
+By including this block in your file, Unprompted will parse the file for its `[set x _new]` statements and adapt those into a custom Wizard UI.
+
+The `_new` argument means *"only set this variable if it doesn't already exist,"* which are generally the variables we want to show in a UI.
+
+The `[template]` block supports the optional `name` argument which is a friendly name for your function shown in the Templates dropdown menu.
+
+The content of `[template]` is a description of your script to be rendered with [Markdown](https://www.markdownguide.org/basic-syntax/), which means you can include rich content like pictures or links. It will show up at the top of your UI.
+
+The `[set]` block supports `_ui` which determines the type of UI element to render your variable as. Defaults to `textbox`. Here are the possible types:
+
+- `textbox`: Ideal for strings. The content of your `[set]` block will be rendered as placeholder text.
+- `number`: Ideal for integers.
+- `radio`: A list of radio buttons that are determined by the `_choices` argument, constructed as a delimited list.
+- `dropdown`: A dropdown menu that is populated by the `_choices` argument, constructed as a delimited list.
+- `slider`: Limits selection to a range of numbers. You must also specify `_minimum`, `_maximum` and `_step` (step size, normally 1) for this element to work properly.
+- `none`: Do not create this block as a UI element even if it has the `_new` parg.
+
+The `[set]` block supports `_label` which is the friendly text to use above the UI element. If not set, the label will default to the variable name you're calling with `[set]` in titlecase format (e.g. "my_variable" becomes "My Variable.")
+
+The `[set]` block supports `_show_label` which lets you toggle visibility of the label in the UI. Defaults to True.
+
+The `[set]` block supports `_info` which is descriptive text that will appear near the UI element.
+
+The `[set]` block supports `_lines` and `_max_lines` to specify the number of rows shown in a `textbox` element.
+
+Supports the `[wizard]` shortcode which will group the inner `[set]` blocks into a group UI element, the type of which is defined by the first parg: `accordion`, `row`, or `column`.
+
+
+
+Capture Mode
+
+This mode offers a convenient way to produce the code for the last image you generated.
+
+It has a few settings that change how the code is formatted:
+
+- **Include inference settings:** Determines which inference options to show as a `[sets]` block. These are settings such as CFG Scale, batch count, etc. On `simple`, it will exclude variables with a value of 0 as well as empty strings. `Verbose` gives you everything.
+- **Include (negative) prompt:** Determines whether to show the prompt. On `original`, it will show the prompt with shortcodes intact, whereas `postprocessed` gives you the prompt after shortcodes have been executed.
+- **Include model:** adds the checkpoint name to the `[sets]` block.
+- **Add [template] block**: Prepends the result with a placeholder `[template]` block that makes your code compatible with the Wizard Templates tab.
+
+
## 🎓 Proficiency
@@ -493,1824 +578,4 @@ And you're set!
-
-
-## 🧙 The Wizard
-
-What is the Wizard?
-
-The Unprompted WebUI extension has a dedicated panel called the Wizard. It is a GUI-based shortcode builder.
-
-Pressing **"Generate Shortcode"** will assemble a ready-to-use block of code that you can add to your prompts.
-
-Alternatively, you can enable `Auto-include this in prompt` which will add the shortcode to your prompts behind the scenes. This essentially lets you use Unprompted shortcodes as if they were standalone scripts. You can enable/disable this setting on a per-shortcode basis.
-
-The Wizard includes three distinct modes: Shortcodes, Templates, and Capture.
-
-
-
-Shortcodes Mode
-
-This mode presents you with a list of all shortcodes that have a `ui()` block in their source code.
-
-You can add Wizard UI support to your own custom shortcodes by declaring a `ui()` function as shown below:
-
-```
- def ui(self,gr):
- gr.Radio(label="Mask blend mode 🡢 mode",choices=["add","subtract","discard"],value="add",interactive=True)
- gr.Checkbox(label="Show mask in output 🡢 show")
- gr.Checkbox(label="Use legacy weights 🡢 legacy_weights")
- gr.Number(label="Precision of selected area 🡢 precision",value=100,interactive=True)
- gr.Number(label="Padding radius in pixels 🡢 padding",value=0,interactive=True)
- gr.Number(label="Smoothing radius in pixels 🡢 smoothing",value=20,interactive=True)
- gr.Textbox(label="Negative mask prompt 🡢 negative_mask",max_lines=1)
- gr.Textbox(label="Save the mask size to the following variable 🡢 size_var",max_lines=1)
-```
-
-The above code is the entirety of txt2mask's UI at the time of writing. We recommend examining the .py files of other shortcodes if you want to see additional examples of how to construct your UI.
-
-Every possible shortcode argument is exposed in the UI, labeled in the form of `Natural description 🡢 technical_argument_name`. The Wizard only uses the technical_argument_name when constructing the final shortcode.
-
-There are a few reserved argument names that will modify the Wizard's behavior:
-
-- `verbatim`: This will inject the field's value directly into the shortcode. Useful for shortcodes that can accept multiple, optional arguments that do not have pre-determined names.
-- `str`: This will inject the field's value into the shortcode, enclosing it in quotation marks.
-- `int`: This will inject the field's value into the shortcode, casting it as an integer.
-
-
-
-Templates Mode
-
-This mode presents you with a list of txt files inside your `Unprompted/templates` directory that begin with a `[template]` block.
-
-By including this block in your file, Unprompted will parse the file for its `[set x _new]` statements and adapt those into a custom Wizard UI.
-
-The `_new` argument means *"only set this variable if it doesn't already exist,"* which are generally the variables we want to show in a UI.
-
-The `[template]` block supports the optional `name` argument which is a friendly name for your function shown in the Templates dropdown menu.
-
-The content of `[template]` is a description of your script to be rendered with [Markdown](https://www.markdownguide.org/basic-syntax/), which means you can include rich content like pictures or links. It will show up at the top of your UI.
-
-The `[set]` block supports `_ui` which determines the type of UI element to render your variable as. Defaults to `textbox`. Here are the possible types:
-
-- `textbox`: Ideal for strings. The content of your `[set]` block will be rendered as placeholder text.
-- `number`: Ideal for integers.
-- `radio`: A list of radio buttons that are determined by the `_choices` argument, constructed as a delimited list.
-- `dropdown`: A dropdown menu that is populated by the `_choices` argument, constructed as a delimited list.
-- `slider`: Limits selection to a range of numbers. You must also specify `_minimum`, `_maximum` and `_step` (step size, normally 1) for this element to work properly.
-- `none`: Do not create this block as a UI element even if it has the `_new` parg.
-
-The `[set]` block supports `_label` which is the friendly text to use above the UI element. If not set, the label will default to the variable name you're calling with `[set]` in titlecase format (e.g. "my_variable" becomes "My Variable.")
-
-The `[set]` block supports `_show_label` which lets you toggle visibility of the label in the UI. Defaults to True.
-
-The `[set]` block supports `_info` which is descriptive text that will appear near the UI element.
-
-The `[set]` block supports `_lines` and `_max_lines` to specify the number of rows shown in a `textbox` element.
-
-Supports the `[wizard]` shortcode which will group the inner `[set]` blocks into a group UI element, the type of which is defined by the first parg: `accordion`, `row`, or `column`.
-
-
-
-Capture Mode
-
-This mode offers a convenient way to produce the code for the last image you generated.
-
-It has a few settings that change how the code is formatted:
-
-- **Include inference settings:** Determines which inference options to show as a `[sets]` block. These are settings such as CFG Scale, batch count, etc. On `simple`, it will exclude variables with a value of 0 as well as empty strings. `Verbose` gives you everything.
-- **Include (negative) prompt:** Determines whether to show the prompt. On `original`, it will show the prompt with shortcodes intact, whereas `postprocessed` gives you the prompt after shortcodes have been executed.
-- **Include model:** adds the checkpoint name to the `[sets]` block.
-- **Add [template] block**: Prepends the result with a placeholder `[template]` block that makes your code compatible with the Wizard Templates tab.
-
-
-
-
-## ⚙️ Shortcodes
-
-Basic Shortcodes
-
-This section describes all of the included basic shortcodes and their functionality.
-
-[#]
-
-Use this to write comments in your templates. Comments are ultimately discarded by Unprompted and will not affect your final output.
-
-```
-[# This is my comment.]
-```
-
-
-[##]
-
-Similar to `[#]` but for multiline comments.
-
-This shortcode is unique in that the parser will ignore any malformed syntax inside the content. For example, if you have a `[##]` that contains a broken or unclosed shortcode within, Unprompted will not throw an error about it.
-
-```
-[##]
-This is my multiline comment.
-We're still commenting.
-I can't believe it, we're doing 3 lines of text!
-[/##]
-```
-
-
-
-[after after_index(int)]
-
-Processes the content after the main task is complete.
-
-This is particularly useful with the A1111 WebUI, as it gives you the ability to queue up additional tasks. For example, you can run img2img after txt2img from the same template.
-
-Supports the optional `after_index` argument which lets you control the order of multiple `[after]` blocks. Defaults to 0. For example, the `[after 2]` block will execute before the `[after 3]` block.
-
-You can `[get after_index]` inside of the `[after]` block, which can be useful when working with arrays and for loops.
-
-Supports the optional `allow_unsafe_scripts` parg which will disable the shortcode's normal behavior of bypassing extensions with known compatibility issues.
-
-Supports the `dupe_index_mode` kwarg which determines how the `[after]` block will handle duplicate indexes:
-
-- `concat` (default): The `[after]` block will be appended to the existing `[after]` block at the specified index.
-- `skip`: The `[after]` block will be ignored.
-- `append`: The `[after]` block will be added to the next available index.
-- `replace`: The existing `[after]` block at the specified index will be overwritten.
-
-```
-Photo of a cat
-[after]
- [sets prompt="Photo of a dog" denoising_strength=0.75]
- [img2img]
-[/after]
-```
-
-
-
-[antonyms]
-
-Replaces the content with one or more random antonyms. This shortcode is powered by a combination of WordNet and Moby Thesaurus II. Does not require an online connection after first use (word databases are downloaded to disk.)
-
-The optional `max` argument allows you to specify the maximum number of antonyms to return. Defaults to -1, which returns all antonyms. The antonyms list is delimited by `Unprompted.Config.syntax.delimiter`.
-
-The optional `include_self` positional argument determines whether the original content can be returned as a possible result. Defaults to False.
-
-The optional `enable_moby` keyword argument determines whether Moby Thesaurus II will be referenced. Defaults to True. On first use, the Moby Thesaurus will be downloaded to the `lib_unprompted` folder - it is about 24 MB.
-
-The optional `enable_wordnet` keyword argument determines whether WordNet will be referenced. Defaults to True.
-
-It is worth noting that Moby does not have native antonym support. This shortcode first queries WordNet, the results of which are then sent to Moby via `[synonyms]`.
-
-```
-[antonyms]cold[/antonyms]
-```
-
-
-
-[array name(str)]
-
-Manages a group or list of values.
-
-The first positional argument, `name`, must be a string that corresponds to a variable name for the array. You can later use the same identifier with `[get]` to retrieve every value in the array as a delimited string.
-
-If you want to **retrieve** values at specific indexes, supply the indexes as positional arguments as shown below:
-
-```
-[array my_array 2 4 3]
-```
-
-If you want to **set** values at specific indexes, supply the indexes as keyword arguments as shown below:
-
-```
-[array my_array 2="something" 4=500 3="something else"]
-```
-
-You can also use variable names as kwarg values and `[array]` will attempt to parse them for an integer value.
-
-Supports the optional `_delimiter` argument that defines the separator string when retrieving multiple values from the array. Defaults to your `Config.syntax.delimiter` setting.
-
-Supports `_append` which allows you to add values to the end of the array. You can pass multiple values into `_append` with your `_delimiter` string, e.g. `[array my_array _append="something|another thing|third thing"]`.
-
-Similarly, supports `_prepend` which allows you to insert values to the beginning of the array.
-
-Supports `_del` which will remove a value from the array at the specified index, e.g.
-
-```
-BEFORE: my_array = 5,7,9,6
-```
-```
-[my_array _del=1]
-```
-```
-AFTER: my_array = 5,9,6
-```
-
-Supports `_remove` which will remove the first matching value from the array, e.g.
-
-```
-BEFORE: my_array = 5,7,9,6
-```
-```
-[my_array _remove=9]
-```
-```
-AFTER: my_array = 5,7,6
-```
-
-Supports `_find` which will return the index of the first matching value in the array.
-
-Supports `_shuffle` which will randomize the order of the array.
-
-Supports `_fill` kwarg which will populate the entire array with a given value.
-
-
-
-[article]
-
-Returns the content prefixed with the correct English indefinite article, in most cases `a` or `an`.
-
-Supports the optional `definite` positional argument which will instead return the definite article as a prefix, usually `the`.
-
-```
-[article]tiger[/article]
-```
-
-```
-RESULT: a tiger
-```
-
-```
-[article]apple[/article]
-```
-```
-RESULT: an apple
-```
-
-
-
-[autocorrect]
-
-Performs word-by-word spellcheck on the content, replacing any typos it finds with the most likely correction.
-
-Powered by the [pattern](https://github.com/clips/pattern/wiki/pattern-en) library - see pattern docs for more info.
-
-Supports the optional `confidence` argument, which is a float between 0 and 1 that determines how similar the suggested correction must be to the original content. Defaults to 0.85.
-
-```
-[autocorrect]speling is vrey dfficult soemtims, okky!!![/autocorrect]
-```
-```
-RESULT: spelling is very difficult sometimes, okay!!!
-```
-
-
-
-[autotone]
-
-Adjusts the black point of a given image for enhanced contrast. The algorithm produces results that are virtually identical to the **Image > Auto Tone** feature in Photoshop.
-
-Supports the `file` kwarg which is the filepath to an image to modify. Defaults to the Stable Diffusion output.
-
-Supports the `show` parg which will append the original image to the output window.
-
-Supports the `out` kwarg which is a location to save the modified image to.
-
-```
-[after][autotone][/after]
-```
-
-
-
-[bypass]
-
-Allows you to disable the execution of specific shortcodes for the remainder of the run. It is similar to `[override]`, but for shortcodes instead of variables. Particularly useful for debugging purposes.
-
-Provide the names of the shortcodes you wish to disable as pargs, separated by spaces.
-
-If you supply `_toggle`, the shortcode can re-enable shortcodes that were previously bypassed.
-
-```
-[bypass repeat chance][repeat 3]do not print me[/repeat][chance 100]skip this too[/chance]print me
-```
-```
-RESULT: print me
-```
-
-
-
-[call]
-
-Processes the first parg as either a `[function]` name or filepath, returning the result.
-
-Functions take precedence over filepaths. You can declare a function with `[function some_method]` and execute it with `[call some_method]`.
-
-As for filepaths, `unprompted/templates` is the base directory for this shortcode, e.g. `[call example/main]` will target `unprompted/templates/example/main.txt`.
-
-If you do not enter a file extension, `.txt` is assumed.
-
-Supports relative paths by starting the `path` with `./`, e.g. `[call ./main]` will target the folder that the previously-called `[call]` resides in.
-
-This shortcode is powered by Python's glob module, which means it supports wildcards and other powerful syntax expressions. For example, if you wanted to process a random file inside of the `common` directory, you would do so like this: `[call common/*]`
-
-You can set arbitrary user variables with kwargs, e.g. `[call roman_numeral_converter number=7]`.
-
-The file is expected to be `utf-8` encoding. You can change this with the optional `_encoding` argument.
-
-This shortcode is compatible with `[else]`. Here are the situations that will cause `[else]` to fire:
-
-- The function has a `_required` argument that was not met.
-
-- The filepath doesn't exist.
-
-- Either the function or file return the term `_false`. (By the way, if this term is returned, it will not be printed.)
-
-Supports the `_suppress_errors` parg to prevent writing errors to the console.
-
-
-```
-[call my_template/common/adjective]
-```
-
-
-
-[case]
-
-See `[switch]`.
-
-
-
-[cast]
-
-Converts the content to the specified datatype.
-
-For security reasons, this shortcode is limited to the following datatypes: `int`, `float`, `str`, `bool`, `list`, `dict`.
-
-Please note that Unprompted is a weakly-typed language, which means that you can generally use a variable as any datatype without casting it. However, this shortcode may be useful when trying to pass an Unprompted variable to an outside function.
-
-```
-[cast int]34.7[/cast]
-```
-
-
-
-[casing type]
-
-Converts the casing of content to the selected type. Possible types:
-
-- uppercase
-- lowercase
-- camelcase
-- pascalcase
-- snakecase
-- constcase
-- kebabcase
-- upperkebabcase
-- separatorcase
-- sentencecase
-- titlecase
-- alphanumcase
-
-For more information on these types, consult the [casefy docs](https://github.com/dmlls/python-casefy), the library on which this shortcode depends.
-
-```
-[casing uppercase]why am i screaming[/casing]
-```
-```
-Result: WHY AM I SCREAMING
-```
-
-
-
-[chance int {_sides}]
-
-Returns the content if the integer you passed is greater than or equal to a randomly generated number between 1 and 100.
-
-You can change the upper boundary by specifying the optional `_sides` argument.
-
-```
-[chance 25]I will show up in your prompt 25% of the time.[/chance]
-```
-
-
-
-[choose]
-
-Randomly returns one of multiple options, as delimited by the vertical pipe or newline character.
-
-Supports `_case` which overrides the random nature of this shortcode with a pre-determined index (starting at 0.) Example: `[choose _case=1]red|yellow|green[/choose]` will always return `yellow`. You can also pass a variable into this argument.
-
-Supports an optional positional argument that tells the shortcode how many times to execute (default 1). For example: `[choose 2]Artist One|Artist Two|Artist Three|Artist Four[/choose]` will return two random artists.
-
-Supports the optional `_sep` argument which is a string delimeter that separates multiple options to be returned (defaults to `, `). In the example above, you might get `Artist One, Artist Three` as a result. When only returning one option, `_sep` is irrelevant.
-
-Supports the optional `_weighted` argument, which allows you to customize the probability of each option. Weighted mode expects the content to alternate between **weight value** and **the option itself** using the normal delimiter. For example, if you want your list to return Apple 30% of the time, Strawberry 50% of the time, and Blueberry 20% of the time you can do it like this:
-
-```
-[choose _weighted]
-3|Apple
-5|Strawberry
-2|Blueberry
-[/choose]
-```
-
-If you skip a weight value--e.g. `3|Apple|Strawberry`--then the following option (Strawberry) will automatically have a weight value of 1.
-
-The weight value dictates the number of times that an option is added to the master list of choices, which is then shuffled and picked from at random. So, if your content is `2|Blue|3|Red|Green` the master list becomes `Blue,Blue,Red,Red,Red,Green`.
-
-Supports the `_raw` parg, which prevents the execution of inner shortcodes except the one that is selected by `[choose]`.
-
-```
-[choose]red|yellow|blue|green[/choose]
-```
-
-
-
-[config]
-
-Updates your Unprompted settings with the content for the duration of a run. Generally you would put this at the top of a template.
-
-Supports inline JSON as well as external JSON files.
-
-Supports relative and absolute filepaths.
-
-If you do not enter a file extension, `.json` is assumed.
-
-```
-[config]{"debug":True,"shortcodes":{"choose_delimiter":"*"}}[/config]
-```
-
-```
-[config]./my_custom_settings[/config]
-```
-
-
-
-[conjugate]
-
-Converts the verbs in the content to variety of conjugated forms.
-
-Powered by the [pattern](https://github.com/clips/pattern/wiki/pattern-en) library - see pattern docs for more info.
-
-Supports the optional `tense` argument. Defaults to `present`. Other options include: `infinitive`, `past`, `future`.
-
-Supports the optional `person` argument for perspective. Defaults to `3`. Other options include: `1`, `2` and `none`.
-
-Supports the optional `number` argument. Defaults to `singular`. Also supports `plural`.
-
-Supports the optional `mood` argument. Defaults to `indicative`. Other options include: `imperative`, `conditional` and `subjunctive`.
-
-Supports the optional `aspect` argument. Defaults to `imperfective`. Other options include: `perfective` and `progressive`.
-
-Supports the optional `negated` boolean argument. Defaults to 0.
-
-Supports the optional `parse` boolean argument. Defaults to 1.
-
-Supports the optional `alias` argument, which is a shorthand "preset" for the above settings. Overrides your other arguments. The following aliases are supported: `inf`,`1sg`,`2sg`,`3sg`,`pl`,`part`,`p`,`1sgp`,`2sgp`,`3gp`,`ppl`,`ppart`.
-
-```
-[conjugate tense="past"]She says[/conjugate]
-```
-```
-RESULT: She said
-```
-
-
-
-[do until(str)]
-
-Do-until style loop. The content is processed, then the `until` expression is evaluated - if it's false, the content is processed again. Repeat until `until` is true.
-
-```
-[sets my_var=0]
-[do until="my_var > 5"]
- Print me
- [sets my_var="my_var + 1"]
-[/do]
-```
-
-
-
-[elif]
-
-Shorthand "else if." Equivalent to `[else][if my_var="something"]content[/if][/else]`.
-
-```
-[set my_var]5[/set]
-[if my_var=6]Discard this content[/if]
-[elif my_var=5]Return this content![/elif]
-```
-
-
-
-[else]
-
-Returns content if a previous conditional shortcode (e.g. `[if]` or `[chance]`) failed its check, otherwise discards content.
-
-Supports the `id` kwarg. You can assign `_else_id` as a kwarg of the conditional block to associate it with a particular `[else]` block. Match the `id` to the `_else_id`. This means the two blocks don't have to appear next to each other.
-
-Supports the `debug` parg which will print some diagnostic information to the console.
-
-```
-[if my_var=0]Print something[/if][else]It turns out my_var did not equal 0.[/else]
-```
-
-
-
-[eval]
-
-Parses the content using the simpleeval library, returning the result. Particularly useful for arithmetic.
-
-simpleeval is designed to prevent the security risks of Python's stock `eval` function, however I make no assurances in this regard. If you wish to use Unprompted in a networked environment, do so at your own risk.
-
-```
-[eval]5 + 5[/eval]
-```
-
-
-
-[filelist path(str)]
-
-Returns a delimited string containing the full paths of all files in a given path.
-
-This shortcode is powered by Python's glob module, which means it supports wildcards and other powerful syntax expressions.
-
-Supports the optional `_delimiter` argument which lets you specify the separator between each filepath. It defaults to your config's `syntax.delimiter` value (`|`).
-
-Supports the optional `_basename` parg that causes the shortcode to return filenames instead of full paths.
-
-Supports the optional `_hide_ext` parg that causes the shortcode to trim filename extensions out of the returned string.
-
-Supports the macro `%BASE_DIR%` which will be substituted with an absolute path to the Unprompted extension.
-
-```
-[filelist "C:/my_pictures/*.*"]
-```
-
-
-
-[filter_tags]
-
-Prepare a list of tags which will be evaluated against subsequent `[tags]` blocks. The content of `[tags]` is bypassed if it does not match your filters.
-
-Supports the `_extend` parg to add to the existing list of filters instead of replacing it.
-
-Supports the `_clear` parg to clear all filter rules after the first matching `[tags]` block.
-
-Supports the `_once` parg to remove an individual tag from the filter after the first match.
-
-Supports the `_must_match` kwarg that determines the behavior of the filter when using multiple tags:
-
-- `any` (default): The `[tags]` block must contain at least one matching parg or kwarg.
-- `all`: The `[tags]` block must contain all matching pargs and kwargs.
-- `selective`: The `[tags]` block must contain the same pargs. It does **not** have to contain the same kwargs, but if it does, the kwarg values must match.
-
-Supports `Config.syntax.not_operator` to exclude tags from the filter. For example, if you want to exclude all blocks with the "outdoors" tag, you can do it like this: `[filter_tags !outdoors]`.
-
-For kwarg tags, the not operator can be used with keys or values as shown:
-
-- `[filter_tags !location="indoors"]` will exclude all blocks that contain a kwarg with the `location` key
-- `[filter_tags location="!indoors"]` will exclude all blocks that contain a `location` kwarg with a value of `indoors`
-
-Supports the `_debug` parg to print some diagnostic information to the console.
-
-You can clear the filter at any time by calling `[filter_tags]` without any arguments.
-
-```
-[filter_tags location="outdoors"]
-[tags location="indoors"]This will not print[/tags]
-[tags location="outdoors"]This will print[/tags]
-```
-
-
-
-[for var "test var" "update var"]
-
-Returns the content an arbitrary number of times until the `test` condition returns false.
-
-Importantly, the `test` and `update` arguments must be enclosed in quotes because they are parsed as advanced expressions.
-
-`var` is initialized as a user variable and can be accessed as normal, e.g. `[get var]` is valid.
-
-The result of the `update` argument is set as the value of `var` at the end of each loop step.
-
-```
-[for i=0 "i<10" "i+1"]
-Current value of i: [get i]
-[/for]
-```
-
-
-
-[function]
-
-Allows you to declare your own named function (arbitrary code) and execute it with `[call]`.
-
-The first parg is the name of your function, e.g. `[function my_method]` can be referenced later with `[call my_method]`.
-
-Supports the `_const` parg which marks your function as a constant function. By including this argument, another script will not be able to initialize a function by the same name.
-
-Supports "default arguments" by way of arbitrary pargs and kwargs:
-
-- Parg example: `[function my_method my_parg]` will set the user variable `my_parg` to 1 when you `[call my_method]`.
-- Kwarg example: `[function my_method my_kwarg=apple]` will set the user variable `my_kwarg` to `apple` when you `[call my_method]`.
-
-Supports the `_required` kwarg which lets you specify one or more variable names delimited by `Unprompted.Config.syntax.delimiter`. If any are not set, the function will be bypassed.
-
-```
-[function my_method]
-A picture of [random 10] houses.
-[/function]
-
-[call my_method]
-```
-```
-POSSIBLE RESULT:
-A picture of 5 houses.
-```
-
-
-
-[get variable]
-
-Returns the value of `variable`.
-
-Supports variable parsing with the optional `_var` argument, e.g. `[get _var="somevar"]`.
-
-You can add `_before` and `_after` content to your variable. This is particularly useful for enclosing the variable in escaped brackets, e.g. `[get my_var _before=[ _after=]]` will print `[value of my_var]`.
-
-Supports the optional `_default` argument, the value of which is returned if your variable does not exist e.g. `[get car_color _default="red"]`.
-
-Supports returning multiple variables, e.g. `[get var_a var_b]` will return the values of two variables separated by a comma and space.
-
-You can change the default separator with `_sep`.
-
-Supports the `_external` kwarg to retrieve variable(s) from an external .json file. If the file does not exist, it will be created for you. Please be aware that using `_external` will take precedence over the variable(s) currently stored in your `shortcode_user_vars` dictionary. Also, the external variable will be written to `shortcode_user_vars`.
-
-Supports the `_all_external` kwarg to retrieve all variables from an external .json file. Every key-value pair in the file will be stored to your `shortcode_user_vars` dictionary.
-
-Supports the `_escape` parg to remove square brackets from the returned value. This is useful for when you want to use the result of `[get]` as a shortcode argument.
-
-Supports the `_parse` parg to parse any shortcodes inside the returned value. This is useful when used in conjunction with `[set _defer]`. Note that global variables are parsed automatically. After parsing, the result is stored to the variable.
-
-Supports the `_read_only` parg which is used in conjunction with `_parse` to prevent the variable from being overwritten by the parsed result.
-
-```
-My name is [get name]
-```
-
-
-
-[gpt]
-
-Processes the content with a given GPT-2 model. This is similar to the "Magic Prompts" feature of Dynamic Prompts, if you're familiar with that.
-
-This shortcode requires the "transformers" package which is included with the WebUI by default, but you may need to install the package manually if you're using Unprompted as a standalone program.
-
-You can leave the content blank for a completely randomized prompt.
-
-Supports the `model` kwarg which can accept a pretrained model identifier from the HuggingFace hub. Defaults to `LykosAI/GPT-Prompt-Expansion-Fooocus-v2`. The first time you use a new model, it will be downloaded to the `unprompted/models/gpt` folder.
-
-Please see the Wizard UI for a list of suggested models.
-
-Supports the `task` kwarg which determines behavior of the transformers pipeline module. Defaults to `text-generation`. You can set this to `summarization` if you want to shorten your prompts a la Midjourney.
-
-Supports the `instruction` kwarg which is a string to be prepended to the prompt. This text will be excluded from the final result. Example: `[gpt instruction="Generate a list of animals"]cat,[/gpt]` may return `cat, dog, bird, horse, cow`.
-
-Supports the `max_length` kwarg which is the maximum number of words to be returned by the shortcode. Defaults to 50.
-
-Supports the `min_length` kwarg which is the minimum number of words to be returned by the shortcode. Defaults to 1.
-
-Supports the `prefix` and `affix` kwargs to include custom strings in the returned result.
-
-Supports the `tokenizer` kwarg to load a separate model as the tokenizer.
-
-Supports the `transformers_class` to specify the methods of inference, defaults to `auto`. Also supports `t5`.
-
-Supports the `unload` parg to prevent keeping the model and tokenizer in memory between runs.
-
-
-
-
-[if variable {_not} {_any} {_is}]
-
-Checks whether `variable` is equal to the given value, returning the content if true, otherwise discarding the content.
-
-Supports the testing of multiple variables, e.g. `[if var_a=1 var_b=50 var_c="something"]`. If one or more variables return false, the content is discarded.
-
-The optional `_any` argument allows you to return the content if one of many variables return true. This is the equivalent of running "or" instead of "and" in programming, e.g. `[if _any var_a=1 var_b=50]`.
-
-The optional `_not` argument allows you to test for false instead of true, e.g. `[if _not my_variable=1]` will return the content if `my_variable` does *not* equal 1.
-
-The optional `_is` argument allows you to specify the comparison logic for your arguments. Defaults to `==`, which simply checks for equality. Other options include `!=`, `>`, `>=`, `<` and `<=`. Example: `[if my_var="5" _is="<="]`
-
-Supports [advanced expressions](#advanced-expressions) - useful for testing complex conditions.
-
-```
-[if subject="man"]wearing a business suit[/if]
-```
-
-```
-(Advanced expression demo)
-[if "subject is 'man' or subject is 'woman'"]wearing a shirt[/if]
-```
-
-
-
-[hypernyms]
-
-Replaces the content with one or more random hypernyms. This shortcode is powered by WordNet.
-
-The optional `max` argument allows you to specify the maximum number of hypernyms to return. Defaults to -1, which returns all hypernyms. The hypernyms list is delimited by `Unprompted.Config.syntax.delimiter`.
-
-```
-[hypernyms max=1]dog[/hypernyms]
-```
-
-```
-Possible result: animal
-```
-
-
-
-[hyponyms]
-
-Replaces the content with one or more random hyponyms. This shortcode is powered by WordNet.
-
-The optional `max` argument allows you to specify the maximum number of hyponyms to return. Defaults to -1, which returns all hyponyms. The hyponyms list is delimited by `Unprompted.Config.syntax.delimiter`.
-
-```
-[hyponyms]animal[/hyponyms]
-```
-
-```
-Possible results: dog, cat, bird, ...
-```
-
-
-
-[image_info]
-
-Returns various types of metadata about the image, including quality assessment via the pyiqa toolbox.
-
-Supports the `file` kwarg which is the path to the image file. It can also take a PIL Image object. If not specified, this shortcode will analyze the current SD image.
-
-Supports the `width` parg for retrieving the width of the image in pixels.
-
-Supports the `height` parg for retrieving the height of the image in pixels.
-
-Supports the `aspect_ratio` parg for retrieving the aspect ratio of the image (`width` / `height`).
-
-Supports the `filename` parg which is the base name of the image file.
-
-Supports the `filetype` parg which is the file extension of the image file.
-
-Supports the `filesize` parg which is the size of the image file in bytes.
-
-Supports the `iqa` kwarg which is an image quality assessment metric to process the image with. Please refer to the [pyiqa docs](https://github.com/chaofengc/IQA-PyTorch) for a list of supported metrics. I like `laion_aes` for calculating an aesthetic score.
-
-Supports the `pixel_count` parg which is the total number of pixels in the image.
-
-Supports the `unload_metrics` parg which will unload the pyiqa metrics from memory after the shortcode is processed.
-
-```
-[image_info file="a:/inbox/somanypixels.png" pixel_count]
-```
-
-
-
-[info]
-
-Prints metadata about the content. You must pass the type(s) of data as positional arguments.
-
-Supports `character_count` for retrieving the number of individual characters in the content.
-
-Supports `word_count` for retrieving the number of words in the content, using space as a delimiter.
-
-Supports `sentence_count` for retrieving the number of sentences in the content. Powered by the nltk library.
-
-Supports `filename` for retreiving the base name of a file from the filepath content. For example, if the content is `C:/pictures/delicious hamburger.png` then this will return `delicious hamburger`.
-
-Supports `string_count` for retrieving the number of a custom substring in the content. For example, `[info string_count="the"]the frog and the dog and the log[/info]` will return 3.
-
-Supports `clip_count` for retrieving the number of CLIP tokens in the content (i.e. a metric for prompt complexity.) This argument is only supported within the A1111 WebUI environment.
-
-```
-[info word_count]A photo of Emma Watson.[/info]
-```
-```
-Result: 5
-```
-
-
-
-[length]
-
-Returns the number of items in a delimited string or `[array]` variable.
-
-Supports the optional `_delimiter` argument which lets you specify the separator between each item. It defaults to your config's `syntax.delimiter` value (`|`).
-
-Supports the optional `_max` argument which caps the value returned by this shortcode. Defaults to -1, which is "no cap."
-
-```
-[length "item one|item two|item three"]
-```
-```
-Result: 3
-```
-
-
-
-[log]
-
-Prints a message to the console.
-
-By default, the message context is `DEBUG`. The first positional argument determines the context.
-
-```
-[log ERROR]The value of [get some_variable] is wrong![/log]
-```
-
-
-
-[logs]
-
-Prints one or more messages to the console. This is the atomic version of `[log]`.
-
-By default, the message context is `INFO`. You can change this with the optional `_level` argument.
-
-Each parg is a message to be printed. You should enclose your message in quotes if it contains spaces.
-
-```
-[logs "This is a message" "This is another message" _level="INFO"]
-```
-
-
-
-[max]
-
-Returns the greatest value among the arguments. Supports advanced expressions.
-
-```
-[sets var_a=2 var_b=500]
-[max var_b var_a "100+2" "37"]
-```
-```
-Result: 500
-```
-
-
-
-[min]
-
-Returns the smallest value among the arguments. Supports advanced expressions.
-
-```
-[sets var_a=2 var_b=500]
-[min var_b var_a "100+2" "37"]
-```
-```
-Result: 2
-```
-
-
-
-[override variable]
-
-Forces`variable` to equal the value of the content when attempting to set it.
-
-In the example below, `my_variable` will equal "panda" after running the `[set]` shortcode.
-
-```
-[override my_variable]panda[/override][set my_variable]fox[/set]
-```
-
-
-
-[overrides variable_a variable_b]
-
-Forces `variable_a` and `variable_b` to equal the given values when attempting to `[set]` it.
-
-Supports multiple variables.
-
-In the example below, `my_variable` will equal "panda" after running the `[set]` shortcode.
-
-```
-[override my_variable="panda"][set my_variable]fox[/set]
-```
-
-
-
-[pluralize]
-
-Returns the content in its plural form. Powered by the [pattern](https://github.com/clips/pattern/wiki/pattern-en) library - see pattern docs for more info.
-
-Supports the optional `pos` argument. This is the target position of speech and defaults to "noun." In some rare cases, you may want to switch this to "adjective."
-
-```
-[pluralize]child[/pluralize]
-```
-```
-RESULT: children
-```
-
-
-
-[random {_min} {_max} {_float}]
-
-Returns a random integer between 0 and the given integer, e.g. `[random 2]` will return 0, 1, or 2.
-
-You can specify the lower and upper boundaries of the range with `_min` and `_max`, e.g. `[random _min=5 _max=10]`.
-
-If you pass `_float` into this shortcode, it will support decimal numbers instead of integers.
-
-```
-[set restore_pic][random 1][/set]
-```
-
-
-
-[repeat times(int) {_sep}]
-
-Processes and returns the content a number of `times`.
-
-Supports the optional `_sep` argument which is a string delimiter inserted after each output, excluding the final output. Example: `[repeat 3 _sep="|"]content[/repeat]` will return `content|content|content`.
-
-Supports float values as well. For example, `[repeat 4.2]content[/repeat]` will have a 20% chance to return `content` 5 times instead of 4.
-
-```
-[set my_var]0[/set]
-[repeat 5]
-Variable is currently: [set my_var _out _append]1[/set]
-[/repeat]
-```
-
-
-
-[replace]
-
-Updates the content using argument pairings as replacement logic.
-
-Arguments are case-sensitive.
-
-Supports the optional `_from` and `_to` arguments, which can process secondary shortcode tags as replacement targets, e.g. `[replace _from="{get var_a}" _to="{get var_b}"]`. These arguments also support delimited values with `Unprompted.Config.syntax.delimiter`.
-
-Supports the optional `_count` argument which limits the number of occurances to replace. For example, `[replace the="a" _count=1]the frog and the dog and the log[/replace]` will return `a frog and the dog and the log`.
-
-Supports the optional `_insensitive` parg to enable case-insensitive search-and-replace.
-
-Supports the optional `_load` kwarg for importing from:to replacement directions from one or more external JSON files.
-
-```
-[replace red="purple" flowers="marbles"]
-A photo of red flowers.
-[/replace]
-```
-```
-Result: A photo of purple marbles.
-```
-
-
-
-[resize]
-
-Resizes an image to the given dimensions, works with the SD image by default.
-
-The first parg is the path to your `image`. It can also take a PIL Image object.
-
-Supports the `save_out` parg which is the path to save the resized image to. If you do not specify this, the new image will overwrite the original.
-
-Supports `width` and `height` kwargs which are the new dimensions of the image.
-
-Supports the `unit` kwarg which is the unit of measurement for the `width` and `height` kwargs. Options include `px` and `%`. Defaults to `px`.
-
-Supports the `technique` kwarg which is the method of resizing. Options include `scale` and `crop`. Defaults to `scale`.
-
-Supports the `resample_method` kwarg which is the method of resampling when using the `scale` technique. Options include `Nearest Neighbor`, `Box`, `Bilinear`, `Hamming`, `Bicubic`, and `Lanczos`. Defaults to `Lanczos`.
-
-Supports the `origin` kwarg which is the anchor point of the image when using the `crop` technique. Options include `top_left`, `top_center`, `top_right`, `middle_left`, `middle_center`, `middle_right`, `bottom_left`, `bottom_center`, and `bottom_right`. Defaults to `middle_center`.
-
-Supports the `keep_ratio` parg which will preserve the aspect ratio of the image. Note that if you specify both `width` and `height`, it will take precedence over `keep_ratio`.
-
-Supports the `min_width` and `min_height` kwargs which can be used to set a minimum size for the image. This is applied after the `keep_ratio` parg. If the image is smaller than the minimum, it will be scaled up to the minimum.
-
-```
-[resize "a:/inbox/picture.png" width=350]
-```
-
-
-
-[round {_place}]
-
-Allows you to round the first parg to a certain level of precision.
-
-Supports the optional `_place` int kwarg which determines the level of precision. Defaults to 0.
-
-Supports the optional `_up` parg which will round the number up (ceiling function) instead of normal rounding.
-
-Supports the optional `_down` parg which will round the number down (flooring function) instead of normal rounding.
-
-Supports rounding of both integer and float values.
-
-```
-Float example...
-[round 1.345 _place=1]
-```
-```
-RESULT: 1.3
-```
-```
-Integer example...
-[round 1678 _place=1]
-```
-```
-RESULT: 1680
-```
-
-
-
-[set {_append} {_prepend}]
-
-Sets a variable to the given content.
-
-`_append` will instead add the content to the end of the variable's current value, e.g. if `my_var` equals "hello" then `[set my_var _append] world.[/set]` will make it equal "hello world."
-
-`_prepend` will instead add the content to the beginning of the variable's current value.
-
-Supports the optional `_new` parg which will bypass the shortcode if the variable you're trying to `[set]` already exists. For example:
-
-```
-[set my_var]apple[/set]
-[set my_var _new]orange[/set]
-[get my_var]
-```
-
-This example will return `apple`.
-
-Supports the optional `_choices` argument, which is a delimited string of accepted values. The behavior of this argument depends on whether or not the `_new` argument is present:
-
-- If `_new` and the variable exists as a value that is **not** accepted by `_choices`, then `_new` is ignored and this shortcode will run.
-- If **not** `_new` and we're trying to set the variable to a value that is **not** accepted by `_choices`, then the `[set]` block is bypassed.
-- In the Wizard UI for certain kinds of elements, `_choices` is used to populate the element, such as a dropdown menu or radio group.
-
-Supports all Stable Diffusion variables that are exposed via Automatic's Script system, e.g. `[set cfg_scale]5[/set]` will force the CFG Scale to be 5 for the run.
-
-Supports the `_remember` parg that will invoke the `[remember]` shortcode with your variable. See `[remember]` for more information.
-
-Supports the `_external` kwarg to write the variable to an external .json file. If the file does not exist, it will be created for you.
-
-Supports the `_defer` parg to delay the processing of the content until you call the variable with `[get _parse]`.
-
-```
-[set my_var]This is the value of my_var[/set]
-```
-
-
-
-[sets]
-
-The atomic version of `[set]` that allows you to set multiple variables at once.
-
-This shortcode processes your arguments with `[set]` directly, meaning you can take advantage of system arguments supported by `[set]`, such as `_new`.
-
-Supports the optional `_load` kwarg for importing key:value pairs from one or more external JSON files.
-
-```
-[sets var_a=10 var_b=something var_c=500]
-```
-
-
-
-[singularize]
-
-Returns the content in its singular form. Powered by the [pattern](https://github.com/clips/pattern/wiki/pattern-en) library - see pattern docs for more info.
-
-Supports the optional `pos` argument. This is the target position of speech and defaults to "noun." In some rare cases, you may want to switch this to "adjective."
-
-```
-[singularize]children[/singularize]
-```
-```
-RESULT: child
-```
-
-
-
-[substring {start} {end} {step} {unit}]
-
-Returns a slice of the content as determined by the keyword arguments.
-
-`start` is the beginning of the slice, zero indexed. Defaults to 0.
-
-`end` is the last position of the slice. Defaults to 0.
-
-Alternatively, you can pass a string into `start` or `end` and it will find the index of that string within the `content`.
-
-`step` is the skip interval. Defaults to 1 (in other words, a continuous substring.)
-
-`unit` is either `characters` or `words` and refers to the unit of the aforementioned arguments. Defaults to `characters`.
-
-```
-[substring start=1 end=3 unit=words]A photo of a giant dog.[/substring]
-```
-```
-Result: photo of a
-```
-
-
-
-[switch var(str)]
-
-Allows you to run different logic blocks with inner case statements that match the value of the given positional argument.
-
-Both `[switch]` and `[case]` support advanced expressions.
-
-```
-[set my_var]100[/set]
-[switch my_var]
- [case 1]Does not match[/case]
- [case 2]Does not match[/case]
- [case 100]Matches! This content will be returned[/case]
- [case 4]Does not match[/case]
- [case]If no other case matches, this content will be returned by default[/case]
-[/switch]
-```
-
-
-
-[synonyms]
-
-Replaces the content with one or more random synonyms. This shortcode is powered by a combination of WordNet and Moby Thesaurus II. Does not require an online connection after first use (word databases are downloaded to disk.)
-
-The optional `max` argument allows you to specify the maximum number of synonyms to return. Defaults to -1, which returns all synonyms. The synonym list is delimited by `Unprompted.Config.syntax.delimiter`.
-
-The optional `include_self` positional argument determines whether the original content can be returned as a possible result. Defaults to False.
-
-The optional `enable_moby` keyword argument determines whether Moby Thesaurus II will be referenced. Defaults to True. On first use, the Moby Thesaurus will be downloaded to the `lib_unprompted` folder - it is about 24 MB.
-
-The optional `enable_wordnet` keyword argument determines whether WordNet will be referenced. Defaults to True.
-
-```
-[synonyms]amazing[/synonyms]
-```
-
-
-
-[tags]
-
-Assigns arbitrary tags to the content. Supports both parg and kwarg-style tags.
-
-On its own, this shortcode merely returns the content, but it can be used in conjunction with `[filter_tags]` to bypass the content if the tags don't match your filter rules. See `[filter_tags]` for more information.
-
-```
-[tags "tag_one" tag_two="value_two"]A photo of a dog.[/tags]
-```
-
-
-
-[while variable {_not} {_any} {_is}]
-
-Checks whether `variable` is equal to the given value, returning the content repeatedly until the condition is false. This can create an infinite loop if you're not careful.
-
-This shortcode also supports advanced expression syntax, e.g. `[while "some_var >= 5 and another_var < 2"]`. The following arguments are only relevant if you **don't** want to use advanced expressions:
-
-Supports the testing of multiple variables, e.g. `[while var_a=1 var_b=50 var_c="something"]`. If one or more variables return false, the loop ends.
-
-The optional `_any` argument will continue the loop if any of the provided conditions returns true.
-
-The optional `_not` argument allows you to test for false instead of true, e.g. `[while _not my_variable=1]` will continue the loop so long as `my_variable` does *not* equal 1.
-
-The optional `_is` argument allows you to specify the comparison logic for your arguments. Defaults to `==`, which simply checks for equality. Other options include `!=`, `>`, `>=`, `<` and `<=`. Example: `[while my_var="5" _is="<="]`
-
-```
-Advanced expression demo:
-[set my_var]3[/set]
-[while "my_var < 10"]
- Output
- [sets my_var="my_var + 1"]
-[/while]
-```
-
-```
-[set my_var]3[/set]
-[while my_var="10" _is="<"]
- Output
- [sets my_var="my_var + 1"]
-[/while]
-```
-
-
-
-[unset variable]
-
-Removes one or more variables from memory.
-
-Note that variables are automatically deleted at the end of each run - you do **not** need to manually clean memory in most cases. The `[unset]` shortcode is for advanced use.
-
-Supports pattern matching with `*` to delete many variables at once. This may be useful, for example, if you're trying to disable ControlNet inside of an `[after]` block: `[unset cn_* controlnet_*]`.
-
-```
-[set var_a=10 var_b="something"]
-[unset var_a var_b]
-```
-
-
-
-
-Stable Diffusion Shortcodes
-
-This section describes all of the included shortcodes which are specifically designed for use with the A1111 WebUI.
-
-[civitai]
-
-Downloads a file using the [Civitai API](https://github.com/civitai/civitai/wiki/REST-API-Reference#get-apiv1models), adding the result to your prompt with the correct syntax. If the specified file is already on your filesystem, this shortcode will not send a request to Civitai.
-
-All of your kwargs are sent as URL parameters to the API (with the exception of system kwargs beginning with `_`) so please review the documentation linked above for a complete list of valid parameters. For example, `[civitai query="something" user="someuser"]` will pass `query` and `user` to the API.
-
-Supports shorthand syntax with pargs, where the first parg is `types` (e.g. LORA or TextualInversion), the second parg is `query` (model name search terms), the third parg is `_weight` (optional, defaults to 1.0), and the fourth parg (also optional) is the `_file`. For example: `[civitai lora EasyNegative 0.5]`.
-
-The `query` value is used as the filename to look for on your filesystem. You can typically search Civitai for a direct model filename (e.g. `query="kkw-new-neg-v1.4"` will return the 'New Negative' model). However, if this isn't working for whatever reason, you can override the filesystem search with the `_file` kwarg: `[civitai query="New Negative" _file="kkw-new-neg-v1.4"]`.
-
-This shortcode will auto-correct the case-sensitivity of `types` to the API's expected format. The API is a bit inconsistent in this regard (e.g. lora = `LORA`, controlnet = `Controlnet`, aestheticgradient = `AestheticGradient`...) but Unprompted will handle it for you. Here are the other edge cases that Unprompted will catch:
-
-- If types is set to `lora`, it will search for both `LORA` and `LoCon` models
-- Converts `SD` to `Checkpoint`
-- Converts `Embedding` and `TI` to `TextualInversion`
-- Converts `Pose` and `OpenPose` to `Poses`
-- Converts `CN` to `Controlnet`
-
-Supports the `_debug` parg to print diagnostic information to the console.
-
-Supports the `_api` kwarg which is the URL of the API to communicate with. Defaults to `https://civitai.com/api/v1/models`.
-
-Supports the `_timeout` kwarg to cap the wait time on the API request in seconds. Defaults to 60.
-
-Supports the `_id` kwarg to query the API with a specific modelId, eliminating the need for other parameters.
-
-If a file has multiple versions, you can specify the `_mvid` kwarg instead of `_id` to select a specific version.
-
-Supports the `_words` parg which will retrieve the trigger words from Civitai and include them in the prompt. This will also write the words into a companion JSON file as `activation text` for future use.
-
-```
-[civitai lora "HD Helper" 0.5 "hd_helper_v1"]
-```
-
-
-
-[faceswap]
-
-Swaps the face in target image using an arbitrary image.
-
-The first parg is a filepath to the face image you wish to swap in.
-
-Supports the optional `body` kwarg which is an image path to perform the swap on. Defaults to the Stable Diffusion output image. Note that this value will essentially override your SD output, so when using this you should minimize your inference steps (i.e. lower it to 1) for faster execution.
-
-Supports the `pipeline` kwarg which is the faceswap method to use. Options include `insightface`, `ghost`, and `face_fusion`. Defaults to insightface, which results in the best quality. You can chain multiple pipelines together with `Config.syntax.delimiter`.
-
-The `insightface` pipeline is currently the most developed option as it supports several unique features:
-
-- It can process multiple face images (e.g. `[faceswap "C:/pictures/face1.png|C:/pictures/face2.png"]` using `Config.syntax.delimiter` as a separator.)
-- It performs facial similarity analysis to swap the new face onto the best candidate in a picture containing more than one person.
-- It supports the `minimum_similarity` kwarg to bypass the faceswap if no one in the target picture bears resemblance to the new face. This kwarg takes a float value, although I haven't determined the upper and lower boundaries yet. A greater value means "more similar" and the range appears to be something like -10 to 300.
-- It supports the `export_embedding` parg which takes the average of all input faces and exports it to a safetensors embedding file. This file represents a composite face that can be used in lieu of individual images.
-- It supports the `embedding_path` kwarg which is the path to use in conjunction with `export_embedding`. Defaults to `unprompted/user/faces/blended_faces.safetensors`.
-- It supports the `gender_bonus` kwarg to boost facial similarity score when source and target genders are equal.
-- It supports the `age_influence` kwarg to penalize facial similarity score based on the difference of ages between source and target faces.
-
-Supports the `visibility` kwarg which is the alpha value with which to blend the result back into the original image. Defaults to 1.0.
-
-Supports the `unload` kwarg which allows you to free some or all of the faceswap components after inference. Useful for low memory devices, but will increase inference time. You can pass the following as a delimited string with `Config.syntax.delimiter`: `model`, `face`, `all`.
-
-Supports the `prefer_gpu` kwarg to run on the video card whenever possible.
-
-It is recommended to follow this shortcode with `[restore_faces]` in order to improve the resolution of the swapped result. Or, use the included Facelift template as an all-in-one solution.
-
-Additional pipelines may be supported in the future. Attempts were made to implement support for SimSwap, however this proved challenging due to multiple dependency conflicts.
-
-
-
-[restore_faces]
-
-Improves the quality of faces in target image using various models.
-
-Supports `methods` kwarg which takes one or more restoration method names. Defaults to `GPEN`, which is a custom implementation exclusive to Unprompted. It also supports `GFPGAN` and `CodeFormer`. Specify multiple methods with the `Config.syntax.delimiter`.
-
-Supports `visibility` kwarg which is an alpha value between 0 and 1 with which to blend the result back into the original face. Defaults to 1.
-
-Supports the `unload` parg which disables the caching features of this shortcode. Caching improves inference speed at the cost of VRAM.
-
-There are several additional parameters that apply only to GPEN:
-
-Supports `resolution_preset` kwarg that determines which GPEN model to use: 512, 1024, or 2048. Defaults to `512`. Please be aware that higher resolutions may lead to an oversharpened look, which is possible to counteract to an extent by lowering `visibility`.
-
-Supports `downscale_method` which is the interpolation method to use when resizing the restored face for pasting back onto the original image. Options include Nearest Neighbor, Bilinear, Area, Cubic and Lanczos. Defaults to `Area`.
-
-
-
-[file2mask]
-
-Allows you to modify or replace your img2img mask with arbitrary files.
-
-Supports the `mode` argument which determines how the file mask will behave alongside the existing mask:
-- `add` will overlay the two masks. This is the default value.
-- `discard` will scrap the existing mask entirely.
-- `subtract` will remove the file mask region from the existing mask region.
-
-Supports the optional `_show` positional argument which will append the final mask to your generation output window.
-
-```
-Walter White[file2mask "C:/pictures/my_mask.png"]
-```
-
-
-
-[img2img]
-
-Used within the `[after]` block to append an img2img task to your generation.
-
-The image resulting from your main prompt (e.g. the txt2img result) will be used as the initial image for `[img2img]`.
-
-While this shortcode does not take any arguments, most img2img settings can be set in advance. **Does not currently support batch_size or batch_count** - coming soon!
-
-```
-Photo of a cat
-[after]
- [sets prompt="Photo of a dog" denoising_strength=0.75]
- [img2img]
-[/after]
-```
-
-
-
-[img2img_autosize]
-
-Automatically adjusts the width and height parameters in img2img mode based on the proportions of the input image.
-
-Stable Diffusion generates images in sizes divisible by 8 pixels. If your initial image is something like 504x780, this shortcode will set the width and height to 512x768.
-
-Supports the `unit` shortcode which lets you specify the resolution multiplier. Must be divisible by 8. Defaults to 64.
-
-Supports `target_size` which is the minimum possible size of either dimension. Defaults to 512.
-
-Supports `only_full_res` which, if true, will bypass this shortcode unless the "full resolution inpainting" setting is enabled. Defaults to false.
-
-```
-[img2img_autosize] Photo of a cat
-```
-
-
-
-[img2pez]
-
-Performs an advanced CLIP interrogation technique on the initial image known as [Hard Prompts Made Easy](https://github.com/YuxinWenRick/hard-prompts-made-easy).
-
-Be aware that this technique is essentially a training routine and will significantly lengthen your inference time, at least on the default settings. On a Geforce 3090, it appears to take around 1-2 minutes.
-
-By default, this shortcode is only compatible with SD 1.5 models. If you wish to use it with SD 2.1 or Midjourney, please set `clip_model` to `ViT-H-14` and `clip_pretrain` to `laion2b_s32b_b79k`. It does work surprisingly well with Midjourney.
-
-Supports the optional `image_path` argument. This is a path to file(s) or a directory to use as the initial image. If not provided, it will default to the initial image in your img2img tab. Note: you can supply multiple paths delimited by `Unprompted.Config.syntax.delimiter`, and img2pez will optimize a single prompt across all provided images.
-
-Supports the optional `prompt_length` argument, which is the length of the resulting prompt in tokens. Default to 16.
-
-Supports the optional `iterations` argument, which is the total number of training steps to perform. Defaults to 200.
-
-Supports the optional `learning_rate` argument. Defaults to 0.1.
-
-Supports the optional `weight_decay` argument. Defaults to 0.1.
-
-Supports the amusingly-named `prompt_bs` argument, which is described by the technique's authors as "number of intializations." Defaults to 1.
-
-Supports the optional `clip_model` argument. Defaults to ViT-L-14.
-
-Supports the optional `pretrain_clip` argument. Defaults to openai.
-
-Supports the optional `free_memory` argument which attempts to free the CLIP model from memory as soon as the img2pez operation is finished. This isn't recommended unless you are running into OOM issues.
-
-
-
-[init_image path(str)]
-
-Loads an image from the given `path` and sets it as the initial image for use with img2img.
-
-Note that `path` must be an absolute path, including the file extension.
-
-If the given `path` ends with the `*` wildcard, `[init_image]` will choose a random file in that directory.
-
-**Important:** At the moment, you still have to select an image in the WebUI before pressing Generate, or this shortcode will throw an error. You can select any image - it doesn't matter what it is, just as long as the field isn't empty.
-
-```
-[init_image "C:/pictures/my_image.png"]
-```
-
-
-
-[invert_mask]
-
-Inverts the mask. Great in combination with `[txt2mask]` and `[instance2mask]`. Simply put the tag `[invert_mask]`.
-
-Currently lacks batch support.
-
-```
-[txt2mask]person[/txt2mask][invert_mask]
-```
-
-
-
-[instance2mask]
-
-Uses Mask R-CNN (an instance segmentation model) to predict instances. The found instances are mask. Different from `[txt2mask]` as it allows to run the inpainting for each found instance individually. This is useful, when using high resolution inpainting. This shortcode only works in the img2img tab of the A1111 WebUI.
-**Important:** If per_instance is used it is assumed to be the last operator changing the mask.
-
-The supported classes of instances are:
-- `person`
-- `bicycle`
-- `car`
-- `motorcycle`
-- `airplane`
-- `bus`
-- `train`
-- `truck`
-- `boat`
-- `traffic light`
-- `fire hydrant`
-- `stop sign`
-- `parking meter`
-- `bench`
-- `bird`
-- `cat`
-- `dog`
-- `horse`
-- `sheep`
-- `cow`
-- `elephant`
-- `bear`
-- `zebra`
-- `giraffe`
-- `backpack`
-- `umbrella`
-- `handbag`
-- `tie`
-- `suitcase`
-- `frisbee`
-- `skis`
-- `snowboard`
-- `sports ball`
-- `kite`
-- `baseball bat`
-- `baseball glove`
-- `skateboard`
-- `surfboard`
-- `tennis racket`
-- `bottle`
-- `wine glass`
-- `cup`
-- `fork`
-- `knife`
-- `spoon`
-- `bowl`
-- `banana`
-- `apple`
-- `sandwich`
-- `orange`
-- `broccoli`
-- `carrot`
-- `hot dog`
-- `pizza`
-- `donut`
-- `cake`
-- `chair`
-- `couch`
-- `potted plant`
-- `bed`
-- `dining table`
-- `toilet`
-- `tv`
-- `laptop`
-- `mouse`
-- `remote`
-- `keyboard`
-- `cell phone`
-- `microwave`
-- `oven`
-- `toaster`
-- `sink`
-- `refrigerator`
-- `book`
-- `clock`
-- `vase`
-- `scissors`
-- `teddy bear`
-- `hair drier`
-- `toothbrush`
-
-Supports the `mode` argument which determines how the text mask will behave alongside a brush mask:
-- `add` will overlay the two masks. This is the default value.
-- `discard` will ignore the brush mask entirely.
-- `subtract` will remove the brush mask region from the text mask region.
-- `refine` will limit the inital mask to the selected instances.
-
-Supports the optional `mask_precision` argument which determines the confidence of the instance mask. Default is 0.5, max value is 1.0. Lowering this value means you may select more than you intend per instance (instances may overlap).
-
-Supports the optional `instance_precision` argument which determines the classification thresshold for instances to be masked. Reduce this, if instances are not detected successfully. Default is 0.85, max value is 1.0. Lowering this value can lead to wrongly classied areas.
-
-Supports the optional `padding` argument which increases the radius of the instance masks by a given number of pixels.
-
-Supports the optional `smoothing` argument which refines the boundaries of the mask, allowing you to create a smoother selection. Default is 0. Try a value of 20 or greater if you find that your masks are blocky.
-
-Supports the optional `select` argument which defines how many instances to mask. Default value is 0, which means all instances.
-
-Supports the optional `select_mode` argument which specifies which instances are selected:
-- `overlap` will select the instances starting with the instance that has the greatest absolute brushed mask in it.
-- `overlap relative` behaves similar to `overlap` but normalizes the areas by the size of the instance.
-- `greatest area` will select the greatest instances by pixels first.
-- `random` will select instances in a random order
-Defaults to `overlap`.
-
-Supports the optional `show` positional argument which will append the final masks to your generation output window and for debug purposes a combined instance segmentation image.
-
-Supports the optional `per_instance` positional argument which will render and append the selected masks individually. Leading to better results if full resolution inpainting is used.
-
-```
-[instance2mask]clock[/txt2mask]
-```
-
-
-
-[interrogate]
-
-Generates a caption for the given image using one of several techniques.
-
-Supports the `image` kwarg which is the path to the image you wish to interrogate. Defaults to the Stable Diffusion input/output image.
-
-Supports the `method` kwarg which is the interrogation technique to use. Defaults to `CLIP`, which relies on the WebUI's stock methods for completing the task. Other options include `BLIP-2` and `CLIPxGPT`, both of which will download a large checkpoint upon first use.
-
-Supports the `model` kwarg which is the model to use for the interrogation. For BLIP-2, this can be a Hugging Face string, e.g. `Salesforce/blip2-opt-2.7b`.
-
-Supports the `context` kwarg which is a starting prompt to supply to the model. At the moment, this is only compatible BLIP-2. This can help shape its response.
-
-Supports the `question` kwarg which is the question to ask the model. At the moment, this is only compatible with BLIP-2. This overrides `context`.
-
-Supports the `max_tokens` kwarg which is the maximum number of tokens the model can produce for its response. At the moment, this is only compatible with BLIP-2. Defaults to 50.
-
-
-
-[remember]
-
-Allows you to keep one or more variables in memory for the duration of a batch run (i.e. runs where `batch_count` > 1). This overrides Unprompted's default behavior of completely resetting the `shortcode_user_vars` object after each image.
-
-Here is a practical example:
-
-Let's say you have a template where you want to pass different values to `[zoom_enhance]` that correspond to the `batch_index` of the run.
-
-To do this, we can create an `[array]` and append a new value to it each step of the run. We will mark the array with `[remember]` and tell `[zoom_enhance]` to look up the `batch_index` position of the array.
-
-
-```
-[array zoom_replacements _append="{get subject}"]
-[if batch_index=0]
- [remember zoom_replacements]
- [after][zoom_enhance replacement="{array zoom_replacements batch_index}" negative_replacement="worst quality"][/after]
-[/if]
-```
-```
-[remember var_a var_b]
-```
-
-
-
-[seed]
-
-Allows you to run the `random.seed()` method at will.
-
-It is a more comprehensive operation than `[set seed]`, as it will update several seed-related variables used by the WebUI, including `seed`, `all_seeds` and `seeds`.
-
-The first parg determines the new seed value. If not provided, it will default to the value of `seed` user variable.
-
-```
-[seed 100]
-```
-
-
-
-[txt2img]
-
-Runs a txt2img task inside of an `[after]` block.
-
-The txt2img settings are determined by your user variables. In the following example, we explicitly update the CFG scale and prompt for the task:
-
-```
-[after][sets cfg_scale=15 prompt="horse"][txt2img][/after]original prompt goes here
-```
-
-
-
-[txt2mask]
-
-A port of [the script](https://github.com/ThereforeGames/txt2mask) by the same name, `[txt2mask]` allows you to create a region for inpainting based only on the text content (as opposed to the brush tool.) This shortcode only works in the img2img tab of the A1111 WebUI.
-
-Supports the `method` argument which determines the technology to use for masking. Defaults to `clipseg`. Can be changed to `fastsam` or `clip_surgery`, both of which utilize [Segment Anything](https://segment-anything.com/) instead. Although SAM technology is newer, my testing has shown that `clipseg` is still the most accurate method by far.
-
-Supports the `mode` argument which determines how the text mask will behave alongside a brush mask:
-- `add` will overlay the two masks. This is the default value.
-- `discard` will ignore the brush mask entirely.
-- `subtract` will remove the brush mask region from the text mask region.
-
-Supports the optional `precision` argument which determines the confidence of the mask. Default is 100, max value is 255. Lowering this value means you may select more than you intend.
-
-Supports the optional `padding` argument which increases the radius of your selection by a given number of pixels.
-
-Supports the optional `smoothing` argument which refines the boundaries of the mask, allowing you to create a smoother selection. Default is 20. Try increasing this value if you find that your masks are looking blocky.
-
-Supports the optional `size_var` argument which will cause the shortcode to calculate the region occupied by your mask selection as a percentage of the total canvas. That value is stored into the variable you specify. For example: `[txt2mask size_var=test]face[/txt2mask]` if "face" takes up 40% of the canvas, then the `test` variable will become 0.4.
-
-Supports the `aspect_var` kwarg which is the name of a variable to store the aspect ratio of the mask. For example, if the mask is 512x768, the variable will become `0.667`.
-
-Supports the optional `negative_mask` argument which will subtract areas from the content mask.
-
-Supports the optional `neg_precision` argument which determines the confidence of the negative mask. Default is 100, the valid range is 1 to 255. Lowering this value means you may select more than you intend.
-
-Supports the optional `neg_padding` which is the same as `padding` but for the negative prompts.
-
-Supports the optional `neg_smoothing` which is the same as `smoothing` but for the negative prompts.
-
-Supports the optional `sketch_color` argument which enables support for "Inpaint Sketch" mode. Using this argument will force "Inpaint Sketch" mode regardless of which img2img tab you are on. The `sketch_color` value can either be a preset color string, e.g. `sketch_color="tan"` ([full list of color strings available here](https://github.com/python-pillow/Pillow/blob/12028c9789c3c6ac15eb147a092bfc463ebbc398/src/PIL/ImageColor.py#L163)) or an RGB tuple, e.g. `sketch_color="127,127,127"`. Currently, txt2mask only supports single-color masks.
-
-Supports the optional `sketch_alpha` argument, which should be paired with `sketch_color`. The `sketch_alpha` value is the level of mask transparency, from 0 (invisible) to 255 (fully opaque.)
-
-Due to a limitation in the A1111 WebUI at the time of writing, the `sketch_alpha` parameter is **not** the same as the "mask transparency" option in the UI. "Mask transparency" is not stored in the `p` object as far as I can tell, so txt2mask implements its own custom solution.
-
-Supports the optional `save` argument which will output the final mask as a PNG image to the given filepath.
-
-Supports the optional `show` positional argument which will append the final mask to your generation output window.
-
-Supports the optional `legacy_weights` positional argument which will utilize the original CLIPseg weights. By default, `[txt2mask]` will use the [refined weights](https://github.com/timojl/clipseg#new-fine-grained-weights).
-
-Supports the `unload_model` argument, which will unload the masking model after processing. On my GTX 3090, this adds about 3 seconds to inference time (using the clipseg model). Defaults to `False`, and should only be enabled on devices with low memory.
-
-The content and `negative_mask` both support the vertical pipe delimiter (`|`) which allows you to specify multiple subjects for masking.
-
-Supports the optional `stamp` kwarg that pastes a temporary PNG onto the init image before running mask processing, useful for redacting a portion of the image for example. The value of `stamp` is the name of a file in `images/stamps` without extension.
-
-Supports the optional `stamp_method` kwarg to choose the sizing and positioning of stamp logic. Valid options are `stretch` and `center`.
-
-Supports the optional `stamp_x` and `stamp_y` kwargs for precise positioning of the stamp. Both default to 0.
-
-Supports the optional `stamp_blur` parg which is the pixel radius of the stamp's gaussian blur filter. Defaults to 0, which disables the filter altogether.
-
-```
-[txt2mask]head and shoulders[/txt2mask]Walter White
-```
-
-
-
-[upscale]
-
-Enhances a given image using one or more of the upscaler methods available in the A1111 WebUI.
-
-Supports the `image` kwarg which is the path to the image you wish to enhance. Defaults to the Stable Diffusion output image.
-
-Supports the `models` kwarg which is a delimited list of upscaler model names to use.
-
-Supports the `scale` kwarg which is the scale factor to use. Defaults to 1.
-
-Supports the `visibility` kwarg which is the alpha value to use when blending the result back into the original image. Defaults to 1.
-
-Supports the `keep_res` parg which will maintain the original resolution of the image.
-
-
-
-[zoom_enhance]
-
-Upscales a selected portion of an image via `[img2img]` and `[txt2mask]`, then pastes it seamlessly back onto the original.
-
-Greatly improves low-resolution details like faces and hands. It is significantly faster than Hires Fix and more flexible than the "Restore Faces" option.
-
-Supports the `_alt` parg which engages alternate processing. May help those who are having trouble with the shortcode, but is perhaps not fully compatible with ControlNet.
-
-Supports the `mask` keyword argument which is a region to search for within your image. Defaults to `face`. Note that if multiple non-contiguous regions are found, they will be processed independently.
-
-Supports the `replacement` keyword argument which is the prompt that will be used on the `mask` region via `[img2img]`. Defaults to `face`. If you're generating a specific character--say Walter White--you'll want to set `replacement` to a more specific value, like `walter white face`.
-
-Supports the `negative_replacement` keyword argument, which is the negative prompt that will be used on the mask region via `[img2img]`. Defaults to an empty string.
-
-Both `replacement` and `negative_replacement` support multiple, delimited search terms via `Unprompted.config.syntax.delimiter`.
-
-Supports the `inherit_negative` parg, which copies your main negative prompt to the `[img2img]` replacement task. If used in conjunction with `negative_replacement`, the replacement negative becomes: `main_negative_prompt negative_replacement_value`. If you have multiple, delimited `negative_replacement` values, your main negative prompt will be preprended to all of them.
-
-Supports the `background_mode` parg which will invert the class mask and disable the zoom_enhance step. In other words, you can use this when you want to replace the background instead of the subject. When using this mode, you will likely need to increase `mask_precision` to ~150 or so.
-
-Supports `mask_sort_method` which is used when multiple, non-contiguous masks are detected. Defaults to `left-to-right`. Options include: `left-to-right`, `right-to-left`, `top-to-bottom`, `bottom-to-top`, `big-to-small`, `small-to-big`, `unsorted`.
-
-Supports the `mode` keyword argument, which determines how the shortcode will interact with a pre-existing image mask. Defaults to `subtract`, which will remove your masked pixels from the shortcode's calculations. Options include: `add`, `subtract`, `discard`.
-
-Supports the `bypass_adaptive_hires` positional argument. By default, the shortcode will scale up some inference settings such as CFG scale and sharpness depending on the resolution of the init image. Include this argument to disable that behavior.
-
-Supports the `hires_size_max` keyword argument which is a hard limit on the size of the upscaled image, in order to avoid OOM errors. Defaults to 1024.
-
-Supports the `blur_size` keyword argument, which corresponds to the radius of the gaussian blur that will be applied to the mask of the upscaled image - this helps it blend seamlessly back into your original image. Defaults to `0.03`. Note: this is a float that is a percentage of the total canvas size; 0.03 means 3% of the total canvas.
-
-Supports the `sharpen_amount` argument, which is a float that determines the strength of the unsharp filter that is applied in post-processing.
-
-Supports the `denoising_max` keyword argument. The `[zoom_enhance]` shortcode is equipped with **dynamic denoising strength** based on a simple idea: the smaller the mask region, the higher denoise we should apply. This argument lets you set the upper limit of that feature.
-
-Supports the `mask_size_max` keyword argument. Defaults to `0.5`. If a mask region is determined to be greater than this value, it will not be processed by `[zoom_enhance]`. The reason is that large objects generally do not benefit from upscaling.
-
-Supports the `min_area` keyword argument. Defaults to `50`. If the pixel area of a mask is smaller than this, it may be a false-positive mask selection or at least not worth upscaling.
-
-Supports the `contour_padding` keyword argument. This is the radius in pixels to extend the mask region by. Defaults to `0`.
-
-Supports the `upscale_width` and `upscale_height` arguments. This is the resolution to use with `[img2img]` and should usually match the native resolution of your Stable Diffusion model. Defaults to `512` unless an SDXL model is loaded, in which case it defaults to `1024`.
-
-Supports the `include_original` positional argument. This will append the original, "non-zoom-enhanced" image to your output window. Useful for before-after comparisons.
-
-Supports the `upscale_method` and `downscale_method` arguments which determine the algorithms for image rescaling. Upscale defaults to `Nearest Neighbor`. Downscale defaults to `Lanczos`. Options include: `Nearest Neighbor`, `Box`, `Bilinear`, `Hamming`, `Bicubic`, `Lanczos`.
-
-Supports the `color_correction_method` argument which will attempt to match the color grading of the upscaled image to the original. Defaults to `none`. Options include: `none`,`mvgd`,`mkl`,`hm-mvgd-hm`,`hm-mkl-hm`.
-
-Supports the `color_correct_strength` argument which is an integer that determines how many times to run the color correction algorithm. Defaults to 1.
-
-Supports the `color_correct_timing` argument which determines when to run the color correction algorithm. Defaults to `pre`, which will run color correction before upscaling. Options include `pre` and `post`.
-
-Supports the `controlnet_preset` kwarg which is the name of a file in `templates/presets/controlnet` containing instructions for loading one more ControlNet units.
-
-Supports the experimental `use_starting_face` parg which will upscale the initial image's face as opposed to the resulting img2img's face. (Irrelevant in txt2img mode.)
-
-Supports the `debug` positional argument, which will output a series of images to your WebUI folder over the course of processing.
-
-Supports the `no_sync` parg which will prevent synchronization between your user variables and Stable Diffusion's `p` object at runtime. This may improve compatibility with other shortcodes or extensions.
-
-```
-[after][zoom_enhance][/after]
-```
-
-
-
-
-
-Legacy Shortcodes
-
-Legacy shortcodes are those which are no longer officially supported. Please be aware that they may not work as expected and could be removed from future versions of Unprompted without warning.
-
-[controlnet]
-
-**Reason for legacy status:** The popular [ControlNet extension by Mikubill](https://github.com/Mikubill/sd-webui-controlnet) was released less than 24 hours after this shortcode and is much more robust. ControlNet is a complicated, time-consuming feature to support and I cannot justify further development when the alternative software is already so good.
-
-Enables support for [ControlNet](https://github.com/lllyasviel/ControlNet) models in img2img mode. ControlNet is a neural network structure to control diffusion models by adding extra conditions.
-
-You need a bare minimum of 8 GB of VRAM to use this shortcode, although 12 GB is recommended.
-
-Supports the `model` argument, which is the name of a ControlNet checkpoint in your `models/Stable-diffusion` directory (do not include the file extension.) You can download ControlNet checkpoints from [the official HuggingFace page](https://huggingface.co/lllyasviel/ControlNet/tree/main/models).
-
-For each model, you also need a copy of the [cldm_v15.yaml](https://github.com/lllyasviel/ControlNet/tree/main/models) config file. Rename it to match the name of the ControlNet model, e.g. `control_sd15_normal.yaml`.
-
-For each model, you also need the associated [annotator files available here](https://huggingface.co/lllyasviel/ControlNet/tree/main/annotator/ckpts). Place these into your `extensions/unprompted/lib_unprompted/stable_diffusion/controlnet/annotator/ckpts` folder.
-
-If you run into any errors, please triple-check your filepaths before opening a bug report.
-
-You can use ControlNet with custom SD 1.5 models [by merging checkpoints as described here](https://github.com/lllyasviel/ControlNet/issues/4#issuecomment-1426877944).
-
-Please be aware that the last part of your model's filename indicates which type of ControlNet model it is. The following ControlNet model types are supported: `openpose`, `scribble`, `mlsd`, `depth`, `normal`, `hed`, `canny`, `seg`
-
-ControlNet models should **not** be loaded manually from your WebUI dropdown.
-
-Supports the `save_memory` argument to minimize VRAM requirements.
-
-Supports the `detect_resolution` argument which is the size of the detected map. Defaults to 512. Some models may perform better at 384. Lowering this value to 256 may help with VRAM requirements.
-
-Supports the `eta` argument.
-
-Supports the following model-specific arguments: `value_threshold`, `distance_threshold`, `bg_threshold`, `low_threshold`, `high_threshold`
-
-
-
-[enable_multi_images]
-
-**Reason for legacy status:** This shortcode was introduced by a PR and is reportedly not compatible with recent versions of the WebUI.
-
-This is a helper shortcode that should be used if multiple init images, multiple masks or in combination with instance2mask per_instance should be used. Use this shortcode at the very end of the prompt, such that it can gather the correct init images and masks. Note that this operator will change the batch_size and batch_count (n_iter).
-
-
-
-[file path(str)]
-
-**Reason for legacy status:** Superceded by the `[call]` shortcode, which works with both filepaths and `[function]` names. That said, `[file]` may stick around for a while given its widespread use.
-
-Processes the content of `path` (including any shortcodes therein) and returns the result.
-
-`unprompted/templates` is the base directory for this shortcode, e.g. `[file example/main]` will target `unprompted/templates/example/main.txt`.
-
-If you do not enter a file extension, `.txt` is assumed.
-
-Supports relative paths by starting the `path` with `./`, e.g. `[file ./main]` will target the folder that the previously-called `[file]` resides in.
-
-This shortcode is powered by Python's glob module, which means it supports wildcards and other powerful syntax expressions. For example, if you wanted to process a random file inside of the `common` directory, you would do so like this: `[file common/*]`
-
-Supports optional keyword arguments that are passed to `[set]` for your convenience. This effectively allows you to use `[file]` like a function in programming, e.g. `[file convert_to_roman_numeral number=7]`.
-
-The file is expected to be `utf-8` encoding. You can change this with the optional `_encoding` argument.
-
-```
-[file my_template/common/adjective]
-```
-
-
-
-
+
\ No newline at end of file
diff --git a/docs/TODO.md b/docs/TODO.md
new file mode 100644
index 0000000..0d040fd
--- /dev/null
+++ b/docs/TODO.md
@@ -0,0 +1,11 @@
+- Check if it would be feasible to merge the Wizard and main shortcode parsers.
+- The "Generate Shortcode" button should account for the destination type, e.g. `after` should encapsulate the output in `[after]`.
+- Review all shortcode syntax and standardize the use of leading underscore for args.
+- Rework `wizard.js` to utilize jQuery, preferably before it grows much larger.
+- Implement a basic version of Unprompted as a Comfy UI node.
+- Rewrite the `wizard_generate_shortcode()` and `wizard_generate_template()` methods to utilize Gradio event listener inputs, rather than accessing object values directly
+- Split up the massive `unprompted.py` script into smaller modules.
+- `[filelist]`: Rework shortcode to utilize the `Unprompted.parse_filepath()` method
+- Introduce "meta" block for templates and workflow to house information such as author or homepage URL
+- Ensure use of `Unprompted.parse_arg()` wherever possible, as opposed to `parse_alt_tags()` or `parse_advanced()`
+- Investigate possible memory leak when using the "Reload UI" button in WebUI settings; I am not certain yet if the culprit is Unprompted, WebUI, or Gradio
\ No newline at end of file
diff --git a/docs/shortcodes/##.md b/docs/shortcodes/##.md
new file mode 100644
index 0000000..a93693f
--- /dev/null
+++ b/docs/shortcodes/##.md
@@ -0,0 +1,11 @@
+Similar to `[#]` but for multiline comments.
+
+This shortcode is unique in that the parser will ignore any malformed syntax inside the content. For example, if you have a `[##]` that contains a broken or unclosed shortcode within, Unprompted will not throw an error about it.
+
+```
+[##]
+This is my multiline comment.
+We're still commenting.
+I can't believe it, we're doing 3 lines of text!
+[/##]
+```
\ No newline at end of file
diff --git a/docs/shortcodes/#.md b/docs/shortcodes/#.md
new file mode 100644
index 0000000..2ec8607
--- /dev/null
+++ b/docs/shortcodes/#.md
@@ -0,0 +1,5 @@
+Use this to write comments in your templates. Comments are ultimately discarded by Unprompted and will not affect your final output.
+
+```
+[# This is my comment.]
+```
\ No newline at end of file
diff --git a/docs/shortcodes/after.md b/docs/shortcodes/after.md
new file mode 100644
index 0000000..f658ff1
--- /dev/null
+++ b/docs/shortcodes/after.md
@@ -0,0 +1,24 @@
+Processes the content after the main task is complete.
+
+This is particularly useful with the A1111 WebUI, as it gives you the ability to queue up additional tasks. For example, you can run img2img after txt2img from the same template.
+
+Supports the optional `after_index` argument which lets you control the order of multiple `[after]` blocks. Defaults to 0. For example, the `[after 2]` block will execute before the `[after 3]` block.
+
+You can `[get after_index]` inside of the `[after]` block, which can be useful when working with arrays and for loops.
+
+Supports the optional `allow_unsafe_scripts` parg which will disable the shortcode's normal behavior of bypassing extensions with known compatibility issues.
+
+Supports the `dupe_index_mode` kwarg which determines how the `[after]` block will handle duplicate indexes:
+
+- `concat` (default): The `[after]` block will be appended to the existing `[after]` block at the specified index.
+- `skip`: The `[after]` block will be ignored.
+- `append`: The `[after]` block will be added to the next available index.
+- `replace`: The existing `[after]` block at the specified index will be overwritten.
+
+```
+Photo of a cat
+[after]
+ [sets prompt="Photo of a dog" denoising_strength=0.75]
+ [img2img]
+[/after]
+```
\ No newline at end of file
diff --git a/docs/shortcodes/antonyms.md b/docs/shortcodes/antonyms.md
new file mode 100644
index 0000000..5c2e38e
--- /dev/null
+++ b/docs/shortcodes/antonyms.md
@@ -0,0 +1,15 @@
+Replaces the content with one or more random antonyms. This shortcode is powered by a combination of WordNet and Moby Thesaurus II. Does not require an online connection after first use (word databases are downloaded to disk.)
+
+The optional `max` argument allows you to specify the maximum number of antonyms to return. Defaults to -1, which returns all antonyms. The antonyms list is delimited by `Unprompted.Config.syntax.delimiter`.
+
+The optional `include_self` positional argument determines whether the original content can be returned as a possible result. Defaults to False.
+
+The optional `enable_moby` keyword argument determines whether Moby Thesaurus II will be referenced. Defaults to True. On first use, the Moby Thesaurus will be downloaded to the `lib_unprompted` folder - it is about 24 MB.
+
+The optional `enable_wordnet` keyword argument determines whether WordNet will be referenced. Defaults to True.
+
+It is worth noting that Moby does not have native antonym support. This shortcode first queries WordNet, the results of which are then sent to Moby via `[synonyms]`.
+
+```
+[antonyms]cold[/antonyms]
+```
\ No newline at end of file
diff --git a/docs/shortcodes/array.md b/docs/shortcodes/array.md
new file mode 100644
index 0000000..d028730
--- /dev/null
+++ b/docs/shortcodes/array.md
@@ -0,0 +1,72 @@
+Manages a group or list of values.
+
+The first positional argument, `name`, must be a string that corresponds to a variable name for the array. You can later use the same identifier with `[get]` to retrieve every value in the array as a delimited string.
+
+If you want to **retrieve** values at specific indexes, supply the indexes as positional arguments as shown below:
+
+```
+[array my_array 2 4 3]
+```
+
+If you want to **set** values at specific indexes, supply the indexes as keyword arguments as shown below:
+
+```
+[array my_array 2="something" 4=500 3="something else"]
+```
+
+You can also use variable names as kwarg values and `[array]` will attempt to parse them for an integer value.
+
+Supports the optional `_delimiter` argument that defines the separator string when retrieving multiple values from the array. Defaults to your `Config.syntax.delimiter` setting.
+
+Supports `_append` which allows you to add values to the end of the array. You can pass multiple values into `_append` with your `_delimiter` string, e.g. `[array my_array _append="something|another thing|third thing"]`.
+
+Similarly, supports `_prepend` which allows you to insert values to the beginning of the array.
+
+Supports `_del` which will remove a value from the array at the specified index, e.g.
+
+```
+BEFORE: my_array = 5,7,9,6
+```
+```
+[array my_array _del=1]
+```
+```
+AFTER: my_array = 5,9,6
+```
+
+Supports `_remove` which will remove the first matching value from the array, e.g.
+
+```
+BEFORE: my_array = 5,7,9,6
+```
+```
+[array my_array _remove=9]
+```
+```
+AFTER: my_array = 5,7,6
+```
+
+Supports `_find` which will return the index of the first matching value in the array.
+
+Supports `_shuffle` which will randomize the order of the array.
+
+Supports `_fill` kwarg which will populate the entire array with a given value.
+
+Supports the `_start` and `_end` kwargs, which allow you to retrieve values in a range of indexes from the array. Example:
+
+```
+[array my_array 0=a 1=b 2=c 3=d 4=e 5=f 6=g]
+[array my_array _start=2 _end=4]
+```
+
+**Result:** c,d,e
+
+If you only supply `_start`, then it will retrieve values from that index to the end of the array.
+
+If you only supply `_end`, then it will retrieve values from the start of the array to that index.
+
+If you use `_start` and/or `_end` along with `_fill`, then it will populate that specific range of values with your `_fill` value, as opposed to the entire array.
+
+Supports the `_inclusive` kwarg, which determines whether the `_end` index is inclusive or exclusive. Defaults to 1 (true).
+
+Supports the `_step` kwarg which indicates the step size when processing the `_start` and `_end` range. Defaults to 1.
\ No newline at end of file
diff --git a/docs/shortcodes/article.md b/docs/shortcodes/article.md
new file mode 100644
index 0000000..399a3ba
--- /dev/null
+++ b/docs/shortcodes/article.md
@@ -0,0 +1,18 @@
+Returns the content prefixed with the correct English indefinite article, in most cases `a` or `an`.
+
+Supports the optional `definite` positional argument which will instead return the definite article as a prefix, usually `the`.
+
+```
+[article]tiger[/article]
+```
+
+```
+RESULT: a tiger
+```
+
+```
+[article]apple[/article]
+```
+```
+RESULT: an apple
+```
\ No newline at end of file
diff --git a/docs/shortcodes/autocorrect.md b/docs/shortcodes/autocorrect.md
new file mode 100644
index 0000000..bad0d65
--- /dev/null
+++ b/docs/shortcodes/autocorrect.md
@@ -0,0 +1,12 @@
+Performs word-by-word spellcheck on the content, replacing any typos it finds with the most likely correction.
+
+Powered by the [pattern](https://github.com/clips/pattern/wiki/pattern-en) library - see pattern docs for more info.
+
+Supports the optional `confidence` argument, which is a float between 0 and 1 that determines how similar the suggested correction must be to the original content. Defaults to 0.85.
+
+```
+[autocorrect]speling is vrey dfficult soemtims, okky!!![/autocorrect]
+```
+```
+RESULT: spelling is very difficult sometimes, okay!!!
+```
\ No newline at end of file
diff --git a/docs/shortcodes/bypass.md b/docs/shortcodes/bypass.md
new file mode 100644
index 0000000..ec44c00
--- /dev/null
+++ b/docs/shortcodes/bypass.md
@@ -0,0 +1,12 @@
+Allows you to disable the execution of specific shortcodes for the remainder of the run. It is similar to `[override]`, but for shortcodes instead of variables. Particularly useful for debugging purposes.
+
+Provide the names of the shortcodes you wish to disable as pargs, separated by spaces.
+
+If you supply `_toggle`, the shortcode can re-enable shortcodes that were previously bypassed.
+
+```
+[bypass repeat chance][repeat 3]do not print me[/repeat][chance 100]skip this too[/chance]print me
+```
+```
+RESULT: print me
+```
\ No newline at end of file
diff --git a/docs/shortcodes/call.md b/docs/shortcodes/call.md
new file mode 100644
index 0000000..fb01bb1
--- /dev/null
+++ b/docs/shortcodes/call.md
@@ -0,0 +1,34 @@
+Processes the first parg as either a `[function]` name or filepath, returning the result.
+
+Functions take precedence over filepaths. You can declare a function with `[function some_method]` and execute it with `[call some_method]`.
+
+As for filepaths, `unprompted/templates` is the base directory for this shortcode, e.g. `[call example/main]` will target `unprompted/templates/example/main.txt`.
+
+If you do not enter a file extension, `.txt` is assumed.
+
+Supports relative paths by starting the `path` with `./`, e.g. `[call ./main]` will target the folder that the previously-called `[call]` resides in.
+
+This shortcode is powered by Python's glob module, which means it supports wildcards and other powerful syntax expressions. For example, if you wanted to process a random file inside of the `common` directory, you would do so like this: `[call common/*]`
+
+You can set arbitrary user variables with kwargs, e.g. `[call roman_numeral_converter number=7]`.
+
+The file is expected to be `utf-8` encoding. You can change this with the optional `_encoding` argument.
+
+This shortcode is compatible with `[else]`. Here are the situations that will cause `[else]` to fire:
+
+- The function has a `_required` argument that was not met.
+
+- The filepath doesn't exist.
+
+- Either the function or file return the term `_false`. (By the way, if this term is returned, it will not be printed.)
+
+Supports the `_suppress_errors` parg to prevent writing errors to the console.
+
+Supports the `_places` kwarg which lets you define multiple possible locations for the template you're calling. Places are prepended to the template path, and it will only return the first template that exists. Example: `[call "adjectives/something" _places="common|user"]` will check for `templates/common/adjectives/something` and `templates/user/adjectives/something`.
+
+
+
+
+```
+[call my_template/common/adjective]
+```
\ No newline at end of file
diff --git a/docs/shortcodes/case.md b/docs/shortcodes/case.md
new file mode 100644
index 0000000..d01f256
--- /dev/null
+++ b/docs/shortcodes/case.md
@@ -0,0 +1 @@
+See `[switch]`.
\ No newline at end of file
diff --git a/docs/shortcodes/casing.md b/docs/shortcodes/casing.md
new file mode 100644
index 0000000..b687202
--- /dev/null
+++ b/docs/shortcodes/casing.md
@@ -0,0 +1,23 @@
+Converts the casing of content to the selected type. Possible types:
+
+- uppercase
+- lowercase
+- camelcase
+- pascalcase
+- snakecase
+- constcase
+- kebabcase
+- upperkebabcase
+- separatorcase
+- sentencecase
+- titlecase
+- alphanumcase
+
+For more information on these types, consult the [casefy docs](https://github.com/dmlls/python-casefy), the library on which this shortcode depends.
+
+```
+[casing uppercase]why am i screaming[/casing]
+```
+```
+Result: WHY AM I SCREAMING
+```
\ No newline at end of file
diff --git a/docs/shortcodes/cast.md b/docs/shortcodes/cast.md
new file mode 100644
index 0000000..3cbbee8
--- /dev/null
+++ b/docs/shortcodes/cast.md
@@ -0,0 +1,9 @@
+Converts the content to the specified datatype.
+
+For security reasons, this shortcode is limited to the following datatypes: `int`, `float`, `str`, `bool`, `list`, `dict`.
+
+Please note that Unprompted is a weakly-typed language, which means that you can generally use a variable as any datatype without casting it. However, this shortcode may be useful when trying to pass an Unprompted variable to an outside function.
+
+```
+[cast int]34.7[/cast]
+```
\ No newline at end of file
diff --git a/docs/shortcodes/chance.md b/docs/shortcodes/chance.md
new file mode 100644
index 0000000..05ede74
--- /dev/null
+++ b/docs/shortcodes/chance.md
@@ -0,0 +1,7 @@
+Returns the content if the integer you passed is greater than or equal to a randomly generated number between 1 and 100.
+
+You can change the upper boundary by specifying the optional `_sides` argument.
+
+```
+[chance 25]I will show up in your prompt 25% of the time.[/chance]
+```
\ No newline at end of file
diff --git a/docs/shortcodes/choose.md b/docs/shortcodes/choose.md
new file mode 100644
index 0000000..d300b55
--- /dev/null
+++ b/docs/shortcodes/choose.md
@@ -0,0 +1,27 @@
+Randomly returns one of multiple options, as delimited by the vertical pipe or newline character.
+
+Supports `_case` which overrides the random nature of this shortcode with a pre-determined index (starting at 0.) Example: `[choose _case=1]red|yellow|green[/choose]` will always return `yellow`. You can also pass a variable into this argument.
+
+Supports an optional positional argument that tells the shortcode how many times to execute (default 1). For example: `[choose 2]Artist One|Artist Two|Artist Three|Artist Four[/choose]` will return two random artists.
+
+Supports the optional `_sep` argument which is a string delimeter that separates multiple options to be returned (defaults to `, `). In the example above, you might get `Artist One, Artist Three` as a result. When only returning one option, `_sep` is irrelevant.
+
+Supports the optional `_weighted` argument, which allows you to customize the probability of each option. Weighted mode expects the content to alternate between **weight value** and **the option itself** using the normal delimiter. For example, if you want your list to return Apple 30% of the time, Strawberry 50% of the time, and Blueberry 20% of the time you can do it like this:
+
+```
+[choose _weighted]
+3|Apple
+5|Strawberry
+2|Blueberry
+[/choose]
+```
+
+If you skip a weight value--e.g. `3|Apple|Strawberry`--then the following option (Strawberry) will automatically have a weight value of 1.
+
+The weight value dictates the number of times that an option is added to the master list of choices, which is then shuffled and picked from at random. So, if your content is `2|Blue|3|Red|Green` the master list becomes `Blue,Blue,Red,Red,Red,Green`.
+
+Supports the `_raw` parg, which prevents the execution of inner shortcodes except the one that is selected by `[choose]`.
+
+```
+[choose]red|yellow|blue|green[/choose]
+```
\ No newline at end of file
diff --git a/docs/shortcodes/civitai.md b/docs/shortcodes/civitai.md
new file mode 100644
index 0000000..fad7031
--- /dev/null
+++ b/docs/shortcodes/civitai.md
@@ -0,0 +1,31 @@
+Downloads a file using the [Civitai API](https://github.com/civitai/civitai/wiki/REST-API-Reference#get-apiv1models), adding the result to your prompt with the correct syntax. If the specified file is already on your filesystem, this shortcode will not send a request to Civitai.
+
+All of your kwargs are sent as URL parameters to the API (with the exception of system kwargs beginning with `_`) so please review the documentation linked above for a complete list of valid parameters. For example, `[civitai query="something" user="someuser"]` will pass `query` and `user` to the API.
+
+Supports shorthand syntax with pargs, where the first parg is `types` (e.g. LORA or TextualInversion), the second parg is `query` (model name search terms), the third parg is `_weight` (optional, defaults to 1.0), and the fourth parg (also optional) is the `_file`. For example: `[civitai lora EasyNegative 0.5]`.
+
+The `query` value is used as the filename to look for on your filesystem. You can typically search Civitai for a direct model filename (e.g. `query="kkw-new-neg-v1.4"` will return the 'New Negative' model). However, if this isn't working for whatever reason, you can override the filesystem search with the `_file` kwarg: `[civitai query="New Negative" _file="kkw-new-neg-v1.4"]`.
+
+This shortcode will auto-correct the case-sensitivity of `types` to the API's expected format. The API is a bit inconsistent in this regard (e.g. lora = `LORA`, controlnet = `Controlnet`, aestheticgradient = `AestheticGradient`...) but Unprompted will handle it for you. Here are the other edge cases that Unprompted will catch:
+
+- If types is set to `lora`, it will search for both `LORA` and `LoCon` models
+- Converts `SD` to `Checkpoint`
+- Converts `Embedding` and `TI` to `TextualInversion`
+- Converts `Pose` and `OpenPose` to `Poses`
+- Converts `CN` to `Controlnet`
+
+Supports the `_debug` parg to print diagnostic information to the console.
+
+Supports the `_api` kwarg which is the URL of the API to communicate with. Defaults to `https://civitai.com/api/v1/models`.
+
+Supports the `_timeout` kwarg to cap the wait time on the API request in seconds. Defaults to 60.
+
+Supports the `_id` kwarg to query the API with a specific modelId, eliminating the need for other parameters.
+
+If a file has multiple versions, you can specify the `_mvid` kwarg instead of `_id` to select a specific version.
+
+Supports the `_words` parg which will retrieve the trigger words from Civitai and include them in the prompt. This will also write the words into a companion JSON file as `activation text` for future use.
+
+```
+[civitai lora "HD Helper" 0.5 "hd_helper_v1"]
+```
\ No newline at end of file
diff --git a/docs/shortcodes/config.md b/docs/shortcodes/config.md
new file mode 100644
index 0000000..12f3c60
--- /dev/null
+++ b/docs/shortcodes/config.md
@@ -0,0 +1,15 @@
+Updates your Unprompted settings with the content for the duration of a run. Generally you would put this at the top of a template.
+
+Supports inline JSON as well as external JSON files.
+
+Supports relative and absolute filepaths.
+
+If you do not enter a file extension, `.json` is assumed.
+
+```
+[config]{"debug":True,"shortcodes":{"choose_delimiter":"*"}}[/config]
+```
+
+```
+[config]./my_custom_settings[/config]
+```
\ No newline at end of file
diff --git a/docs/shortcodes/conjugate.md b/docs/shortcodes/conjugate.md
new file mode 100644
index 0000000..f11439d
--- /dev/null
+++ b/docs/shortcodes/conjugate.md
@@ -0,0 +1,26 @@
+Converts the verbs in the content to variety of conjugated forms.
+
+Powered by the [pattern](https://github.com/clips/pattern/wiki/pattern-en) library - see pattern docs for more info.
+
+Supports the optional `tense` argument. Defaults to `present`. Other options include: `infinitive`, `past`, `future`.
+
+Supports the optional `person` argument for perspective. Defaults to `3`. Other options include: `1`, `2` and `none`.
+
+Supports the optional `number` argument. Defaults to `singular`. Also supports `plural`.
+
+Supports the optional `mood` argument. Defaults to `indicative`. Other options include: `imperative`, `conditional` and `subjunctive`.
+
+Supports the optional `aspect` argument. Defaults to `imperfective`. Other options include: `perfective` and `progressive`.
+
+Supports the optional `negated` boolean argument. Defaults to 0.
+
+Supports the optional `parse` boolean argument. Defaults to 1.
+
+Supports the optional `alias` argument, which is a shorthand "preset" for the above settings. Overrides your other arguments. The following aliases are supported: `inf`,`1sg`,`2sg`,`3sg`,`pl`,`part`,`p`,`1sgp`,`2sgp`,`3gp`,`ppl`,`ppart`.
+
+```
+[conjugate tense="past"]She says[/conjugate]
+```
+```
+RESULT: She said
+```
\ No newline at end of file
diff --git a/docs/shortcodes/do.md b/docs/shortcodes/do.md
new file mode 100644
index 0000000..c122551
--- /dev/null
+++ b/docs/shortcodes/do.md
@@ -0,0 +1,9 @@
+Do-until style loop. The content is processed, then the `until` expression is evaluated - if it's false, the content is processed again. Repeat until `until` is true.
+
+```
+[sets my_var=0]
+[do until="my_var > 5"]
+ Print me
+ [sets my_var="my_var + 1"]
+[/do]
+```
\ No newline at end of file
diff --git a/docs/shortcodes/elif.md b/docs/shortcodes/elif.md
new file mode 100644
index 0000000..1961636
--- /dev/null
+++ b/docs/shortcodes/elif.md
@@ -0,0 +1,7 @@
+Shorthand "else if." Equivalent to `[else][if my_var="something"]content[/if][/else]`.
+
+```
+[set my_var]5[/set]
+[if my_var=6]Discard this content[/if]
+[elif my_var=5]Return this content![/elif]
+```
\ No newline at end of file
diff --git a/docs/shortcodes/else.md b/docs/shortcodes/else.md
new file mode 100644
index 0000000..9aeb448
--- /dev/null
+++ b/docs/shortcodes/else.md
@@ -0,0 +1,9 @@
+Returns content if a previous conditional shortcode (e.g. `[if]` or `[chance]`) failed its check, otherwise discards content.
+
+Supports the `id` kwarg. You can assign `_else_id` as a kwarg of the conditional block to associate it with a particular `[else]` block. Match the `id` to the `_else_id`. This means the two blocks don't have to appear next to each other.
+
+Supports the `debug` parg which will print some diagnostic information to the console.
+
+```
+[if my_var=0]Print something[/if][else]It turns out my_var did not equal 0.[/else]
+```
\ No newline at end of file
diff --git a/docs/shortcodes/eval.md b/docs/shortcodes/eval.md
new file mode 100644
index 0000000..085db9b
--- /dev/null
+++ b/docs/shortcodes/eval.md
@@ -0,0 +1,7 @@
+Parses the content using the simpleeval library, returning the result. Particularly useful for arithmetic.
+
+simpleeval is designed to prevent the security risks of Python's stock `eval` function, however I make no assurances in this regard. If you wish to use Unprompted in a networked environment, do so at your own risk.
+
+```
+[eval]5 + 5[/eval]
+```
\ No newline at end of file
diff --git a/docs/shortcodes/faceswap.md b/docs/shortcodes/faceswap.md
new file mode 100644
index 0000000..d30dfaa
--- /dev/null
+++ b/docs/shortcodes/faceswap.md
@@ -0,0 +1,29 @@
+Swaps the face in target image using an arbitrary image.
+
+The first parg is a filepath to the face image you wish to swap in.
+
+Supports the optional `body` kwarg which is an image path to perform the swap on. Defaults to the Stable Diffusion output image. Note that this value will essentially override your SD output, so when using this you should minimize your inference steps (i.e. lower it to 1) for faster execution.
+
+Supports the `pipeline` kwarg which is the faceswap method to use. Options include `insightface`, `ghost`, and `face_fusion`. Defaults to insightface, which results in the best quality. You can chain multiple pipelines together with `Config.syntax.delimiter`.
+
+Supports the special `unload` pipeline to free all components from the cache on demand.
+
+The `insightface` pipeline is currently the most developed option as it supports several unique features:
+
+- It can process multiple face images (e.g. `[faceswap "C:/pictures/face1.png|C:/pictures/face2.png"]` using `Config.syntax.delimiter` as a separator.)
+- It performs facial similarity analysis to swap the new face onto the best candidate in a picture containing more than one person.
+- It supports the `minimum_similarity` kwarg to bypass the faceswap if no one in the target picture bears resemblance to the new face. This kwarg takes a float value, although I haven't determined the upper and lower boundaries yet. A greater value means "more similar" and the range appears to be something like -10 to 300.
+- It supports the `export_embedding` parg which takes the average of all input faces and exports it to a safetensors embedding file. This file represents a composite face that can be used in lieu of individual images.
+- It supports the `embedding_path` kwarg which is the path to use in conjunction with `export_embedding`. Defaults to `unprompted/user/faces/blended_faces.safetensors`.
+- It supports the `gender_bonus` kwarg to boost facial similarity score when source and target genders are equal.
+- It supports the `age_influence` kwarg to penalize facial similarity score based on the difference of ages between source and target faces.
+
+Supports the `visibility` kwarg which is the alpha value with which to blend the result back into the original image. Defaults to 1.0.
+
+Supports the `unload` kwarg which allows you to free some or all of the faceswap components after inference. Useful for low memory devices, but will increase inference time. You can pass the following as a delimited string with `Config.syntax.delimiter`: `model`, `face`, `all`.
+
+Supports the `prefer_gpu` kwarg to run on the video card whenever possible.
+
+It is recommended to follow this shortcode with `[restore_faces]` in order to improve the resolution of the swapped result. Or, use the included Facelift template as an all-in-one solution.
+
+Additional pipelines may be supported in the future. Attempts were made to implement support for SimSwap, however this proved challenging due to multiple dependency conflicts.
\ No newline at end of file
diff --git a/docs/shortcodes/file2mask.md b/docs/shortcodes/file2mask.md
new file mode 100644
index 0000000..0feace1
--- /dev/null
+++ b/docs/shortcodes/file2mask.md
@@ -0,0 +1,12 @@
+Allows you to modify or replace your img2img mask with arbitrary files.
+
+Supports the `mode` argument which determines how the file mask will behave alongside the existing mask:
+- `add` will overlay the two masks. This is the default value.
+- `discard` will scrap the existing mask entirely.
+- `subtract` will remove the file mask region from the existing mask region.
+
+Supports the optional `_show` positional argument which will append the final mask to your generation output window.
+
+```
+Walter White[file2mask "C:/pictures/my_mask.png"]
+```
\ No newline at end of file
diff --git a/docs/shortcodes/filelist.md b/docs/shortcodes/filelist.md
new file mode 100644
index 0000000..1c29830
--- /dev/null
+++ b/docs/shortcodes/filelist.md
@@ -0,0 +1,19 @@
+Returns a delimited string containing the full paths of all files in a given path or paths (separate multiple paths with the standard delimiter.)
+
+This shortcode is powered by Python's glob module, which means it supports wildcards and other powerful syntax expressions.
+
+Supports the optional `_delimiter` argument which lets you specify the separator between each filepath. It defaults to your config's `syntax.delimiter` value (`|`).
+
+Supports the optional `_basename` parg that causes the shortcode to return filenames instead of full paths.
+
+Supports the optional `_hide_ext` parg that causes the shortcode to trim filename extensions out of the returned string.
+
+Supports the macro `%BASE_DIR%` which will be substituted with an absolute path to the Unprompted extension.
+
+Supports the `_recursive` parg to search within subfolders of the specified path.
+
+Supports the `_places` kwarg which is a delimited list of path parts to check. It replaces the `%PLACE%` macro string in your main path. Example: `[filelist "C:/some/%PLACE%/pictures/*.*" _places="one|two"]` will check for files in `C:/some/one/pictures` and `C:/some/two/pictures`.
+
+```
+[filelist "C:/my_pictures/*.*"]
+```
\ No newline at end of file
diff --git a/docs/shortcodes/filter_tags.md b/docs/shortcodes/filter_tags.md
new file mode 100644
index 0000000..dc25eaf
--- /dev/null
+++ b/docs/shortcodes/filter_tags.md
@@ -0,0 +1,30 @@
+Prepare a list of tags which will be evaluated against subsequent `[tags]` blocks. The content of `[tags]` is bypassed if it does not match your filters.
+
+Supports the `_extend` parg to add to the existing list of filters instead of replacing it.
+
+Supports the `_clear` parg to clear all filter rules after the first matching `[tags]` block.
+
+Supports the `_once` parg to remove an individual tag from the filter after the first match.
+
+Supports the `_must_match` kwarg that determines the behavior of the filter when using multiple tags:
+
+- `any` (default): The `[tags]` block must contain at least one matching parg or kwarg.
+- `all`: The `[tags]` block must contain all matching pargs and kwargs.
+- `selective`: The `[tags]` block must contain the same pargs. It does **not** have to contain the same kwargs, but if it does, the kwarg values must match.
+
+Supports `Config.syntax.not_operator` to exclude tags from the filter. For example, if you want to exclude all blocks with the "outdoors" tag, you can do it like this: `[filter_tags !outdoors]`.
+
+For kwarg tags, the not operator can be used with keys or values as shown:
+
+- `[filter_tags !location="indoors"]` will exclude all blocks that contain a kwarg with the `location` key
+- `[filter_tags location="!indoors"]` will exclude all blocks that contain a `location` kwarg with a value of `indoors`
+
+Supports the `_debug` parg to print some diagnostic information to the console.
+
+You can clear the filter at any time by calling `[filter_tags]` without any arguments.
+
+```
+[filter_tags location="outdoors"]
+[tags location="indoors"]This will not print[/tags]
+[tags location="outdoors"]This will print[/tags]
+```
\ No newline at end of file
diff --git a/docs/shortcodes/for.md b/docs/shortcodes/for.md
new file mode 100644
index 0000000..8fddf13
--- /dev/null
+++ b/docs/shortcodes/for.md
@@ -0,0 +1,17 @@
+[for var "test var" "update var"]
+
+Returns the content an arbitrary number of times until the `test` condition returns false.
+
+Importantly, the `test` and `update` arguments must be enclosed in quotes because they are parsed as advanced expressions!
+
+`var` is initialized as a user variable and can be accessed as normal, e.g. `[get var]` is valid (even inside of the loop.)
+
+`var` is optional. For example, `[for "i<10" "i+1"]` is a valid loop, as long as the variable `i` was previously initialized.
+
+The result of the `update` argument is set as the value of `var` at the end of each loop step.
+
+```
+[for i=0 "i<10" "i+1"]
+Current value of i: [get i]
+[/for]
+```
\ No newline at end of file
diff --git a/docs/shortcodes/function.md b/docs/shortcodes/function.md
new file mode 100644
index 0000000..ae392e9
--- /dev/null
+++ b/docs/shortcodes/function.md
@@ -0,0 +1,24 @@
+Allows you to declare your own named function (arbitrary code) and execute it with `[call]`.
+
+The first parg is the name of your function, e.g. `[function my_method]` can be referenced later with `[call my_method]`.
+
+Supports the `_const` parg which marks your function as a constant function. By including this argument, another script will not be able to initialize a function by the same name.
+
+Supports "default arguments" by way of arbitrary pargs and kwargs:
+
+- Parg example: `[function my_method my_parg]` will set the user variable `my_parg` to 1 when you `[call my_method]`.
+- Kwarg example: `[function my_method my_kwarg=apple]` will set the user variable `my_kwarg` to `apple` when you `[call my_method]`.
+
+Supports the `_required` kwarg which lets you specify one or more variable names delimited by `Unprompted.Config.syntax.delimiter`. If any are not set, the function will be bypassed.
+
+```
+[function my_method]
+A picture of [random 10] houses.
+[/function]
+
+[call my_method]
+```
+```
+POSSIBLE RESULT:
+A picture of 5 houses.
+```
\ No newline at end of file
diff --git a/docs/shortcodes/get.md b/docs/shortcodes/get.md
new file mode 100644
index 0000000..313e647
--- /dev/null
+++ b/docs/shortcodes/get.md
@@ -0,0 +1,25 @@
+Returns the value of `variable`.
+
+Supports variable parsing with the optional `_var` argument, e.g. `[get _var="somevar"]`.
+
+You can add `_before` and `_after` content to your variable. This is particularly useful for enclosing the variable in escaped brackets, e.g. `[get my_var _before=[ _after=]]` will print `[value of my_var]`.
+
+Supports the optional `_default` argument, the value of which is returned if your variable does not exist e.g. `[get car_color _default="red"]`.
+
+Supports returning multiple variables, e.g. `[get var_a var_b]` will return the values of two variables separated by a comma and space.
+
+You can change the default separator with `_sep`.
+
+Supports the `_external` kwarg to retrieve variable(s) from an external .json file. If the file does not exist, it will be created for you. Please be aware that using `_external` will take precedence over the variable(s) currently stored in your `shortcode_user_vars` dictionary. Also, the external variable will be written to `shortcode_user_vars`.
+
+Supports the `_all_external` kwarg to retrieve all variables from an external .json file. Every key-value pair in the file will be stored to your `shortcode_user_vars` dictionary.
+
+Supports the `_escape` parg to remove square brackets from the returned value. This is useful for when you want to use the result of `[get]` as a shortcode argument.
+
+Supports the `_parse` parg to parse any shortcodes inside the returned value. This is useful when used in conjunction with `[set _defer]`. Note that global variables are parsed automatically. After parsing, the result is stored to the variable.
+
+Supports the `_read_only` parg which is used in conjunction with `_parse` to prevent the variable from being overwritten by the parsed result.
+
+```
+My name is [get name]
+```
\ No newline at end of file
diff --git a/docs/shortcodes/gpt.md b/docs/shortcodes/gpt.md
new file mode 100644
index 0000000..62d2b81
--- /dev/null
+++ b/docs/shortcodes/gpt.md
@@ -0,0 +1,25 @@
+Processes the content with a given GPT-2 model. This is similar to the "Magic Prompts" feature of Dynamic Prompts, if you're familiar with that.
+
+This shortcode requires the "transformers" package which is included with the WebUI by default, but you may need to install the package manually if you're using Unprompted as a standalone program.
+
+You can leave the content blank for a completely randomized prompt.
+
+Supports the `model` kwarg which can accept a pretrained model identifier from the HuggingFace hub. Defaults to `LykosAI/GPT-Prompt-Expansion-Fooocus-v2`. The first time you use a new model, it will be downloaded to the `unprompted/models/gpt` folder.
+
+Please see the Wizard UI for a list of suggested models.
+
+Supports the `task` kwarg which determines behavior of the transformers pipeline module. Defaults to `text-generation`. You can set this to `summarization` if you want to shorten your prompts a la Midjourney.
+
+Supports the `instruction` kwarg which is a string to be prepended to the prompt. This text will be excluded from the final result. Example: `[gpt instruction="Generate a list of animals"]cat,[/gpt]` may return `cat, dog, bird, horse, cow`.
+
+Supports the `max_length` kwarg which is the maximum number of words to be returned by the shortcode. Defaults to 50.
+
+Supports the `min_length` kwarg which is the minimum number of words to be returned by the shortcode. Defaults to 1.
+
+Supports the `prefix` and `affix` kwargs to include custom strings in the returned result.
+
+Supports the `tokenizer` kwarg to load a separate model as the tokenizer.
+
+Supports the `transformers_class` to specify the methods of inference, defaults to `auto`. Also supports `t5`.
+
+Supports the `unload` parg to prevent keeping the model and tokenizer in memory between runs.
\ No newline at end of file
diff --git a/docs/shortcodes/hypernyms.md b/docs/shortcodes/hypernyms.md
new file mode 100644
index 0000000..e115c99
--- /dev/null
+++ b/docs/shortcodes/hypernyms.md
@@ -0,0 +1,11 @@
+Replaces the content with one or more random hypernyms. This shortcode is powered by WordNet.
+
+The optional `max` argument allows you to specify the maximum number of hypernyms to return. Defaults to -1, which returns all hypernyms. The hypernyms list is delimited by `Unprompted.Config.syntax.delimiter`.
+
+```
+[hypernyms max=1]dog[/hypernyms]
+```
+
+```
+Possible result: animal
+```
\ No newline at end of file
diff --git a/docs/shortcodes/hyponyms.md b/docs/shortcodes/hyponyms.md
new file mode 100644
index 0000000..379362d
--- /dev/null
+++ b/docs/shortcodes/hyponyms.md
@@ -0,0 +1,11 @@
+Replaces the content with one or more random hyponyms. This shortcode is powered by WordNet.
+
+The optional `max` argument allows you to specify the maximum number of hyponyms to return. Defaults to -1, which returns all hyponyms. The hyponyms list is delimited by `Unprompted.Config.syntax.delimiter`.
+
+```
+[hyponyms]animal[/hyponyms]
+```
+
+```
+Possible results: dog, cat, bird, ...
+```
\ No newline at end of file
diff --git a/docs/shortcodes/if.md b/docs/shortcodes/if.md
new file mode 100644
index 0000000..9e33090
--- /dev/null
+++ b/docs/shortcodes/if.md
@@ -0,0 +1,20 @@
+Checks whether `variable` is equal to the given value, returning the content if true, otherwise discarding the content.
+
+Supports the testing of multiple variables, e.g. `[if var_a=1 var_b=50 var_c="something"]`. If one or more variables return false, the content is discarded.
+
+The optional `_any` argument allows you to return the content if one of many variables return true. This is the equivalent of running "or" instead of "and" in programming, e.g. `[if _any var_a=1 var_b=50]`.
+
+The optional `_not` argument allows you to test for false instead of true, e.g. `[if _not my_variable=1]` will return the content if `my_variable` does *not* equal 1.
+
+The optional `_is` argument allows you to specify the comparison logic for your arguments. Defaults to `==`, which simply checks for equality. Other options include `!=`, `>`, `>=`, `<` and `<=`. Example: `[if my_var="5" _is="<="]`
+
+Supports [advanced expressions](#advanced-expressions) - useful for testing complex conditions.
+
+```
+[if subject="man"]wearing a business suit[/if]
+```
+
+```
+(Advanced expression demo)
+[if "subject is 'man' or subject is 'woman'"]wearing a shirt[/if]
+```
\ No newline at end of file
diff --git a/docs/shortcodes/image_edit.md b/docs/shortcodes/image_edit.md
new file mode 100644
index 0000000..6df3d8e
--- /dev/null
+++ b/docs/shortcodes/image_edit.md
@@ -0,0 +1,130 @@
+Performs a wide variety of image operations.
+
+You may perform multiple operations on the same image in one call. **Arguments are processed in order, first pargs and then kwargs.**
+
+Each operation must be unique. For example, you cannot run `paste` twice inside of the same block.
+
+Any parg may be specified as a kwarg instead. For example, `[image_edit autotone]` and `[image_edit autotone=1]` are both valid, and the latter allows you to delay the autotone operation if other kwargs precede it. (As stated above, all pargs are processed before kwargs.)
+
+## General setting arguments
+
+### input
+
+A path to an image on your system, or a PIL Image object.
+
+If `input` is not specified, then `[image_edit]` will modify the WebUI's output image by default.
+
+All operations in the `[image_edit]` block will affect the same `input`.
+
+```
+input="C:/some/path/to/picture.png"
+```
+
+### return
+
+A parg that causes `[image_edit]` to return the final, modified PIL image object.
+
+Useful when you want to save the new image as a variable for later use.
+
+```
+[set new_image][image_edit width=500 height=500 return][/set]
+```
+
+### copy
+
+A parg that causes `[image_edit]` to duplicate the `input` image for its operations, preventing changes to the original.
+
+I recommend using `copy` when also using `return`.
+
+```
+[set new_image][image_edit width=500 height=500 return copy][/set]
+```
+
+## Image operation arguments
+
+### autotone
+
+Adjusts the black point of the `input` image for enhanced contrast. The algorithm produces results that are virtually identical to the **Image > Auto Tone** feature in Photoshop.
+
+```
+[image_edit autotone]
+```
+
+### color_match
+
+A path to an image on your system, or a PIL image object.
+
+The `color_match` image will be used to grade the colors of the `input` image.
+
+Powered by the [color-matcher](https://github.com/hahnec/color-matcher) module.
+
+- `color_match_strength`: The opacity of the new grading, from 0 to 1. For example, set to 0.5 to blend halfway between the old and new image. Defaults to 1, or full strength.
+- `color_match_method`: Algorithm for color grading, supports `hm`, `mvgd`, `mkl`, `hm-mvgd-hm`, `hm-mkl-hm`. Defaults to `mkl`.
+
+```
+[image_edit color_match="C:/path/to/grading.png" color_match_strength=0.5]
+```
+
+### height, width
+
+Specify `height` and/or `width` to adjust the dimensions of the `input` image.
+
+Only one of the two arguments is required.
+
+- `unit`: kwarg which is the unit of measurement for the `width` and `height` kwargs. Options include `px` and `%`. Defaults to `px`.
+- `resize`: kwarg which is the behavior when resizing the `input` image. Options include `scale` and `crop`. Defaults to `scale`.
+- `resample_method`: kwarg which is the method of resampling when using the `scale` technique. Options include `Nearest Neighbor`, `Box`, `Bilinear`, `Hamming`, `Bicubic`, and `Lanczos`. Defaults to `Lanczos`.
+- `origin`: kwarg which is the anchor point of the image when using the `crop` technique. Options include `top_left`, `top_center`, `top_right`, `middle_left`, `middle_center`, `middle_right`, `bottom_left`, `bottom_center`, and `bottom_right`. Defaults to `middle_center`.
+- `keep_ratio`: parg which will preserve the aspect ratio of the image. Note that if you specify both `width` and `height`, it will override and disable `keep_ratio`.
+- `min_width`, `min_height`: kwargs which can be used to set a minimum size for the image. This is applied after the `keep_ratio` parg. If the image is smaller than the minimum, it will be scaled up to the minimum.
+
+```
+[image_edit height=1024 width=768 resize="crop"]
+```
+
+### mask
+
+A path to an image on your system, or a PIL image object.
+
+The `mask` is used to control the alpha of the `input`. In simpler terms, the mask is used to mask out parts of the image (shocking, right?)
+
+If necessary, the `mask` is resized to match the dimensions of `input` and converted to `L` mode.
+
+- `keep_masked_rgb`: Parg that will preserve the RGB information of the `input` pixels even where the alpha channel is `0` (fully transparent.) In most cases, you probably want to dispose this information.
+
+```
+[image_edit mask="C:/some/path/to/mask.png"]
+```
+
+### mode
+
+Converts the `image` mode to the specified type, e.g. `RGB`, `RGBA`, `L`.
+
+```
+[image_edit mode="L" return copy]
+```
+
+### paste
+
+A path to an image on your system, or a PIL image object.
+
+The `paste` image will be pasted onto `input`.
+
+The `paste` image will be automatically converted to `RGBA` mode.
+
+- `paste_x`: The horizontal placement of the `paste` image in pixels, relative to the top-left coordinate of `input` (0,0)
+- `paste_y`: The vertical placement of the `paste` image in pixels, relative to the top-left coordinate of `input` (0,0)
+
+```
+[image_edit paste="C:/some/path/to/overlay.png" paste_x=20 paste_y=30]
+```
+
+### save
+
+A path to save the `input` image to disk.
+
+Since arguments are processed in order, you can run `save` after some operations but before others. This is useful for debugging purposes.
+
+```
+[image_edit width=350 height=350 save="C:/image/after_resizing.png" mask="C:/some/mask.png"]
+```
\ No newline at end of file
diff --git a/docs/shortcodes/image_info.md b/docs/shortcodes/image_info.md
new file mode 100644
index 0000000..5d52061
--- /dev/null
+++ b/docs/shortcodes/image_info.md
@@ -0,0 +1,25 @@
+Returns various types of metadata about the image, including quality assessment via the pyiqa toolbox.
+
+Supports the `file` kwarg which is the path to the image file. It can also take a PIL Image object. If not specified, this shortcode will analyze the current SD image.
+
+Supports the `width` parg for retrieving the width of the image in pixels.
+
+Supports the `height` parg for retrieving the height of the image in pixels.
+
+Supports the `aspect_ratio` parg for retrieving the aspect ratio of the image (`width` / `height`).
+
+Supports the `filename` parg which is the base name of the image file.
+
+Supports the `filetype` parg which is the file extension of the image file.
+
+Supports the `filesize` parg which is the size of the image file in bytes.
+
+Supports the `iqa` kwarg which is an image quality assessment metric to process the image with. Please refer to the [pyiqa docs](https://github.com/chaofengc/IQA-PyTorch) for a list of supported metrics. I like `laion_aes` for calculating an aesthetic score.
+
+Supports the `pixel_count` parg which is the total number of pixels in the image.
+
+Supports the `unload_metrics` parg which will unload the pyiqa metrics from memory after the shortcode is processed.
+
+```
+[image_info file="a:/inbox/somanypixels.png" pixel_count]
+```
\ No newline at end of file
diff --git a/docs/shortcodes/img2img.md b/docs/shortcodes/img2img.md
new file mode 100644
index 0000000..f496689
--- /dev/null
+++ b/docs/shortcodes/img2img.md
@@ -0,0 +1,13 @@
+Used within the `[after]` block to append an img2img task to your generation.
+
+The image resulting from your main prompt (e.g. the txt2img result) will be used as the initial image for `[img2img]`.
+
+While this shortcode does not take any arguments, most img2img settings can be set in advance. **Does not currently support batch_size or batch_count** - coming soon!
+
+```
+Photo of a cat
+[after]
+ [sets prompt="Photo of a dog" denoising_strength=0.75]
+ [img2img]
+[/after]
+```
\ No newline at end of file
diff --git a/docs/shortcodes/img2img_autosize.md b/docs/shortcodes/img2img_autosize.md
new file mode 100644
index 0000000..1c69f1d
--- /dev/null
+++ b/docs/shortcodes/img2img_autosize.md
@@ -0,0 +1,15 @@
+Automatically adjusts the width and height parameters in img2img mode based on the proportions of the input image.
+
+Stable Diffusion generates images in sizes divisible by 8 pixels. If your initial image is something like 504x780, this shortcode will set the width and height to 512x768.
+
+Note that this shortcode is architecture-aware, meaning it will return different values depending on if you're using a SD 1.5 or SDXL checkpoint.
+
+Supports the `unit` shortcode which lets you specify the resolution multiplier. Must be divisible by 8. Defaults to 64.
+
+Supports `target_size` which is the minimum possible size of either dimension. Defaults to 512 for SD 1.5 and 1024 for SDXL.
+
+Supports `only_full_res` which, if true, will bypass this shortcode unless the "full resolution inpainting" setting is enabled. Defaults to false.
+
+```
+[img2img_autosize] Photo of a cat
+```
\ No newline at end of file
diff --git a/docs/shortcodes/img2pez.md b/docs/shortcodes/img2pez.md
new file mode 100644
index 0000000..455a33a
--- /dev/null
+++ b/docs/shortcodes/img2pez.md
@@ -0,0 +1,27 @@
+Performs an advanced CLIP interrogation technique on the initial image known as [Hard Prompts Made Easy](https://github.com/YuxinWenRick/hard-prompts-made-easy).
+
+Be aware that this technique is essentially a training routine and will significantly lengthen your inference time, at least on the default settings. On a Geforce 3090, it appears to take around 1-2 minutes.
+
+By default, this shortcode is only compatible with SD 1.5 models. If you wish to use it with SD 2.1 or Midjourney, please set `clip_model` to `ViT-H-14` and `clip_pretrain` to `laion2b_s32b_b79k`. It does work surprisingly well with Midjourney.
+
+Supports the optional `image_path` argument. This is a path to file(s) or a directory to use as the initial image. If not provided, it will default to the initial image in your img2img tab. Note: you can supply multiple paths delimited by `Unprompted.Config.syntax.delimiter`, and img2pez will optimize a single prompt across all provided images. To use this with an entire directory, provide a wildcard as follows: `c:/my/images/*.png`
+
+Supports the optional `target_prompt` kwarg. This is a prompt to optimize with img2pez that can be used on its own or in addition to `image_path`.
+
+Supports the optional `prompt_length` argument, which is the length of the resulting prompt in tokens. Default to 16.
+
+Supports the optional `iterations` argument, which is the total number of training steps to perform. Defaults to 200.
+
+Supports the optional `learning_rate` argument. Defaults to 0.1.
+
+Supports the optional `weight_decay` argument. Defaults to 0.1.
+
+Supports the amusingly-named `prompt_bs` argument, which is described by the technique's authors as "number of intializations." Defaults to 1.
+
+Supports the optional `clip_model` argument. Defaults to ViT-L-14.
+
+Supports the optional `pretrain_clip` argument. Defaults to openai.
+
+Supports the optional `clip_preset` kwarg. This provides an easy way to select a compatible pair of `clip_model` and `pretrain_clip` settings.
+
+Supports the optional `free_memory` argument which attempts to free the CLIP model from memory as soon as the img2pez operation is finished. This isn't recommended unless you are running into OOM issues.
\ No newline at end of file
diff --git a/docs/shortcodes/info.md b/docs/shortcodes/info.md
new file mode 100644
index 0000000..b620940
--- /dev/null
+++ b/docs/shortcodes/info.md
@@ -0,0 +1,20 @@
+Prints metadata about the content. You must pass the type(s) of data as positional arguments.
+
+Supports `character_count` for retrieving the number of individual characters in the content.
+
+Supports `word_count` for retrieving the number of words in the content, using space as a delimiter.
+
+Supports `sentence_count` for retrieving the number of sentences in the content. Powered by the nltk library.
+
+Supports `filename` for retreiving the base name of a file from the filepath content. For example, if the content is `C:/pictures/delicious hamburger.png` then this will return `delicious hamburger`.
+
+Supports `string_count` for retrieving the number of a custom substring in the content. For example, `[info string_count="the"]the frog and the dog and the log[/info]` will return 3.
+
+Supports `clip_count` for retrieving the number of CLIP tokens in the content (i.e. a metric for prompt complexity.) This argument is only supported within the A1111 WebUI environment.
+
+```
+[info word_count]A photo of Emma Watson.[/info]
+```
+```
+Result: 5
+```
\ No newline at end of file
diff --git a/docs/shortcodes/init_image.md b/docs/shortcodes/init_image.md
new file mode 100644
index 0000000..09ee8e8
--- /dev/null
+++ b/docs/shortcodes/init_image.md
@@ -0,0 +1,11 @@
+Gets or sets image from the given `path` as the initial image for use with img2img. Call this without any arguments to get the current image.
+
+Note that `path` must be an absolute path, including the file extension.
+
+If the given `path` ends with the `*` wildcard, `[init_image]` will choose a random file in that directory.
+
+**Important:** At the moment, you still have to select an image in the WebUI before pressing Generate, or this shortcode will throw an error. You can select any image - it doesn't matter what it is, just as long as the field isn't empty.
+
+```
+[init_image "C:/pictures/my_image.png"]
+```
\ No newline at end of file
diff --git a/docs/shortcodes/instance2mask.md b/docs/shortcodes/instance2mask.md
new file mode 100644
index 0000000..ab5862f
--- /dev/null
+++ b/docs/shortcodes/instance2mask.md
@@ -0,0 +1,115 @@
+Uses Mask R-CNN (an instance segmentation model) to predict instances. The found instances are mask. Different from `[txt2mask]` as it allows to run the inpainting for each found instance individually. This is useful, when using high resolution inpainting. This shortcode only works in the img2img tab of the A1111 WebUI.
+**Important:** If per_instance is used it is assumed to be the last operator changing the mask.
+
+The supported classes of instances are:
+- `person`
+- `bicycle`
+- `car`
+- `motorcycle`
+- `airplane`
+- `bus`
+- `train`
+- `truck`
+- `boat`
+- `traffic light`
+- `fire hydrant`
+- `stop sign`
+- `parking meter`
+- `bench`
+- `bird`
+- `cat`
+- `dog`
+- `horse`
+- `sheep`
+- `cow`
+- `elephant`
+- `bear`
+- `zebra`
+- `giraffe`
+- `backpack`
+- `umbrella`
+- `handbag`
+- `tie`
+- `suitcase`
+- `frisbee`
+- `skis`
+- `snowboard`
+- `sports ball`
+- `kite`
+- `baseball bat`
+- `baseball glove`
+- `skateboard`
+- `surfboard`
+- `tennis racket`
+- `bottle`
+- `wine glass`
+- `cup`
+- `fork`
+- `knife`
+- `spoon`
+- `bowl`
+- `banana`
+- `apple`
+- `sandwich`
+- `orange`
+- `broccoli`
+- `carrot`
+- `hot dog`
+- `pizza`
+- `donut`
+- `cake`
+- `chair`
+- `couch`
+- `potted plant`
+- `bed`
+- `dining table`
+- `toilet`
+- `tv`
+- `laptop`
+- `mouse`
+- `remote`
+- `keyboard`
+- `cell phone`
+- `microwave`
+- `oven`
+- `toaster`
+- `sink`
+- `refrigerator`
+- `book`
+- `clock`
+- `vase`
+- `scissors`
+- `teddy bear`
+- `hair drier`
+- `toothbrush`
+
+Supports the `mode` argument which determines how the text mask will behave alongside a brush mask:
+- `add` will overlay the two masks. This is the default value.
+- `discard` will ignore the brush mask entirely.
+- `subtract` will remove the brush mask region from the text mask region.
+- `refine` will limit the inital mask to the selected instances.
+
+Supports the optional `mask_precision` argument which determines the confidence of the instance mask. Default is 0.5, max value is 1.0. Lowering this value means you may select more than you intend per instance (instances may overlap).
+
+Supports the optional `instance_precision` argument which determines the classification thresshold for instances to be masked. Reduce this, if instances are not detected successfully. Default is 0.85, max value is 1.0. Lowering this value can lead to wrongly classied areas.
+
+Supports the optional `padding` argument which increases the radius of the instance masks by a given number of pixels.
+
+Supports the optional `smoothing` argument which refines the boundaries of the mask, allowing you to create a smoother selection. Default is 0. Try a value of 20 or greater if you find that your masks are blocky.
+
+Supports the optional `select` argument which defines how many instances to mask. Default value is 0, which means all instances.
+
+Supports the optional `select_mode` argument which specifies which instances are selected:
+- `overlap` will select the instances starting with the instance that has the greatest absolute brushed mask in it.
+- `overlap relative` behaves similar to `overlap` but normalizes the areas by the size of the instance.
+- `greatest area` will select the greatest instances by pixels first.
+- `random` will select instances in a random order
+Defaults to `overlap`.
+
+Supports the optional `show` positional argument which will append the final masks to your generation output window and for debug purposes a combined instance segmentation image.
+
+Supports the optional `per_instance` positional argument which will render and append the selected masks individually. Leading to better results if full resolution inpainting is used.
+
+```
+[instance2mask]clock[/txt2mask]
+```
\ No newline at end of file
diff --git a/docs/shortcodes/interrogate.md b/docs/shortcodes/interrogate.md
new file mode 100644
index 0000000..cd4a376
--- /dev/null
+++ b/docs/shortcodes/interrogate.md
@@ -0,0 +1,20 @@
+Generates a caption for the given image using one of several techniques.
+
+Supports the `image` kwarg which is the path to the image you wish to interrogate. Defaults to the Stable Diffusion input/output image.
+
+Supports the `method` kwarg which is the interrogation technique to use. Defaults to `CLIP`, which relies on the WebUI's stock methods for completing the task. Other options include `WaifuDiffusion`, `BLIP-2`, and `CLIPxGPT`, all of which will download a large checkpoint upon first use.
+
+Supports the `model` kwarg which is the model to use for the interrogation. For BLIP-2, this can be a Hugging Face string, e.g. `Salesforce/blip2-opt-2.7b`.
+
+Supports the `context` kwarg which is a starting prompt to supply to the model. At the moment, this is only compatible BLIP-2. This can help shape its response.
+
+Supports the `question` kwarg which is the question to ask the model. At the moment, this is only compatible with BLIP-2. This overrides `context`.
+
+Supports the `max_tokens` kwarg which is the maximum number of tokens the model can produce for its response. At the moment, this is only compatible with BLIP-2. Defaults to 50.
+
+The WaifuDiffusion method is oriented around tags as opposed to natural language, and thus supports a few special settings:
+
+- The `confidence_threshold` kwarg, which is a value between 0.0 and 1.0 that indicates how likely the image must contain the tag before being returned as part of the prompt. Defaults to 0.35.
+- Supports the `blacklist_tags` kwarg, which is a delimited list of tags to ban.
+
+Note that WaifuDiffusion tags usually contain underscores. You can replace these with spaces as follows: `[replace _from="_" _to=" "][interrogate][/replace]`
\ No newline at end of file
diff --git a/docs/shortcodes/invert_mask.md b/docs/shortcodes/invert_mask.md
new file mode 100644
index 0000000..4a3e503
--- /dev/null
+++ b/docs/shortcodes/invert_mask.md
@@ -0,0 +1,7 @@
+Inverts the mask. Great in combination with `[txt2mask]` and `[instance2mask]`. Simply put the tag `[invert_mask]`.
+
+Currently lacks batch support.
+
+```
+[txt2mask]person[/txt2mask][invert_mask]
+```
\ No newline at end of file
diff --git a/docs/shortcodes/length.md b/docs/shortcodes/length.md
new file mode 100644
index 0000000..f62e4e3
--- /dev/null
+++ b/docs/shortcodes/length.md
@@ -0,0 +1,10 @@
+Returns the number of items in a delimited string or `[array]` variable.
+
+Supports the optional `_delimiter` argument which lets you specify the separator between each item. It defaults to your config's `syntax.delimiter` value (`|`).
+
+Supports the optional `_max` argument which caps the value returned by this shortcode. Defaults to -1, which is "no cap."
+
+```
+[length "item one|item two|item three"]
+```
+**Result:** 3
diff --git a/docs/shortcodes/log.md b/docs/shortcodes/log.md
new file mode 100644
index 0000000..169e05f
--- /dev/null
+++ b/docs/shortcodes/log.md
@@ -0,0 +1,7 @@
+Prints a message to the console.
+
+By default, the message context is `DEBUG`. The first positional argument determines the context.
+
+```
+[log ERROR]The value of [get some_variable] is wrong![/log]
+```
\ No newline at end of file
diff --git a/docs/shortcodes/logs.md b/docs/shortcodes/logs.md
new file mode 100644
index 0000000..15f065f
--- /dev/null
+++ b/docs/shortcodes/logs.md
@@ -0,0 +1,9 @@
+Prints one or more messages to the console. This is the atomic version of `[log]`.
+
+By default, the message context is `INFO`. You can change this with the optional `_level` argument.
+
+Each parg is a message to be printed. You should enclose your message in quotes if it contains spaces.
+
+```
+[logs "This is a message" "This is another message" _level="INFO"]
+```
\ No newline at end of file
diff --git a/docs/shortcodes/max.md b/docs/shortcodes/max.md
new file mode 100644
index 0000000..fdc44ee
--- /dev/null
+++ b/docs/shortcodes/max.md
@@ -0,0 +1,9 @@
+Returns the greatest value among the arguments. Supports advanced expressions.
+
+```
+[sets var_a=2 var_b=500]
+[max var_b var_a "100+2" "37"]
+```
+```
+Result: 500
+```
\ No newline at end of file
diff --git a/docs/shortcodes/min.md b/docs/shortcodes/min.md
new file mode 100644
index 0000000..1b5c428
--- /dev/null
+++ b/docs/shortcodes/min.md
@@ -0,0 +1,9 @@
+Returns the smallest value among the arguments. Supports advanced expressions.
+
+```
+[sets var_a=2 var_b=500]
+[min var_b var_a "100+2" "37"]
+```
+```
+Result: 2
+```
\ No newline at end of file
diff --git a/docs/shortcodes/override.md b/docs/shortcodes/override.md
new file mode 100644
index 0000000..ebbea43
--- /dev/null
+++ b/docs/shortcodes/override.md
@@ -0,0 +1,7 @@
+Forces`variable` to equal the value of the content when attempting to set it.
+
+In the example below, `my_variable` will equal "panda" after running the `[set]` shortcode.
+
+```
+[override my_variable]panda[/override][set my_variable]fox[/set]
+```
\ No newline at end of file
diff --git a/docs/shortcodes/overrides.md b/docs/shortcodes/overrides.md
new file mode 100644
index 0000000..ab673b0
--- /dev/null
+++ b/docs/shortcodes/overrides.md
@@ -0,0 +1,9 @@
+Forces `variable_a` and `variable_b` to equal the given values when attempting to `[set]` it.
+
+Supports multiple variables.
+
+In the example below, `my_variable` will equal "panda" after running the `[set]` shortcode.
+
+```
+[override my_variable="panda"][set my_variable]fox[/set]
+```
\ No newline at end of file
diff --git a/docs/shortcodes/pluralize.md b/docs/shortcodes/pluralize.md
new file mode 100644
index 0000000..5951909
--- /dev/null
+++ b/docs/shortcodes/pluralize.md
@@ -0,0 +1,10 @@
+Returns the content in its plural form. Powered by the [pattern](https://github.com/clips/pattern/wiki/pattern-en) library - see pattern docs for more info.
+
+Supports the optional `pos` argument. This is the target position of speech and defaults to "noun." In some rare cases, you may want to switch this to "adjective."
+
+```
+[pluralize]child[/pluralize]
+```
+```
+RESULT: children
+```
\ No newline at end of file
diff --git a/docs/shortcodes/random.md b/docs/shortcodes/random.md
new file mode 100644
index 0000000..12f33cd
--- /dev/null
+++ b/docs/shortcodes/random.md
@@ -0,0 +1,9 @@
+Returns a random integer between 0 and the given integer, e.g. `[random 2]` will return 0, 1, or 2.
+
+You can specify the lower and upper boundaries of the range with `_min` and `_max`, e.g. `[random _min=5 _max=10]`.
+
+If you pass `_float` into this shortcode, it will support decimal numbers instead of integers.
+
+```
+[set restore_pic][random 1][/set]
+```
\ No newline at end of file
diff --git a/docs/shortcodes/remember.md b/docs/shortcodes/remember.md
new file mode 100644
index 0000000..3aba1f4
--- /dev/null
+++ b/docs/shortcodes/remember.md
@@ -0,0 +1,19 @@
+Allows you to keep one or more variables in memory for the duration of a batch run (i.e. runs where `batch_count` > 1). This overrides Unprompted's default behavior of completely resetting the `shortcode_user_vars` object after each image.
+
+Here is a practical example:
+
+Let's say you have a template where you want to pass different values to `[zoom_enhance]` that correspond to the `batch_index` of the run.
+
+To do this, we can create an `[array]` and append a new value to it each step of the run. We will mark the array with `[remember]` and tell `[zoom_enhance]` to look up the `batch_index` position of the array.
+
+
+```
+[array zoom_replacements _append="{get subject}"]
+[if batch_index=0]
+ [remember zoom_replacements]
+ [after][zoom_enhance replacement="{array zoom_replacements batch_index}" negative_replacement="worst quality"][/after]
+[/if]
+```
+```
+[remember var_a var_b]
+```
\ No newline at end of file
diff --git a/docs/shortcodes/repeat.md b/docs/shortcodes/repeat.md
new file mode 100644
index 0000000..267dc2e
--- /dev/null
+++ b/docs/shortcodes/repeat.md
@@ -0,0 +1,12 @@
+Processes and returns the content a number of `times`.
+
+Supports the optional `_sep` argument which is a string delimiter inserted after each output, excluding the final output. Example: `[repeat 3 _sep="|"]content[/repeat]` will return `content|content|content`.
+
+Supports float values as well. For example, `[repeat 4.2]content[/repeat]` will have a 20% chance to return `content` 5 times instead of 4.
+
+```
+[set my_var]0[/set]
+[repeat 5]
+Variable is currently: [set my_var _out _append]1[/set]
+[/repeat]
+```
\ No newline at end of file
diff --git a/docs/shortcodes/replace.md b/docs/shortcodes/replace.md
new file mode 100644
index 0000000..ba622e5
--- /dev/null
+++ b/docs/shortcodes/replace.md
@@ -0,0 +1,24 @@
+Updates the content using argument pairings as replacement logic.
+
+Arguments are case-sensitive.
+
+Supports the optional `_from` and `_to` arguments, which can process secondary shortcode tags as replacement targets, e.g. `[replace _from="{get var_a}" _to="{get var_b}"]`. These arguments also support delimited values with `Unprompted.Config.syntax.delimiter`.
+
+Supports the optional `_count` argument which limits the number of occurances to replace. For example, `[replace the="a" _count=1]the frog and the dog and the log[/replace]` will return `a frog and the dog and the log`.
+
+Supports the optional `_insensitive` parg to enable case-insensitive search-and-replace.
+
+Supports the optional `_load` kwarg for importing from:to replacement directions from one or more external JSON files.
+
+Supports the `_now` parg to execute the replacement query before parsing the inner content.
+
+Supports the `_strict` parg to only evaluate the `_to` expression on matches.
+
+```
+[replace red="purple" flowers="marbles"]
+A photo of red flowers.
+[/replace]
+```
+```
+Result: A photo of purple marbles.
+```
\ No newline at end of file
diff --git a/docs/shortcodes/resize.md b/docs/shortcodes/resize.md
new file mode 100644
index 0000000..3dc36ae
--- /dev/null
+++ b/docs/shortcodes/resize.md
@@ -0,0 +1,23 @@
+Resizes an image to the given dimensions, works with the SD image by default.
+
+The first parg is the path to your `image`. It can also take a PIL Image object.
+
+Supports the `save_out` parg which is the path to save the resized image to. If you do not specify this, the new image will overwrite the original.
+
+Supports `width` and `height` kwargs which are the new dimensions of the image.
+
+Supports the `unit` kwarg which is the unit of measurement for the `width` and `height` kwargs. Options include `px` and `%`. Defaults to `px`.
+
+Supports the `technique` kwarg which is the method of resizing. Options include `scale` and `crop`. Defaults to `scale`.
+
+Supports the `resample_method` kwarg which is the method of resampling when using the `scale` technique. Options include `Nearest Neighbor`, `Box`, `Bilinear`, `Hamming`, `Bicubic`, and `Lanczos`. Defaults to `Lanczos`.
+
+Supports the `origin` kwarg which is the anchor point of the image when using the `crop` technique. Options include `top_left`, `top_center`, `top_right`, `middle_left`, `middle_center`, `middle_right`, `bottom_left`, `bottom_center`, and `bottom_right`. Defaults to `middle_center`.
+
+Supports the `keep_ratio` parg which will preserve the aspect ratio of the image. Note that if you specify both `width` and `height`, it will take precedence over `keep_ratio`.
+
+Supports the `min_width` and `min_height` kwargs which can be used to set a minimum size for the image. This is applied after the `keep_ratio` parg. If the image is smaller than the minimum, it will be scaled up to the minimum.
+
+```
+[resize "a:/inbox/picture.png" width=350]
+```
diff --git a/docs/shortcodes/restore_faces.md b/docs/shortcodes/restore_faces.md
new file mode 100644
index 0000000..791ca80
--- /dev/null
+++ b/docs/shortcodes/restore_faces.md
@@ -0,0 +1,13 @@
+Improves the quality of faces in target image using various models.
+
+Supports `methods` kwarg which takes one or more restoration method names. Defaults to `GPEN`, which is a custom implementation exclusive to Unprompted. It also supports `GFPGAN`, `CodeFormer`, `RestoreFormer` and `RestoreFormerPlusPlus`. Specify multiple methods with the `Config.syntax.delimiter`.
+
+Supports `visibility` kwarg which is an alpha value between 0 and 1 with which to blend the result back into the original face. Defaults to 1.
+
+Supports the `unload` parg which disables the caching features of this shortcode. Caching improves inference speed at the cost of VRAM.
+
+There are several additional parameters that apply only to GPEN:
+
+Supports `resolution_preset` kwarg that determines which GPEN model to use: 512, 1024, or 2048. Defaults to `512`. Please be aware that higher resolutions may lead to an oversharpened look, which is possible to counteract to an extent by lowering `visibility`.
+
+Supports `downscale_method` which is the interpolation method to use when resizing the restored face for pasting back onto the original image. Options include Nearest Neighbor, Bilinear, Area, Cubic and Lanczos. Defaults to `Area`.
\ No newline at end of file
diff --git a/docs/shortcodes/round.md b/docs/shortcodes/round.md
new file mode 100644
index 0000000..dc764d8
--- /dev/null
+++ b/docs/shortcodes/round.md
@@ -0,0 +1,24 @@
+Allows you to round the first parg to a certain level of precision.
+
+Supports the optional `_place` int kwarg which determines the level of precision. Defaults to 0.
+
+Supports the optional `_up` parg which will round the number up (ceiling function) instead of normal rounding.
+
+Supports the optional `_down` parg which will round the number down (flooring function) instead of normal rounding.
+
+Supports rounding of both integer and float values.
+
+```
+Float example...
+[round 1.345 _place=1]
+```
+```
+RESULT: 1.3
+```
+```
+Integer example...
+[round 1678 _place=1]
+```
+```
+RESULT: 1680
+```
\ No newline at end of file
diff --git a/docs/shortcodes/seed.md b/docs/shortcodes/seed.md
new file mode 100644
index 0000000..5511cd8
--- /dev/null
+++ b/docs/shortcodes/seed.md
@@ -0,0 +1,9 @@
+Allows you to run the `random.seed()` method at will.
+
+It is a more comprehensive operation than `[set seed]`, as it will update several seed-related variables used by the WebUI, including `seed`, `all_seeds` and `seeds`.
+
+The first parg determines the new seed value. If not provided, it will default to the value of `seed` user variable.
+
+```
+[seed 100]
+```
\ No newline at end of file
diff --git a/docs/shortcodes/set.md b/docs/shortcodes/set.md
new file mode 100644
index 0000000..55d613e
--- /dev/null
+++ b/docs/shortcodes/set.md
@@ -0,0 +1,33 @@
+Sets a variable to the given content.
+
+`_append` will instead add the content to the end of the variable's current value, e.g. if `my_var` equals "hello" then `[set my_var _append] world.[/set]` will make it equal "hello world."
+
+`_prepend` will instead add the content to the beginning of the variable's current value.
+
+Supports the optional `_new` parg which will bypass the shortcode if the variable you're trying to `[set]` already exists. For example:
+
+```
+[set my_var]apple[/set]
+[set my_var _new]orange[/set]
+[get my_var]
+```
+
+This example will return `apple`.
+
+Supports the optional `_choices` argument, which is a delimited string of accepted values. The behavior of this argument depends on whether or not the `_new` argument is present:
+
+- If `_new` and the variable exists as a value that is **not** accepted by `_choices`, then `_new` is ignored and this shortcode will run.
+- If **not** `_new` and we're trying to set the variable to a value that is **not** accepted by `_choices`, then the `[set]` block is bypassed.
+- In the Wizard UI for certain kinds of elements, `_choices` is used to populate the element, such as a dropdown menu or radio group.
+
+Supports all Stable Diffusion variables that are exposed via Automatic's Script system, e.g. `[set cfg_scale]5[/set]` will force the CFG Scale to be 5 for the run.
+
+Supports the `_remember` parg that will invoke the `[remember]` shortcode with your variable. See `[remember]` for more information.
+
+Supports the `_external` kwarg to write the variable to an external .json file. If the file does not exist, it will be created for you.
+
+Supports the `_defer` parg to delay the processing of the content until you call the variable with `[get _parse]`.
+
+```
+[set my_var]This is the value of my_var[/set]
+```
\ No newline at end of file
diff --git a/docs/shortcodes/sets.md b/docs/shortcodes/sets.md
new file mode 100644
index 0000000..6e86d16
--- /dev/null
+++ b/docs/shortcodes/sets.md
@@ -0,0 +1,9 @@
+The atomic version of `[set]` that allows you to set multiple variables at once.
+
+This shortcode processes your arguments with `[set]` directly, meaning you can take advantage of system arguments supported by `[set]`, such as `_new`.
+
+Supports the optional `_load` kwarg for importing key:value pairs from one or more external JSON files.
+
+```
+[sets var_a=10 var_b=something var_c=500]
+```
\ No newline at end of file
diff --git a/docs/shortcodes/singularize.md b/docs/shortcodes/singularize.md
new file mode 100644
index 0000000..d0d9149
--- /dev/null
+++ b/docs/shortcodes/singularize.md
@@ -0,0 +1,10 @@
+Returns the content in its singular form. Powered by the [pattern](https://github.com/clips/pattern/wiki/pattern-en) library - see pattern docs for more info.
+
+Supports the optional `pos` argument. This is the target position of speech and defaults to "noun." In some rare cases, you may want to switch this to "adjective."
+
+```
+[singularize]children[/singularize]
+```
+```
+RESULT: child
+```
\ No newline at end of file
diff --git a/docs/shortcodes/substring.md b/docs/shortcodes/substring.md
new file mode 100644
index 0000000..84eb45c
--- /dev/null
+++ b/docs/shortcodes/substring.md
@@ -0,0 +1,18 @@
+Returns a slice of the content as determined by the keyword arguments.
+
+`start` is the beginning of the slice, zero indexed. Defaults to 0.
+
+`end` is the last position of the slice. Defaults to 0.
+
+Alternatively, you can pass a string into `start` or `end` and it will find the index of that string within the `content`.
+
+`step` is the skip interval. Defaults to 1 (in other words, a continuous substring.)
+
+`unit` is either `characters` or `words` and refers to the unit of the aforementioned arguments. Defaults to `characters`.
+
+```
+[substring start=1 end=3 unit=words]A photo of a giant dog.[/substring]
+```
+```
+Result: photo of a
+```
\ No newline at end of file
diff --git a/docs/shortcodes/switch.md b/docs/shortcodes/switch.md
new file mode 100644
index 0000000..5036d97
--- /dev/null
+++ b/docs/shortcodes/switch.md
@@ -0,0 +1,16 @@
+Allows you to run different logic blocks with inner case statements that match the value of the given positional argument.
+
+Both `[switch]` and `[case]` support advanced expressions.
+
+Note that `[case]` can be evaluated against multiple pargs. For example, `[case "something" "another_thing"]` will succeed if your switch var is either "something" or "another_thing."
+
+```
+[set my_var]100[/set]
+[switch my_var]
+ [case 1]Does not match[/case]
+ [case 2]Does not match[/case]
+ [case 100]Matches! This content will be returned[/case]
+ [case 4]Does not match[/case]
+ [case]If no other case matches, this content will be returned by default[/case]
+[/switch]
+```
\ No newline at end of file
diff --git a/docs/shortcodes/synonyms.md b/docs/shortcodes/synonyms.md
new file mode 100644
index 0000000..f21c0dd
--- /dev/null
+++ b/docs/shortcodes/synonyms.md
@@ -0,0 +1,13 @@
+Replaces the content with one or more random synonyms. This shortcode is powered by a combination of WordNet and Moby Thesaurus II. Does not require an online connection after first use (word databases are downloaded to disk.)
+
+The optional `max` argument allows you to specify the maximum number of synonyms to return. Defaults to -1, which returns all synonyms. The synonym list is delimited by `Unprompted.Config.syntax.delimiter`.
+
+The optional `include_self` positional argument determines whether the original content can be returned as a possible result. Defaults to False.
+
+The optional `enable_moby` keyword argument determines whether Moby Thesaurus II will be referenced. Defaults to True. On first use, the Moby Thesaurus will be downloaded to the `lib_unprompted` folder - it is about 24 MB.
+
+The optional `enable_wordnet` keyword argument determines whether WordNet will be referenced. Defaults to True.
+
+```
+[synonyms]amazing[/synonyms]
+```
\ No newline at end of file
diff --git a/docs/shortcodes/tags.md b/docs/shortcodes/tags.md
new file mode 100644
index 0000000..9d4d9e8
--- /dev/null
+++ b/docs/shortcodes/tags.md
@@ -0,0 +1,7 @@
+Assigns arbitrary tags to the content. Supports both parg and kwarg-style tags.
+
+On its own, this shortcode merely returns the content, but it can be used in conjunction with `[filter_tags]` to bypass the content if the tags don't match your filter rules. See `[filter_tags]` for more information.
+
+```
+[tags "tag_one" tag_two="value_two"]A photo of a dog.[/tags]
+```
\ No newline at end of file
diff --git a/docs/shortcodes/txt2img.md b/docs/shortcodes/txt2img.md
new file mode 100644
index 0000000..9dea043
--- /dev/null
+++ b/docs/shortcodes/txt2img.md
@@ -0,0 +1,7 @@
+Runs a txt2img task inside of an `[after]` block.
+
+The txt2img settings are determined by your user variables. In the following example, we explicitly update the CFG scale and prompt for the task:
+
+```
+[after][sets cfg_scale=15 prompt="horse"][txt2img][/after]original prompt goes here
+```
diff --git a/docs/shortcodes/txt2mask.md b/docs/shortcodes/txt2mask.md
new file mode 100644
index 0000000..3d2e6f3
--- /dev/null
+++ b/docs/shortcodes/txt2mask.md
@@ -0,0 +1,58 @@
+A port of [the script](https://github.com/ThereforeGames/txt2mask) by the same name, `[txt2mask]` allows you to create a region for inpainting based only on the text content (as opposed to the brush tool.) This shortcode only works in the img2img tab of the A1111 WebUI.
+
+Supports the `method` argument which determines the technology to use for masking. Defaults to `clipseg`. Can be changed to `fastsam` or `clip_surgery`, both of which utilize [Segment Anything](https://segment-anything.com/) instead. Although SAM technology is newer, my testing has shown that `clipseg` is still the most accurate method by far.
+
+The `tris` method is also supported. Again, the tech is newer but `clipseg` continues to outperform.
+
+Supports the `mode` argument which determines how the text mask will behave alongside a brush mask:
+- `add` will overlay the two masks. This is the default value.
+- `discard` will ignore the brush mask entirely.
+- `subtract` will remove the brush mask region from the text mask region.
+
+Supports the optional `precision` argument which determines the confidence of the mask. Default is 100, max value is 255. Lowering this value means you may select more than you intend.
+
+Supports the optional `padding` argument which increases the radius of your selection by a given number of pixels.
+
+Supports the optional `smoothing` argument which refines the boundaries of the mask, allowing you to create a smoother selection. Default is 20. Try increasing this value if you find that your masks are looking blocky.
+
+Supports the `blur` kwarg which applies a gaussian blur of specified pixel radius to the mask. This is particularly useful outside of img2img mode, which has its own blur setting you can use.
+
+Supports the optional `size_var` argument which will cause the shortcode to calculate the region occupied by your mask selection as a percentage of the total canvas. That value is stored into the variable you specify. For example: `[txt2mask size_var=test]face[/txt2mask]` if "face" takes up 40% of the canvas, then the `test` variable will become 0.4.
+
+Supports the `aspect_var` kwarg which is the name of a variable to store the aspect ratio of the mask. For example, if the mask is 512x768, the variable will become `0.667`.
+
+Supports the optional `negative_mask` argument which will subtract areas from the content mask.
+
+Supports the optional `neg_precision` argument which determines the confidence of the negative mask. Default is 100, the valid range is 1 to 255. Lowering this value means you may select more than you intend.
+
+Supports the optional `neg_padding` which is the same as `padding` but for the negative prompts.
+
+Supports the optional `neg_smoothing` which is the same as `smoothing` but for the negative prompts.
+
+Supports the optional `sketch_color` argument which enables support for "Inpaint Sketch" mode. Using this argument will force "Inpaint Sketch" mode regardless of which img2img tab you are on. The `sketch_color` value can either be a preset color string, e.g. `sketch_color="tan"` ([full list of color strings available here](https://github.com/python-pillow/Pillow/blob/12028c9789c3c6ac15eb147a092bfc463ebbc398/src/PIL/ImageColor.py#L163)) or an RGB tuple, e.g. `sketch_color="127,127,127"`. Currently, txt2mask only supports single-color masks.
+
+Supports the optional `sketch_alpha` argument, which should be paired with `sketch_color`. The `sketch_alpha` value is the level of mask transparency, from 0 (invisible) to 255 (fully opaque.)
+
+Due to a limitation in the A1111 WebUI at the time of writing, the `sketch_alpha` parameter is **not** the same as the "mask transparency" option in the UI. "Mask transparency" is not stored in the `p` object as far as I can tell, so txt2mask implements its own custom solution.
+
+Supports the optional `save` argument which will output the final mask as a PNG image to the given filepath.
+
+Supports the optional `show` positional argument which will append the final mask to your generation output window.
+
+Supports the optional `legacy_weights` positional argument which will utilize the original CLIPseg weights. By default, `[txt2mask]` will use the [refined weights](https://github.com/timojl/clipseg#new-fine-grained-weights).
+
+Supports the `unload_model` argument, which will unload the masking model after processing. On my GTX 3090, this adds about 3 seconds to inference time (using the clipseg model). Defaults to `False`, and should only be enabled on devices with low memory.
+
+The content and `negative_mask` both support the vertical pipe delimiter (`|`) which allows you to specify multiple subjects for masking.
+
+Supports the optional `stamp` kwarg that pastes a temporary PNG onto the init image before running mask processing, useful for redacting a portion of the image for example. The value of `stamp` is the name of a file in `images/stamps` without extension.
+
+Supports the optional `stamp_method` kwarg to choose the sizing and positioning of stamp logic. Valid options are `stretch` and `center`.
+
+Supports the optional `stamp_x` and `stamp_y` kwargs for precise positioning of the stamp. Both default to 0.
+
+Supports the optional `stamp_blur` parg which is the pixel radius of the stamp's gaussian blur filter. Defaults to 0, which disables the filter altogether.
+
+```
+[txt2mask]head and shoulders[/txt2mask]Walter White
+```
\ No newline at end of file
diff --git a/docs/shortcodes/unset.md b/docs/shortcodes/unset.md
new file mode 100644
index 0000000..2878feb
--- /dev/null
+++ b/docs/shortcodes/unset.md
@@ -0,0 +1,10 @@
+Removes one or more variables from memory.
+
+Note that variables are automatically deleted at the end of each run - you do **not** need to manually clean memory in most cases. The `[unset]` shortcode is for advanced use.
+
+Supports pattern matching with `*` to delete many variables at once. This may be useful, for example, if you're trying to disable ControlNet inside of an `[after]` block: `[unset cn_* controlnet_*]`.
+
+```
+[set var_a=10 var_b="something"]
+[unset var_a var_b]
+```
\ No newline at end of file
diff --git a/docs/shortcodes/upscale.md b/docs/shortcodes/upscale.md
new file mode 100644
index 0000000..41fba8a
--- /dev/null
+++ b/docs/shortcodes/upscale.md
@@ -0,0 +1,11 @@
+Enhances a given image using one or more of the upscaler methods available in the A1111 WebUI.
+
+Supports the `image` kwarg which is the path to the image you wish to enhance. Defaults to the Stable Diffusion output image.
+
+Supports the `models` kwarg which is a delimited list of upscaler model names to use.
+
+Supports the `scale` kwarg which is the scale factor to use. Defaults to 1.
+
+Supports the `visibility` kwarg which is the alpha value to use when blending the result back into the original image. Defaults to 1.
+
+Supports the `keep_res` parg which will maintain the original resolution of the image.
\ No newline at end of file
diff --git a/docs/shortcodes/while.md b/docs/shortcodes/while.md
new file mode 100644
index 0000000..4823829
--- /dev/null
+++ b/docs/shortcodes/while.md
@@ -0,0 +1,28 @@
+Checks whether `variable` is equal to the given value, returning the content repeatedly until the condition is false. This can create an infinite loop if you're not careful.
+
+This shortcode also supports advanced expression syntax, e.g. `[while "some_var >= 5 and another_var < 2"]`. The following arguments are only relevant if you **don't** want to use advanced expressions:
+
+Supports the testing of multiple variables, e.g. `[while var_a=1 var_b=50 var_c="something"]`. If one or more variables return false, the loop ends.
+
+The optional `_any` argument will continue the loop if any of the provided conditions returns true.
+
+The optional `_not` argument allows you to test for false instead of true, e.g. `[while _not my_variable=1]` will continue the loop so long as `my_variable` does *not* equal 1.
+
+The optional `_is` argument allows you to specify the comparison logic for your arguments. Defaults to `==`, which simply checks for equality. Other options include `!=`, `>`, `>=`, `<` and `<=`. Example: `[while my_var="5" _is="<="]`
+
+```
+Advanced expression demo:
+[set my_var]3[/set]
+[while "my_var < 10"]
+ Output
+ [sets my_var="my_var + 1"]
+[/while]
+```
+
+```
+[set my_var]3[/set]
+[while my_var="10" _is="<"]
+ Output
+ [sets my_var="my_var + 1"]
+[/while]
+```
\ No newline at end of file
diff --git a/docs/shortcodes/zoom_enhance.md b/docs/shortcodes/zoom_enhance.md
new file mode 100644
index 0000000..f46513e
--- /dev/null
+++ b/docs/shortcodes/zoom_enhance.md
@@ -0,0 +1,61 @@
+Upscales a selected portion of an image via `[img2img]` and `[txt2mask]`, then pastes it seamlessly back onto the original.
+
+Greatly improves low-resolution details like faces and hands. It is significantly faster than Hires Fix and more flexible than the "Restore Faces" option.
+
+Supports the `_alt` parg which engages alternate processing. May help those who are having trouble with the shortcode, but is perhaps not fully compatible with ControlNet.
+
+Supports the `mask` keyword argument which is a region to search for within your image. Defaults to `face`. Note that if multiple non-contiguous regions are found, they will be processed independently.
+
+Supports the `replacement` keyword argument which is the prompt that will be used on the `mask` region via `[img2img]`. Defaults to `face`. If you're generating a specific character--say Walter White--you'll want to set `replacement` to a more specific value, like `walter white face`.
+
+Supports the `negative_replacement` keyword argument, which is the negative prompt that will be used on the mask region via `[img2img]`. Defaults to an empty string.
+
+Both `replacement` and `negative_replacement` support multiple, delimited search terms via `Unprompted.config.syntax.delimiter`.
+
+Supports the `inherit_negative` parg, which copies your main negative prompt to the `[img2img]` replacement task. If used in conjunction with `negative_replacement`, the replacement negative becomes: `main_negative_prompt negative_replacement_value`. If you have multiple, delimited `negative_replacement` values, your main negative prompt will be preprended to all of them.
+
+Supports the `background_mode` parg which will invert the class mask and disable the zoom_enhance step. In other words, you can use this when you want to replace the background instead of the subject. When using this mode, you will likely need to increase `mask_precision` to ~150 or so.
+
+Supports `mask_sort_method` which is used when multiple, non-contiguous masks are detected. Defaults to `left-to-right`. Options include: `left-to-right`, `right-to-left`, `top-to-bottom`, `bottom-to-top`, `big-to-small`, `small-to-big`, `unsorted`.
+
+Supports the `mode` keyword argument, which determines how the shortcode will interact with a pre-existing image mask. Defaults to `subtract`, which will remove your masked pixels from the shortcode's calculations. Options include: `add`, `subtract`, `discard`.
+
+Supports the `bypass_adaptive_hires` positional argument. By default, the shortcode will scale up some inference settings such as CFG scale and sharpness depending on the resolution of the init image. Include this argument to disable that behavior.
+
+Supports the `hires_size_max` keyword argument which is a hard limit on the size of the upscaled image, in order to avoid OOM errors. Defaults to 1024.
+
+Supports the `blur_size` keyword argument, which corresponds to the radius of the gaussian blur that will be applied to the mask of the upscaled image - this helps it blend seamlessly back into your original image. Defaults to `0.03`. Note: this is a float that is a percentage of the total canvas size; 0.03 means 3% of the total canvas.
+
+Supports the `sharpen_amount` argument, which is a float that determines the strength of the unsharp filter that is applied in post-processing.
+
+Supports the `denoising_max` keyword argument. The `[zoom_enhance]` shortcode is equipped with **dynamic denoising strength** based on a simple idea: the smaller the mask region, the higher denoise we should apply. This argument lets you set the upper limit of that feature.
+
+Supports the `mask_size_max` keyword argument. Defaults to `0.5`. If a mask region is determined to be greater than this value, it will not be processed by `[zoom_enhance]`. The reason is that large objects generally do not benefit from upscaling.
+
+Supports the `min_area` keyword argument. Defaults to `50`. If the pixel area of a mask is smaller than this, it may be a false-positive mask selection or at least not worth upscaling.
+
+Supports the `contour_padding` keyword argument. This is the radius in pixels to extend the mask region by. Defaults to `0`.
+
+Supports the `upscale_width` and `upscale_height` arguments. This is the resolution to use with `[img2img]` and should usually match the native resolution of your Stable Diffusion model. Defaults to `512` unless an SDXL model is loaded, in which case it defaults to `1024`.
+
+Supports the `include_original` positional argument. This will append the original, "non-zoom-enhanced" image to your output window. Useful for before-after comparisons.
+
+Supports the `upscale_method` and `downscale_method` arguments which determine the algorithms for image rescaling. Upscale defaults to `Nearest Neighbor`. Downscale defaults to `Lanczos`. Options include: `Nearest Neighbor`, `Box`, `Bilinear`, `Hamming`, `Bicubic`, `Lanczos`.
+
+Supports the `color_correction_method` argument which will attempt to match the color grading of the upscaled image to the original. Defaults to `none`. Options include: `none`,`mvgd`,`mkl`,`hm-mvgd-hm`,`hm-mkl-hm`.
+
+Supports the `color_correct_strength` argument which is an integer that determines how many times to run the color correction algorithm. Defaults to 1.
+
+Supports the `color_correct_timing` argument which determines when to run the color correction algorithm. Defaults to `pre`, which will run color correction before upscaling. Options include `pre` and `post`.
+
+Supports the `controlnet_preset` kwarg which is the name of a file in `templates/presets/controlnet` containing instructions for loading one more ControlNet units.
+
+Supports the experimental `use_starting_face` parg which will upscale the initial image's face as opposed to the resulting img2img's face. (Irrelevant in txt2img mode.)
+
+Supports the `debug` positional argument, which will output a series of images to your WebUI folder over the course of processing.
+
+Supports the `no_sync` parg which will prevent synchronization between your user variables and Stable Diffusion's `p` object at runtime. This may improve compatibility with other shortcodes or extensions.
+
+```
+[after][zoom_enhance][/after]
+```
\ No newline at end of file
diff --git a/images/posts/11.0.0/bodysnatcher.png b/images/posts/11.0.0/bodysnatcher.png
new file mode 100644
index 0000000000000000000000000000000000000000..5d3d9cba84e5666ce5e9a30bdd160024cc0f1bb9
GIT binary patch
literal 729422
zcmW)nc|4Tg`^L{0jGbiPhE%pf$-c}KeTYOwmeeSeEfhlHnO3AiDSM;ETA@fO%-FXq
zr6P*4i?R%5hR1V$zQ4a_=8u`zyq;w6&5NY2^sgrrUM{;|9V+tORG|7~m>S}G1n2Jx4Trho`shhCY
zF_nZd!BcPQ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