import os import json negative = "(worst quality, low quality:1.4), (bad-image-v2-39000:0.7), (bad_prompt_v2:0.8) (easyNegative:0.6)" sampler = "Euler a" steps = 35 scale = 7.0 clip_skip = 2 ENSSD = 0 embeddings = [ "https://huggingface.co/datasets/Nerfgun3/bad_prompt/resolve/main/bad_prompt_version2.pt", "https://huggingface.co/Xynon/models/resolve/main/experimentals/TI/bad-image-v2-39000.pt", "https://huggingface.co/datasets/gsdf/EasyNegative/resolve/main/EasyNegative.safetensors" ] models = [ "https://huggingface.co/Linaqruf/anything-v3.0/resolve/main/anything-v3-fp32-pruned.safetensors", "https://huggingface.co/admruul/anything-v3.0/resolve/main/Anything-V3.0.vae.pt", #"https://huggingface.co/m4gnett/any-pastel/resolve/main/AnyPastel-nsfw-test-fp16.safetensors", #"https://huggingface.co/andite/anything-v4.0/resolve/main/anything-v4.0.vae.pt", #"https://huggingface.co/syaimu/7th_Layer/resolve/main/7th_anime_v3/7th_anime_v3_C.safetensors", #"https://huggingface.co/DrBob2142/Midnight_Mixes/resolve/main/Midnight%20Mixer%20Melt.safetensors", # "https://huggingface.co/iZELX1/Grapefruit/resolve/main/lemon.safetensors", # "https://huggingface.co/iZELX1/Grapefruit/resolve/main/Grapefruit.vae.pt", ] loras = [ "https://huggingface.co/YoungMasterFromSect/Trauter_LoRAs/resolve/main/LoRA/Genshin-Impact/Yelan/Yelan_Hard.safetensors", ] os.system("git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui") os.chdir("stable-diffusion-webui") os.chdir("extensions") os.system('git clone "https://github.com/DominikDoom/a1111-sd-webui-tagcomplete.git"') os.chdir("../embeddings") os.system(f"wget {' '.join(embeddings)}") os.chdir("../models/Stable-diffusion") os.system(f"wget {' '.join(models)}") files = os.listdir() default_vae = [f for f in files if f.endswith(".vae.pt")] default_vae = default_vae[0] if default_vae else "None" default_model = [f for f in files if f.endswith(".safetensors") or f.endswith(".ckpt")][0] os.chdir("../..") os.makedirs("models/Lora") os.chdir("models/Lora") os.system(f"wget {' '.join(loras)}") os.chdir("../..") os.system("pip install -U -qq pip") os.system("pip install -qq -r requirements.txt") os.system("pip install -qq pytorch_lightning==1.7.7") os.system("pip install -U -qq fastapi==0.90.1") ui_config = { "txt2img/Prompt/visible": True, "txt2img/Prompt/value": "", "txt2img/Negative prompt/visible": True, "txt2img/Negative prompt/value": negative, "txt2img/Style 1/visible": True, "txt2img/Style 1/value": "None", "txt2img/Style 2/visible": True, "txt2img/Style 2/value": "None", "txt2img/Sampling method/visible": True, "txt2img/Sampling method/value": sampler, "txt2img/Sampling steps/visible": True, "txt2img/Sampling steps/value": steps, "txt2img/Sampling steps/minimum": 1, "txt2img/Sampling steps/maximum": 150, "txt2img/Sampling steps/step": 1, "txt2img/Width/visible": True, "txt2img/Width/value": 512, "txt2img/Width/minimum": 64, "txt2img/Width/maximum": 2048, "txt2img/Width/step": 8, "txt2img/Height/visible": True, "txt2img/Height/value": 768, "txt2img/Height/minimum": 64, "txt2img/Height/maximum": 2048, "txt2img/Height/step": 8, "txt2img/Batch count/visible": True, "txt2img/Batch count/value": 1, "txt2img/Batch count/minimum": 1, "txt2img/Batch count/maximum": 100, "txt2img/Batch count/step": 1, "txt2img/Batch size/visible": True, "txt2img/Batch size/value": 1, "txt2img/Batch size/minimum": 1, "txt2img/Batch size/maximum": 8, "txt2img/Batch size/step": 1, "txt2img/CFG Scale/visible": True, "txt2img/CFG Scale/value": scale, "txt2img/CFG Scale/minimum": 1.0, "txt2img/CFG Scale/maximum": 30.0, "txt2img/CFG Scale/step": 0.5, "txt2img/Seed/visible": True, "txt2img/Seed/value": -1.0, "txt2img/Extra/visible": True, "txt2img/Extra/value": False, "txt2img/Variation seed/visible": True, "txt2img/Variation seed/value": -1.0, "txt2img/Variation strength/visible": True, "txt2img/Variation strength/value": 0.0, "txt2img/Variation strength/minimum": 0, "txt2img/Variation strength/maximum": 1, "txt2img/Variation strength/step": 0.01, "txt2img/Resize seed from width/visible": True, "txt2img/Resize seed from width/value": 0, "txt2img/Resize seed from width/minimum": 0, "txt2img/Resize seed from width/maximum": 2048, "txt2img/Resize seed from width/step": 8, "txt2img/Resize seed from height/visible": True, "txt2img/Resize seed from height/value": 0, "txt2img/Resize seed from height/minimum": 0, "txt2img/Resize seed from height/maximum": 2048, "txt2img/Resize seed from height/step": 8, "txt2img/Restore faces/visible": True, "txt2img/Restore faces/value": False, "txt2img/Tiling/visible": True, "txt2img/Tiling/value": False, "txt2img/Hires. fix/visible": True, "txt2img/Hires. fix/value": False, "txt2img/Upscaler/visible": True, "txt2img/Upscaler/value": "Latent", "txt2img/Hires steps/visible": True, "txt2img/Hires steps/value": 0, "txt2img/Hires steps/minimum": 0, "txt2img/Hires steps/maximum": 150, "txt2img/Hires steps/step": 1, "txt2img/Denoising strength/visible": True, "txt2img/Denoising strength/value": 0.7, "txt2img/Denoising strength/minimum": 0.0, "txt2img/Denoising strength/maximum": 1.0, "txt2img/Denoising strength/step": 0.01, "txt2img/Upscale by/visible": True, "txt2img/Upscale by/value": 2.0, "txt2img/Upscale by/minimum": 1.0, "txt2img/Upscale by/maximum": 4.0, "txt2img/Upscale by/step": 0.05, "txt2img/Resize width to/visible": True, "txt2img/Resize width to/value": 0, "txt2img/Resize width to/minimum": 0, "txt2img/Resize width to/maximum": 2048, "txt2img/Resize width to/step": 8, "txt2img/Resize height to/visible": True, "txt2img/Resize height to/value": 0, "txt2img/Resize height to/minimum": 0, "txt2img/Resize height to/maximum": 2048, "txt2img/Resize height to/step": 8, "txt2img/Script/visible": True, "txt2img/Script/value": "None", "customscript/prompt_matrix.py/txt2img/Put variable parts at start of prompt/visible": True, "customscript/prompt_matrix.py/txt2img/Put variable parts at start of prompt/value": False, "customscript/prompt_matrix.py/txt2img/Use different seed for each picture/visible": True, "customscript/prompt_matrix.py/txt2img/Use different seed for each picture/value": False, "customscript/prompts_from_file.py/txt2img/Iterate seed every line/visible": True, "customscript/prompts_from_file.py/txt2img/Iterate seed every line/value": False, "customscript/prompts_from_file.py/txt2img/Use same random seed for all lines/visible": True, "customscript/prompts_from_file.py/txt2img/Use same random seed for all lines/value": False, "customscript/prompts_from_file.py/txt2img/List of prompt inputs/visible": True, "customscript/prompts_from_file.py/txt2img/List of prompt inputs/value": "", "customscript/xy_grid.py/txt2img/X type/visible": True, "customscript/xy_grid.py/txt2img/X type/value": "Seed", "customscript/xy_grid.py/txt2img/X values/visible": True, "customscript/xy_grid.py/txt2img/X values/value": "", "customscript/xy_grid.py/txt2img/Y type/visible": True, "customscript/xy_grid.py/txt2img/Y type/value": "Nothing", "customscript/xy_grid.py/txt2img/Y values/visible": True, "customscript/xy_grid.py/txt2img/Y values/value": "", "customscript/xy_grid.py/txt2img/Draw legend/visible": True, "customscript/xy_grid.py/txt2img/Draw legend/value": True, "customscript/xy_grid.py/txt2img/Include Separate Images/visible": True, "customscript/xy_grid.py/txt2img/Include Separate Images/value": False, "customscript/xy_grid.py/txt2img/Keep -1 for seeds/visible": True, "customscript/xy_grid.py/txt2img/Keep -1 for seeds/value": False, "img2img/Prompt/visible": True, "img2img/Prompt/value": "", "img2img/Negative prompt/visible": True, "img2img/Negative prompt/value": "", "img2img/Style 1/visible": True, "img2img/Style 1/value": "None", "img2img/Style 2/visible": True, "img2img/Style 2/value": "None", "img2img/Input directory/visible": True, "img2img/Input directory/value": "", "img2img/Output directory/visible": True, "img2img/Output directory/value": "", "img2img/Resize mode/visible": True, "img2img/Resize mode/value": "Just resize", "img2img/Mask blur/visible": True, "img2img/Mask blur/value": 4, "img2img/Mask blur/minimum": 0, "img2img/Mask blur/maximum": 64, "img2img/Mask blur/step": 1, "img2img/Mask transparency/value": 0, "img2img/Mask transparency/minimum": 0, "img2img/Mask transparency/maximum": 100, "img2img/Mask transparency/step": 1, "img2img/Mask mode/visible": True, "img2img/Mask mode/value": "Inpaint masked", "img2img/Masked content/visible": True, "img2img/Masked content/value": "original", "img2img/Inpaint area/visible": True, "img2img/Inpaint area/value": "Whole picture", "img2img/Only masked padding, pixels/visible": True, "img2img/Only masked padding, pixels/value": 32, "img2img/Only masked padding, pixels/minimum": 0, "img2img/Only masked padding, pixels/maximum": 256, "img2img/Only masked padding, pixels/step": 4, "img2img/Sampling method/visible": True, "img2img/Sampling method/value": "Euler a", "img2img/Sampling steps/visible": True, "img2img/Sampling steps/value": 20, "img2img/Sampling steps/minimum": 1, "img2img/Sampling steps/maximum": 150, "img2img/Sampling steps/step": 1, "img2img/Width/visible": True, "img2img/Width/value": 512, "img2img/Width/minimum": 64, "img2img/Width/maximum": 2048, "img2img/Width/step": 8, "img2img/Height/visible": True, "img2img/Height/value": 512, "img2img/Height/minimum": 64, "img2img/Height/maximum": 2048, "img2img/Height/step": 8, "img2img/Batch count/visible": True, "img2img/Batch count/value": 1, "img2img/Batch count/minimum": 1, "img2img/Batch count/maximum": 100, "img2img/Batch count/step": 1, "img2img/Batch size/visible": True, "img2img/Batch size/value": 1, "img2img/Batch size/minimum": 1, "img2img/Batch size/maximum": 8, "img2img/Batch size/step": 1, "img2img/CFG Scale/visible": True, "img2img/CFG Scale/value": 7.0, "img2img/CFG Scale/minimum": 1.0, "img2img/CFG Scale/maximum": 30.0, "img2img/CFG Scale/step": 0.5, "img2img/Denoising strength/visible": True, "img2img/Denoising strength/value": 0.75, "img2img/Denoising strength/minimum": 0.0, "img2img/Denoising strength/maximum": 1.0, "img2img/Denoising strength/step": 0.01, "img2img/Seed/visible": True, "img2img/Seed/value": -1.0, "img2img/Extra/visible": True, "img2img/Extra/value": False, "img2img/Variation seed/visible": True, "img2img/Variation seed/value": -1.0, "img2img/Variation strength/visible": True, "img2img/Variation strength/value": 0.0, "img2img/Variation strength/minimum": 0, "img2img/Variation strength/maximum": 1, "img2img/Variation strength/step": 0.01, "img2img/Resize seed from width/visible": True, "img2img/Resize seed from width/value": 0, "img2img/Resize seed from width/minimum": 0, "img2img/Resize seed from width/maximum": 2048, "img2img/Resize seed from width/step": 8, "img2img/Resize seed from height/visible": True, "img2img/Resize seed from height/value": 0, "img2img/Resize seed from height/minimum": 0, "img2img/Resize seed from height/maximum": 2048, "img2img/Resize seed from height/step": 8, "img2img/Restore faces/visible": True, "img2img/Restore faces/value": False, "img2img/Tiling/visible": True, "img2img/Tiling/value": False, "img2img/Script/visible": True, "img2img/Script/value": "None", "customscript/img2imgalt.py/img2img/Override `Sampling method` to Euler?(this method is built for it)/visible": True, "customscript/img2imgalt.py/img2img/Override `Sampling method` to Euler?(this method is built for it)/value": True, "customscript/img2imgalt.py/img2img/Override `prompt` to the same value as `original prompt`?(and `negative prompt`)/visible": True, "customscript/img2imgalt.py/img2img/Override `prompt` to the same value as `original prompt`?(and `negative prompt`)/value": True, "customscript/img2imgalt.py/img2img/Original prompt/visible": True, "customscript/img2imgalt.py/img2img/Original prompt/value": "", "customscript/img2imgalt.py/img2img/Original negative prompt/visible": True, "customscript/img2imgalt.py/img2img/Original negative prompt/value": "", "customscript/img2imgalt.py/img2img/Override `Sampling Steps` to the same value as `Decode steps`?/visible": True, "customscript/img2imgalt.py/img2img/Override `Sampling Steps` to the same value as `Decode steps`?/value": True, "customscript/img2imgalt.py/img2img/Decode steps/visible": True, "customscript/img2imgalt.py/img2img/Decode steps/value": 50, "customscript/img2imgalt.py/img2img/Decode steps/minimum": 1, "customscript/img2imgalt.py/img2img/Decode steps/maximum": 150, "customscript/img2imgalt.py/img2img/Decode steps/step": 1, "customscript/img2imgalt.py/img2img/Override `Denoising strength` to 1?/visible": True, "customscript/img2imgalt.py/img2img/Override `Denoising strength` to 1?/value": True, "customscript/img2imgalt.py/img2img/Decode CFG scale/visible": True, "customscript/img2imgalt.py/img2img/Decode CFG scale/value": 1.0, "customscript/img2imgalt.py/img2img/Decode CFG scale/minimum": 0.0, "customscript/img2imgalt.py/img2img/Decode CFG scale/maximum": 15.0, "customscript/img2imgalt.py/img2img/Decode CFG scale/step": 0.1, "customscript/img2imgalt.py/img2img/Randomness/visible": True, "customscript/img2imgalt.py/img2img/Randomness/value": 0.0, "customscript/img2imgalt.py/img2img/Randomness/minimum": 0.0, "customscript/img2imgalt.py/img2img/Randomness/maximum": 1.0, "customscript/img2imgalt.py/img2img/Randomness/step": 0.01, "customscript/img2imgalt.py/img2img/Sigma adjustment for finding noise for image/visible": True, "customscript/img2imgalt.py/img2img/Sigma adjustment for finding noise for image/value": False, "customscript/loopback.py/img2img/Loops/visible": True, "customscript/loopback.py/img2img/Loops/value": 4, "customscript/loopback.py/img2img/Loops/minimum": 1, "customscript/loopback.py/img2img/Loops/maximum": 32, "customscript/loopback.py/img2img/Loops/step": 1, "customscript/loopback.py/img2img/Denoising strength change factor/visible": True, "customscript/loopback.py/img2img/Denoising strength change factor/value": 1, "customscript/loopback.py/img2img/Denoising strength change factor/minimum": 0.9, "customscript/loopback.py/img2img/Denoising strength change factor/maximum": 1.1, "customscript/loopback.py/img2img/Denoising strength change factor/step": 0.01, "customscript/outpainting_mk_2.py/img2img/Pixels to expand/visible": True, "customscript/outpainting_mk_2.py/img2img/Pixels to expand/value": 128, "customscript/outpainting_mk_2.py/img2img/Pixels to expand/minimum": 8, "customscript/outpainting_mk_2.py/img2img/Pixels to expand/maximum": 256, "customscript/outpainting_mk_2.py/img2img/Pixels to expand/step": 8, "customscript/outpainting_mk_2.py/img2img/Mask blur/visible": True, "customscript/outpainting_mk_2.py/img2img/Mask blur/value": 8, "customscript/outpainting_mk_2.py/img2img/Mask blur/minimum": 0, "customscript/outpainting_mk_2.py/img2img/Mask blur/maximum": 64, "customscript/outpainting_mk_2.py/img2img/Mask blur/step": 1, "customscript/outpainting_mk_2.py/img2img/Fall-off exponent (lower=higher detail)/visible": True, "customscript/outpainting_mk_2.py/img2img/Fall-off exponent (lower=higher detail)/value": 1.0, "customscript/outpainting_mk_2.py/img2img/Fall-off exponent (lower=higher detail)/minimum": 0.0, "customscript/outpainting_mk_2.py/img2img/Fall-off exponent (lower=higher detail)/maximum": 4.0, "customscript/outpainting_mk_2.py/img2img/Fall-off exponent (lower=higher detail)/step": 0.01, "customscript/outpainting_mk_2.py/img2img/Color variation/visible": True, "customscript/outpainting_mk_2.py/img2img/Color variation/value": 0.05, "customscript/outpainting_mk_2.py/img2img/Color variation/minimum": 0.0, "customscript/outpainting_mk_2.py/img2img/Color variation/maximum": 1.0, "customscript/outpainting_mk_2.py/img2img/Color variation/step": 0.01, "customscript/poor_mans_outpainting.py/img2img/Pixels to expand/visible": True, "customscript/poor_mans_outpainting.py/img2img/Pixels to expand/value": 128, "customscript/poor_mans_outpainting.py/img2img/Pixels to expand/minimum": 8, "customscript/poor_mans_outpainting.py/img2img/Pixels to expand/maximum": 256, "customscript/poor_mans_outpainting.py/img2img/Pixels to expand/step": 8, "customscript/poor_mans_outpainting.py/img2img/Mask blur/visible": True, "customscript/poor_mans_outpainting.py/img2img/Mask blur/value": 4, "customscript/poor_mans_outpainting.py/img2img/Mask blur/minimum": 0, "customscript/poor_mans_outpainting.py/img2img/Mask blur/maximum": 64, "customscript/poor_mans_outpainting.py/img2img/Mask blur/step": 1, "customscript/poor_mans_outpainting.py/img2img/Masked content/visible": True, "customscript/poor_mans_outpainting.py/img2img/Masked content/value": "fill", "customscript/prompt_matrix.py/img2img/Put variable parts at start of prompt/visible": True, "customscript/prompt_matrix.py/img2img/Put variable parts at start of prompt/value": False, "customscript/prompt_matrix.py/img2img/Use different seed for each picture/visible": True, "customscript/prompt_matrix.py/img2img/Use different seed for each picture/value": False, "customscript/prompts_from_file.py/img2img/Iterate seed every line/visible": True, "customscript/prompts_from_file.py/img2img/Iterate seed every line/value": False, "customscript/prompts_from_file.py/img2img/Use same random seed for all lines/visible": True, "customscript/prompts_from_file.py/img2img/Use same random seed for all lines/value": False, "customscript/prompts_from_file.py/img2img/List of prompt inputs/visible": True, "customscript/prompts_from_file.py/img2img/List of prompt inputs/value": "", "customscript/sd_upscale.py/img2img/Tile overlap/visible": True, "customscript/sd_upscale.py/img2img/Tile overlap/value": 64, "customscript/sd_upscale.py/img2img/Tile overlap/minimum": 0, "customscript/sd_upscale.py/img2img/Tile overlap/maximum": 256, "customscript/sd_upscale.py/img2img/Tile overlap/step": 16, "customscript/sd_upscale.py/img2img/Scale Factor/visible": True, "customscript/sd_upscale.py/img2img/Scale Factor/value": 2.0, "customscript/sd_upscale.py/img2img/Scale Factor/minimum": 1.0, "customscript/sd_upscale.py/img2img/Scale Factor/maximum": 4.0, "customscript/sd_upscale.py/img2img/Scale Factor/step": 0.05, "customscript/sd_upscale.py/img2img/Upscaler/visible": True, "customscript/sd_upscale.py/img2img/Upscaler/value": "None", "customscript/xy_grid.py/img2img/X type/visible": True, "customscript/xy_grid.py/img2img/X type/value": "Seed", "customscript/xy_grid.py/img2img/X values/visible": True, "customscript/xy_grid.py/img2img/X values/value": "", "customscript/xy_grid.py/img2img/Y type/visible": True, "customscript/xy_grid.py/img2img/Y type/value": "Nothing", "customscript/xy_grid.py/img2img/Y values/visible": True, "customscript/xy_grid.py/img2img/Y values/value": "", "customscript/xy_grid.py/img2img/Draw legend/visible": True, "customscript/xy_grid.py/img2img/Draw legend/value": True, "customscript/xy_grid.py/img2img/Include Separate Images/visible": True, "customscript/xy_grid.py/img2img/Include Separate Images/value": False, "customscript/xy_grid.py/img2img/Keep -1 for seeds/visible": True, "customscript/xy_grid.py/img2img/Keep -1 for seeds/value": False, "extras/Input directory/visible": True, "extras/Input directory/value": "", "extras/Output directory/visible": True, "extras/Output directory/value": "", "extras/Show result images/visible": True, "extras/Show result images/value": True, "extras/Resize/visible": True, "extras/Resize/value": 4, "extras/Resize/minimum": 1.0, "extras/Resize/maximum": 8.0, "extras/Resize/step": 0.05, "extras/Width/visible": True, "extras/Width/value": 512, "extras/Height/visible": True, "extras/Height/value": 512, "extras/Crop to fit/visible": True, "extras/Crop to fit/value": True, "extras/Upscaler 1/visible": True, "extras/Upscaler 1/value": "None", "extras/Upscaler 2/visible": True, "extras/Upscaler 2/value": "None", "extras/Upscaler 2 visibility/visible": True, "extras/Upscaler 2 visibility/value": 1, "extras/Upscaler 2 visibility/minimum": 0.0, "extras/Upscaler 2 visibility/maximum": 1.0, "extras/Upscaler 2 visibility/step": 0.001, "extras/GFPGAN visibility/visible": True, "extras/GFPGAN visibility/value": 0, "extras/GFPGAN visibility/minimum": 0.0, "extras/GFPGAN visibility/maximum": 1.0, "extras/GFPGAN visibility/step": 0.001, "extras/CodeFormer visibility/visible": True, "extras/CodeFormer visibility/value": 0, "extras/CodeFormer visibility/minimum": 0.0, "extras/CodeFormer visibility/maximum": 1.0, "extras/CodeFormer visibility/step": 0.001, "extras/CodeFormer weight (0 = maximum effect, 1 = minimum effect)/visible": True, "extras/CodeFormer weight (0 = maximum effect, 1 = minimum effect)/value": 0, "extras/CodeFormer weight (0 = maximum effect, 1 = minimum effect)/minimum": 0.0, "extras/CodeFormer weight (0 = maximum effect, 1 = minimum effect)/maximum": 1.0, "extras/CodeFormer weight (0 = maximum effect, 1 = minimum effect)/step": 0.001, "extras/Upscale Before Restoring Faces/visible": True, "extras/Upscale Before Restoring Faces/value": False, "modelmerger/Primary model (A)/visible": True, "modelmerger/Primary model (A)/value": None, "modelmerger/Secondary model (B)/visible": True, "modelmerger/Secondary model (B)/value": None, "modelmerger/Tertiary model (C)/visible": True, "modelmerger/Tertiary model (C)/value": None, "modelmerger/Custom Name (Optional)/visible": True, "modelmerger/Custom Name (Optional)/value": "", "modelmerger/Multiplier (M) - set to 0 to get model A/visible": True, "modelmerger/Multiplier (M) - set to 0 to get model A/value": 0.3, "modelmerger/Multiplier (M) - set to 0 to get model A/minimum": 0.0, "modelmerger/Multiplier (M) - set to 0 to get model A/maximum": 1.0, "modelmerger/Multiplier (M) - set to 0 to get model A/step": 0.05, "modelmerger/Interpolation Method/visible": True, "modelmerger/Interpolation Method/value": "Weighted sum", "modelmerger/Checkpoint format/visible": True, "modelmerger/Checkpoint format/value": "ckpt", "modelmerger/Save as float16/visible": True, "modelmerger/Save as float16/value": False, "modelmerger/Copy config from/visible": True, "modelmerger/Copy config from/value": "A, B or C", "train/Name/visible": True, "train/Name/value": "", "train/Initialization text/visible": True, "train/Initialization text/value": "*", "train/Number of vectors per token/visible": True, "train/Number of vectors per token/value": 1, "train/Number of vectors per token/minimum": 1, "train/Number of vectors per token/maximum": 75, "train/Number of vectors per token/step": 1, "train/Overwrite Old Embedding/visible": True, "train/Overwrite Old Embedding/value": False, "train/Enter hypernetwork layer structure/visible": True, "train/Enter hypernetwork layer structure/value": "1, 2, 1", "train/Select activation function of hypernetwork. Recommended : Swish / Linear(none)/visible": True, "train/Select activation function of hypernetwork. Recommended : Swish / Linear(none)/value": "linear", "train/Select Layer weights initialization. Recommended: Kaiming for relu-like, Xavier for sigmoid-like, Normal otherwise/visible": True, "train/Select Layer weights initialization. Recommended: Kaiming for relu-like, Xavier for sigmoid-like, Normal otherwise/value": "Normal", "train/Add layer normalization/visible": True, "train/Add layer normalization/value": False, "train/Use dropout/visible": True, "train/Use dropout/value": False, "train/Enter hypernetwork Dropout structure (or empty). Recommended : 0~0.35 incrementing sequence: 0, 0.05, 0.15/visible": True, "train/Enter hypernetwork Dropout structure (or empty). Recommended : 0~0.35 incrementing sequence: 0, 0.05, 0.15/value": "0, 0, 0", "train/Overwrite Old Hypernetwork/visible": True, "train/Overwrite Old Hypernetwork/value": False, "train/Source directory/visible": True, "train/Source directory/value": "", "train/Destination directory/visible": True, "train/Destination directory/value": "", "train/Width/visible": True, "train/Width/value": 512, "train/Width/minimum": 64, "train/Width/maximum": 2048, "train/Width/step": 8, "train/Height/visible": True, "train/Height/value": 512, "train/Height/minimum": 64, "train/Height/maximum": 2048, "train/Height/step": 8, "train/Existing Caption txt Action/visible": True, "train/Existing Caption txt Action/value": "ignore", "train/Create flipped copies/visible": True, "train/Create flipped copies/value": False, "train/Split oversized images/visible": True, "train/Split oversized images/value": False, "train/Auto focal point crop/visible": True, "train/Auto focal point crop/value": False, "train/Use BLIP for caption/visible": True, "train/Use BLIP for caption/value": False, "train/Use deepbooru for caption/visible": True, "train/Use deepbooru for caption/value": False, "train/Split image threshold/visible": True, "train/Split image threshold/value": 0.5, "train/Split image threshold/minimum": 0.0, "train/Split image threshold/maximum": 1.0, "train/Split image threshold/step": 0.05, "train/Split image overlap ratio/visible": True, "train/Split image overlap ratio/value": 0.2, "train/Split image overlap ratio/minimum": 0.0, "train/Split image overlap ratio/maximum": 0.9, "train/Split image overlap ratio/step": 0.05, "train/Focal point face weight/visible": True, "train/Focal point face weight/value": 0.9, "train/Focal point face weight/minimum": 0.0, "train/Focal point face weight/maximum": 1.0, "train/Focal point face weight/step": 0.05, "train/Focal point entropy weight/visible": True, "train/Focal point entropy weight/value": 0.15, "train/Focal point entropy weight/minimum": 0.0, "train/Focal point entropy weight/maximum": 1.0, "train/Focal point entropy weight/step": 0.05, "train/Focal point edges weight/visible": True, "train/Focal point edges weight/value": 0.5, "train/Focal point edges weight/minimum": 0.0, "train/Focal point edges weight/maximum": 1.0, "train/Focal point edges weight/step": 0.05, "train/Create debug image/visible": True, "train/Create debug image/value": False, "train/Embedding/visible": True, "train/Embedding/value": None, "train/Hypernetwork/visible": True, "train/Hypernetwork/value": None, "train/Embedding Learning rate/visible": True, "train/Embedding Learning rate/value": "0.005", "train/Hypernetwork Learning rate/visible": True, "train/Hypernetwork Learning rate/value": "0.00001", "train/Gradient Clipping/visible": True, "train/Gradient Clipping/value": "disabled", "train/Batch size/visible": True, "train/Batch size/value": 1, "train/Gradient accumulation steps/visible": True, "train/Gradient accumulation steps/value": 1, "train/Dataset directory/visible": True, "train/Dataset directory/value": "", "train/Log directory/visible": True, "train/Log directory/value": "textual_inversion", "train/Prompt template/visible": True, "train/Prompt template/value": "style_filewords.txt", "train/Do not resize images/visible": True, "train/Do not resize images/value": False, "train/Max steps/visible": True, "train/Max steps/value": 100000, "train/Save an image to log directory every N steps, 0 to disable/visible": True, "train/Save an image to log directory every N steps, 0 to disable/value": 500, "train/Save a copy of embedding to log directory every N steps, 0 to disable/visible": True, "train/Save a copy of embedding to log directory every N steps, 0 to disable/value": 500, "train/Save images with embedding in PNG chunks/visible": True, "train/Save images with embedding in PNG chunks/value": True, "train/Read parameters (prompt, etc...) from txt2img tab when making previews/visible": True, "train/Read parameters (prompt, etc...) from txt2img tab when making previews/value": False, "train/Shuffle tags by ',' when creating prompts./visible": True, "train/Shuffle tags by ',' when creating prompts./value": False, "train/Drop out tags when creating prompts./visible": True, "train/Drop out tags when creating prompts./value": 0, "train/Drop out tags when creating prompts./minimum": 0, "train/Drop out tags when creating prompts./maximum": 1, "train/Drop out tags when creating prompts./step": 0.1, "train/Choose latent sampling method/visible": True, "train/Choose latent sampling method/value": "once", "txt2img/Sampling Steps/visible": True, "txt2img/Sampling Steps/value": 20, "txt2img/Sampling Steps/minimum": 1, "txt2img/Sampling Steps/maximum": 150, "txt2img/Sampling Steps/step": 1, "txt2img/Highres. fix/visible": True, "txt2img/Highres. fix/value": False, "txt2img/Firstpass width/visible": True, "txt2img/Firstpass width/value": 0, "txt2img/Firstpass width/minimum": 0, "txt2img/Firstpass width/maximum": 1024, "txt2img/Firstpass width/step": 8, "txt2img/Firstpass height/visible": True, "txt2img/Firstpass height/value": 0, "txt2img/Firstpass height/minimum": 0, "txt2img/Firstpass height/maximum": 1024, "txt2img/Firstpass height/step": 8, "txt2img/New preset name/visible": True, "txt2img/New preset name/value": "", "txt2img/Make Zip when Save?/visible": True, "txt2img/Make Zip when Save?/value": False, "img2img/Masking mode/visible": True, "img2img/Masking mode/value": "Inpaint masked", "img2img/Inpaint at full resolution/visible": True, "img2img/Inpaint at full resolution/value": False, "img2img/Inpaint at full resolution padding, pixels/visible": True, "img2img/Inpaint at full resolution padding, pixels/value": 32, "img2img/Inpaint at full resolution padding, pixels/minimum": 0, "img2img/Inpaint at full resolution padding, pixels/maximum": 256, "img2img/Inpaint at full resolution padding, pixels/step": 4, "img2img/Sampling Steps/visible": True, "img2img/Sampling Steps/value": 20, "img2img/Sampling Steps/minimum": 1, "img2img/Sampling Steps/maximum": 150, "img2img/Sampling Steps/step": 1, "img2img/New preset name/visible": True, "img2img/New preset name/value": "", "img2img/Make Zip when Save?/visible": True, "img2img/Make Zip when Save?/value": False, "txt2img/Styles/visible": True, "txt2img/Styles/value": [], "txt2img/Override settings/value": None, "customscript/xyz_grid.py/txt2img/X type/visible": True, "customscript/xyz_grid.py/txt2img/X type/value": "Seed", "customscript/xyz_grid.py/txt2img/X values/visible": True, "customscript/xyz_grid.py/txt2img/X values/value": "", "customscript/xyz_grid.py/txt2img/Y type/visible": True, "customscript/xyz_grid.py/txt2img/Y type/value": "Nothing", "customscript/xyz_grid.py/txt2img/Y values/visible": True, "customscript/xyz_grid.py/txt2img/Y values/value": "", "customscript/xyz_grid.py/txt2img/Z type/visible": True, "customscript/xyz_grid.py/txt2img/Z type/value": "Nothing", "customscript/xyz_grid.py/txt2img/Z values/visible": True, "customscript/xyz_grid.py/txt2img/Z values/value": "", "customscript/xyz_grid.py/txt2img/Draw legend/visible": True, "customscript/xyz_grid.py/txt2img/Draw legend/value": True, "customscript/xyz_grid.py/txt2img/Include Sub Images/visible": True, "customscript/xyz_grid.py/txt2img/Include Sub Images/value": False, "customscript/xyz_grid.py/txt2img/Include Sub Grids/visible": True, "customscript/xyz_grid.py/txt2img/Include Sub Grids/value": False, "customscript/xyz_grid.py/txt2img/Keep -1 for seeds/visible": True, "customscript/xyz_grid.py/txt2img/Keep -1 for seeds/value": False, "img2img/Styles/visible": True, "img2img/Styles/value": [], "img2img/Inpaint batch mask directory (required for inpaint batch processing only)/visible": True, "img2img/Inpaint batch mask directory (required for inpaint batch processing only)/value": "", "img2img/Override settings/value": None, "customscript/xyz_grid.py/img2img/X type/visible": True, "customscript/xyz_grid.py/img2img/X type/value": "Seed", "customscript/xyz_grid.py/img2img/X values/visible": True, "customscript/xyz_grid.py/img2img/X values/value": "", "customscript/xyz_grid.py/img2img/Y type/visible": True, "customscript/xyz_grid.py/img2img/Y type/value": "Nothing", "customscript/xyz_grid.py/img2img/Y values/visible": True, "customscript/xyz_grid.py/img2img/Y values/value": "", "customscript/xyz_grid.py/img2img/Z type/visible": True, "customscript/xyz_grid.py/img2img/Z type/value": "Nothing", "customscript/xyz_grid.py/img2img/Z values/visible": True, "customscript/xyz_grid.py/img2img/Z values/value": "", "customscript/xyz_grid.py/img2img/Draw legend/visible": True, "customscript/xyz_grid.py/img2img/Draw legend/value": True, "customscript/xyz_grid.py/img2img/Include Sub Images/visible": True, "customscript/xyz_grid.py/img2img/Include Sub Images/value": False, "customscript/xyz_grid.py/img2img/Include Sub Grids/visible": True, "customscript/xyz_grid.py/img2img/Include Sub Grids/value": False, "customscript/xyz_grid.py/img2img/Keep -1 for seeds/visible": True, "customscript/xyz_grid.py/img2img/Keep -1 for seeds/value": False, "customscript/postprocessing_upscale.py/extras/Resize/visible": True, "customscript/postprocessing_upscale.py/extras/Resize/value": 4, "customscript/postprocessing_upscale.py/extras/Resize/minimum": 1.0, "customscript/postprocessing_upscale.py/extras/Resize/maximum": 8.0, "customscript/postprocessing_upscale.py/extras/Resize/step": 0.05, "customscript/postprocessing_upscale.py/extras/Width/visible": True, "customscript/postprocessing_upscale.py/extras/Width/value": 512, "customscript/postprocessing_upscale.py/extras/Height/visible": True, "customscript/postprocessing_upscale.py/extras/Height/value": 512, "customscript/postprocessing_upscale.py/extras/Crop to fit/visible": True, "customscript/postprocessing_upscale.py/extras/Crop to fit/value": True, "customscript/postprocessing_upscale.py/extras/Upscaler 1/visible": True, "customscript/postprocessing_upscale.py/extras/Upscaler 1/value": "None", "customscript/postprocessing_upscale.py/extras/Upscaler 2/visible": True, "customscript/postprocessing_upscale.py/extras/Upscaler 2/value": "None", "customscript/postprocessing_upscale.py/extras/Upscaler 2 visibility/visible": True, "customscript/postprocessing_upscale.py/extras/Upscaler 2 visibility/value": 0.0, "customscript/postprocessing_upscale.py/extras/Upscaler 2 visibility/minimum": 0.0, "customscript/postprocessing_upscale.py/extras/Upscaler 2 visibility/maximum": 1.0, "customscript/postprocessing_upscale.py/extras/Upscaler 2 visibility/step": 0.001, "customscript/postprocessing_gfpgan.py/extras/GFPGAN visibility/visible": True, "customscript/postprocessing_gfpgan.py/extras/GFPGAN visibility/value": 0, "customscript/postprocessing_gfpgan.py/extras/GFPGAN visibility/minimum": 0.0, "customscript/postprocessing_gfpgan.py/extras/GFPGAN visibility/maximum": 1.0, "customscript/postprocessing_gfpgan.py/extras/GFPGAN visibility/step": 0.001, "customscript/postprocessing_codeformer.py/extras/CodeFormer visibility/visible": True, "customscript/postprocessing_codeformer.py/extras/CodeFormer visibility/value": 0, "customscript/postprocessing_codeformer.py/extras/CodeFormer visibility/minimum": 0.0, "customscript/postprocessing_codeformer.py/extras/CodeFormer visibility/maximum": 1.0, "customscript/postprocessing_codeformer.py/extras/CodeFormer visibility/step": 0.001, "customscript/postprocessing_codeformer.py/extras/CodeFormer weight (0 = maximum effect, 1 = minimum effect)/visible": True, "customscript/postprocessing_codeformer.py/extras/CodeFormer weight (0 = maximum effect, 1 = minimum effect)/value": 0, "customscript/postprocessing_codeformer.py/extras/CodeFormer weight (0 = maximum effect, 1 = minimum effect)/minimum": 0.0, "customscript/postprocessing_codeformer.py/extras/CodeFormer weight (0 = maximum effect, 1 = minimum effect)/maximum": 1.0, "customscript/postprocessing_codeformer.py/extras/CodeFormer weight (0 = maximum effect, 1 = minimum effect)/step": 0.001, "modelmerger/Bake in VAE/visible": True, "modelmerger/Bake in VAE/value": "None", "modelmerger/Discard weights with matching name/visible": True, "modelmerger/Discard weights with matching name/value": "", "train/Auto-sized crop/visible": True, "train/Auto-sized crop/value": False, "train/Dimension lower bound/visible": True, "train/Dimension lower bound/value": 384, "train/Dimension lower bound/minimum": 64, "train/Dimension lower bound/maximum": 2048, "train/Dimension lower bound/step": 8, "train/Dimension upper bound/visible": True, "train/Dimension upper bound/value": 768, "train/Dimension upper bound/minimum": 64, "train/Dimension upper bound/maximum": 2048, "train/Dimension upper bound/step": 8, "train/Area lower bound/visible": True, "train/Area lower bound/value": 4096, "train/Area lower bound/minimum": 4096, "train/Area lower bound/maximum": 4194304, "train/Area lower bound/step": 1, "train/Area upper bound/visible": True, "train/Area upper bound/value": 409600, "train/Area upper bound/minimum": 4096, "train/Area upper bound/maximum": 4194304, "train/Area upper bound/step": 1, "train/Resizing objective/visible": True, "train/Resizing objective/value": "Maximize area", "train/Error threshold/visible": True, "train/Error threshold/value": 0.1, "train/Error threshold/minimum": 0, "train/Error threshold/maximum": 1, "train/Error threshold/step": 0.01 } config = { "samples_save": False, "samples_format": "png", "samples_filename_pattern": "", "save_images_add_number": True, "grid_save": False, "grid_format": "png", "grid_extended_filename": False, "grid_only_if_multiple": True, "grid_prevent_empty_spots": False, "n_rows": -1, "enable_pnginfo": True, "save_txt": False, "save_images_before_face_restoration": False, "save_images_before_highres_fix": False, "save_images_before_color_correction": False, "jpeg_quality": 80, "export_for_4chan": True, "use_original_name_batch": False, "use_upscaler_name_as_suffix": False, "save_selected_only": True, "do_not_add_watermark": False, "temp_dir": "", "clean_temp_dir_at_start": False, "outdir_samples": "", "outdir_txt2img_samples": "outputs/txt2img-images", "outdir_img2img_samples": "outputs/img2img-images", "outdir_extras_samples": "outputs/extras-images", "outdir_grids": "", "outdir_txt2img_grids": "outputs/txt2img-grids", "outdir_img2img_grids": "outputs/img2img-grids", "outdir_save": "log/images", "save_to_dirs": False, "grid_save_to_dirs": False, "use_save_to_dirs_for_ui": False, "directories_filename_pattern": "", "directories_max_prompt_words": 8, "ESRGAN_tile": 192, "ESRGAN_tile_overlap": 8, "realesrgan_enabled_models": [ "R-ESRGAN 4x+", "R-ESRGAN 4x+ Anime6B" ], "upscaler_for_img2img": None, "face_restoration_model": None, "code_former_weight": 0.5, "face_restoration_unload": False, "memmon_poll_rate": 8, "samples_log_stdout": False, "multiple_tqdm": True, "print_hypernet_extra": False, "unload_models_when_training": False, "pin_memory": False, "save_optimizer_state": False, "save_training_settings_to_txt": True, "dataset_filename_word_regex": "", "dataset_filename_join_string": " ", "training_image_repeats_per_epoch": 1, "training_write_csv_every": 500, "training_xattention_optimizations": False, "training_enable_tensorboard": False, "training_tensorboard_save_images": False, "training_tensorboard_flush_every": 120, "sd_model_checkpoint": default_model, "sd_checkpoint_cache": 0, "sd_vae_checkpoint_cache": 0, "sd_vae": default_vae, "sd_vae_as_default": True, "sd_hypernetwork": "None", "sd_hypernetwork_strength": 1.0, "inpainting_mask_weight": 1.0, "initial_noise_multiplier": 1.0, "img2img_color_correction": False, "img2img_fix_steps": False, "img2img_background_color": "#ffffff", "enable_quantization": False, "enable_emphasis": True, "enable_batch_seeds": True, "comma_padding_backtrack": 20, "CLIP_stop_at_last_layers": clip_skip, "random_artist_categories": [], "use_old_emphasis_implementation": False, "use_old_karras_scheduler_sigmas": False, "use_old_hires_fix_width_height": False, "interrogate_keep_models_in_memory": False, "interrogate_use_builtin_artists": True, "interrogate_return_ranks": False, "interrogate_clip_num_beams": 1, "interrogate_clip_min_length": 24, "interrogate_clip_max_length": 48, "interrogate_clip_dict_limit": 1500, "interrogate_deepbooru_score_threshold": 0.5, "deepbooru_sort_alpha": True, "deepbooru_use_spaces": False, "deepbooru_escape": True, "deepbooru_filter_tags": "", "return_grid": True, "do_not_show_images": False, "add_model_hash_to_info": True, "add_model_name_to_info": True, "disable_weights_auto_swap": False, "send_seed": True, "send_size": True, "font": "", "js_modal_lightbox": True, "js_modal_lightbox_initially_zoomed": True, "show_progress_in_title": True, "samplers_in_dropdown": True, "dimensions_and_batch_together": True, "quicksettings": "sd_model_checkpoint", "ui_reorder": "inpaint, sampler, dimensions, cfg, seed, checkboxes, hires_fix, batch, scripts", "localization": "None", "show_progressbar": True, "live_previews_enable": False, "show_progress_grid": True, "show_progress_every_n_steps": 10, "show_progress_type": "Approx NN", "live_preview_content": "Prompt", "live_preview_refresh_period": 1000, "hide_samplers": [], "eta_ddim": 0.0, "eta_ancestral": 1.0, "ddim_discretize": "uniform", "s_churn": 0.0, "s_tmin": 0.0, "s_noise": 1.0, "eta_noise_seed_delta": ENSSD, "always_discard_next_to_last_sigma": False, "disabled_extensions": [], "sd_checkpoint_hash": "b443ef60bbbaf5dc31974acc4035063716d66bbcc66e96155dbf80aba2106003", "ldsr_steps": 100, "ldsr_cached": False, "SWIN_tile": 192, "SWIN_tile_overlap": 8, "images_history_preload": False, "images_record_paths": True, "images_delete_message": True, "images_history_page_columns": 6.0, "images_history_page_rows": 6.0, "images_history_pages_perload": 20.0, "show_warnings": False, "upcast_attn": False, "interrogate_clip_skip_categories": [], "extra_networks_default_view": "cards", "extra_networks_default_multiplier": 1, "sd_lora": "None", "lora_apply_to_outputs": False, "keyedit_precision_attention": 0.1, "keyedit_precision_extra": 0.05, "ui_extra_networks_tab_reorder": "", "postprocessing_enable_in_main_ui": [], "postprocessing_operation_order": [], "upscaling_max_images_in_cache": 5, "tac_tagFile": "danbooru.csv", "tac_active": True, "tac_activeIn.txt2img": True, "tac_activeIn.img2img": True, "tac_activeIn.negativePrompts": True, "tac_activeIn.thirdParty": True, "tac_maxResults": 5.0, "tac_showAllResults": False, "tac_resultStepLength": 100.0, "tac_delayTime": 100.0, "tac_useWildcards": True, "tac_useEmbeddings": True, "tac_replaceUnderscores": True, "tac_escapeParentheses": True, "tac_appendComma": True, "tac_alias.searchByAlias": True, "tac_alias.onlyShowAlias": False, "tac_translation.translationFile": "None", "tac_translation.oldFormat": False, "tac_translation.searchByTranslation": True, "tac_extra.extraFile": "None", "tac_extra.onlyAliasExtraFile": False, "tac_activeIn.modelList": "", "tac_activeIn.modelListMode": "Blacklist", "tac_useHypernetworks": True, "tac_useLoras": True, "tac_showWikiLinks": False } with open("config.json", "w") as f: json.dump(config, f) with open("ui-config.json", "w") as f: json.dump(ui_config, f) os.system("python launch.py --disable-console-progressbars --no-hashing")