<small>The MPS workaround for nn.Linear on macOS 13.2.X is based on the MPS workaround for nn.Linear created by danieldk for Curated transformers</small>
<pre>
The MIT License (MIT)
Copyright (C) 2021 ExplosionAI GmbH
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
"\u2199\ufe0f":"Read generation parameters from prompt or last generation if prompt is empty into user interface.",
"\u2199\ufe0f":"Read generation parameters from prompt or last generation if prompt is empty into user interface.",
"\u{1f4c2}":"Open images output directory",
"\u{1f4c2}":"Open images output directory",
"\u{1f4be}":"Save style",
"\u{1f4be}":"Save style",
"\u{1f5d1}":"Clear prompt",
"\u{1f5d1}\ufe0f":"Clear prompt",
"\u{1f4cb}":"Apply selected styles to current prompt",
"\u{1f4cb}":"Apply selected styles to current prompt",
"\u{1f4d2}":"Paste available values into the field",
"\u{1f4d2}":"Paste available values into the field",
"\u{1f3b4}":"Show extra networks",
"\u{1f3b4}":"Show extra networks",
@ -40,7 +40,6 @@ titles = {
"Inpaint at full resolution":"Upscale masked region to target resolution, do inpainting, downscale back and paste into original image",
"Inpaint at full resolution":"Upscale masked region to target resolution, do inpainting, downscale back and paste into original image",
"Denoising strength":"Determines how little respect the algorithm should have for image's content. At 0, nothing will change, and at 1 you'll get an unrelated image. With values below 1.0, processing will take less steps than the Sampling Steps slider specifies.",
"Denoising strength":"Determines how little respect the algorithm should have for image's content. At 0, nothing will change, and at 1 you'll get an unrelated image. With values below 1.0, processing will take less steps than the Sampling Steps slider specifies.",
"Denoising strength change factor":"In loopback mode, on each loop the denoising strength is multiplied by this value. <1 means decreasing variety so your sequence will converge on a fixed picture. >1 means increasing variety so your sequence will become more and more chaotic.",
"Skip":"Stop processing current image and continue processing.",
"Skip":"Stop processing current image and continue processing.",
"Interrupt":"Stop processing images and return any results accumulated so far.",
"Interrupt":"Stop processing images and return any results accumulated so far.",
@ -71,8 +70,10 @@ titles = {
"Directory name pattern":"Use following tags to define how subdirectories for images and grids are chosen: [steps], [cfg],[prompt_hash], [prompt], [prompt_no_styles], [prompt_spaces], [width], [height], [styles], [sampler], [seed], [model_hash], [model_name], [prompt_words], [date], [datetime], [datetime<Format>], [datetime<Format><Time Zone>], [job_timestamp]; leave empty for default.",
"Directory name pattern":"Use following tags to define how subdirectories for images and grids are chosen: [steps], [cfg],[prompt_hash], [prompt], [prompt_no_styles], [prompt_spaces], [width], [height], [styles], [sampler], [seed], [model_hash], [model_name], [prompt_words], [date], [datetime], [datetime<Format>], [datetime<Format><Time Zone>], [job_timestamp]; leave empty for default.",
"Max prompt words":"Set the maximum number of words to be used in the [prompt_words] option; ATTENTION: If the words are too long, they may exceed the maximum length of the file path that the system can handle",
"Max prompt words":"Set the maximum number of words to be used in the [prompt_words] option; ATTENTION: If the words are too long, they may exceed the maximum length of the file path that the system can handle",
"Loopback":"Process an image, use it as an input, repeat.",
"Loopback":"Performs img2img processing multiple times. Output images are used as input for the next loop.",
"Loops":"How many times to repeat processing an image and using it as input for the next iteration",
"Loops":"How many times to process an image. Each output is used as the input of the next loop. If set to 1, behavior will be as if this script were not used.",
"Final denoising strength":"The denoising strength for the final loop of each image in the batch.",
"Denoising strength curve":"The denoising curve controls the rate of denoising strength change each loop. Aggressive: Most of the change will happen towards the start of the loops. Linear: Change will be constant through all loops. Lazy: Most of the change will happen towards the end of the loops.",
"Style 1":"Style to apply; styles have components for both positive and negative prompts and apply to both",
"Style 1":"Style to apply; styles have components for both positive and negative prompts and apply to both",
"Style 2":"Style to apply; styles have components for both positive and negative prompts and apply to both",
"Style 2":"Style to apply; styles have components for both positive and negative prompts and apply to both",
parser.add_argument("--gradio-queue",action='store_true',help="does not do anything",default=True)
parser.add_argument("--no-gradio-queue",action='store_true',help="Disables gradio queue; causes the webpage to use http requests instead of websockets; was the defaul in earlier versions")
parser.add_argument("--skip-version-check",action='store_true',help="Do not check versions of torch and xformers")
parser.add_argument("--skip-version-check",action='store_true',help="Do not check versions of torch and xformers")
parser.add_argument("--no-hashing",action='store_true',help="disable sha256 hashing of checkpoints to help loading performance",default=False)
parser.add_argument("--no-hashing",action='store_true',help="disable sha256 hashing of checkpoints to help loading performance",default=False)
parser.add_argument("--no-download-sd-model",action='store_true',help="don't download SD1.5 model even if no model is found in --ckpt-dir",default=False)
parser.add_argument("--no-download-sd-model",action='store_true',help="don't download SD1.5 model even if no model is found in --ckpt-dir",default=False)
"save_images_before_face_restoration":OptionInfo(False,"Save a copy of image before doing face restoration."),
"save_images_before_face_restoration":OptionInfo(False,"Save a copy of image before doing face restoration."),
"save_images_before_highres_fix":OptionInfo(False,"Save a copy of image before applying highres fix."),
"save_images_before_highres_fix":OptionInfo(False,"Save a copy of image before applying highres fix."),
"save_images_before_color_correction":OptionInfo(False,"Save a copy of image before applying color correction to img2img results"),
"save_images_before_color_correction":OptionInfo(False,"Save a copy of image before applying color correction to img2img results"),
"save_mask":OptionInfo(False,"For inpainting, save a copy of the greyscale mask"),
"save_mask_composite":OptionInfo(False,"For inpainting, save a masked composite"),
"jpeg_quality":OptionInfo(80,"Quality for saved jpeg images",gr.Slider,{"minimum":1,"maximum":100,"step":1}),
"jpeg_quality":OptionInfo(80,"Quality for saved jpeg images",gr.Slider,{"minimum":1,"maximum":100,"step":1}),
"webp_lossless":OptionInfo(False,"Use lossless compression for webp images"),
"webp_lossless":OptionInfo(False,"Use lossless compression for webp images"),
"export_for_4chan":OptionInfo(True,"If the saved image file size is above the limit, or its either width or height are above the limit, save a downscaled copy as JPG"),
"export_for_4chan":OptionInfo(True,"If the saved image file size is above the limit, or its either width or height are above the limit, save a downscaled copy as JPG"),
negative_prompt=gr.Textbox(label="Negative prompt",elem_id=f"{id_part}_neg_prompt",show_label=False,lines=2,placeholder="Negative prompt (press Ctrl+Enter or Alt+Enter to generate)")
negative_prompt=gr.Textbox(label="Negative prompt",elem_id=f"{id_part}_neg_prompt",show_label=False,lines=3,placeholder="Negative prompt (press Ctrl+Enter or Alt+Enter to generate)")
reload_script_bodies=gr.Button(value='Reload custom script bodies (No ui updates, No restart)',variant='secondary',elem_id="settings_reload_script_bodies")
reload_script_bodies=gr.Button(value='Reload custom script bodies (No ui updates, No restart)',variant='secondary',elem_id="settings_reload_script_bodies")
withgr.Row():
unload_sd_model=gr.Button(value='Unload SD checkpoint to free VRAM',elem_id="sett_unload_sd_model")
reload_sd_model=gr.Button(value='Reload the last SD checkpoint back into VRAM',elem_id="sett_reload_sd_model")
state.job=f"{index(ix,iy,iz)+1} out of {list_size}"
state.job=f"{index(ix,iy,iz)+1} out of {list_size}"
processed:Processed=cell(x,y,z)
processed:Processed=cell(x,y,z, ix,iy,iz)
ifprocessed_resultisNone:
ifprocessed_resultisNone:
# Use our first processed result object as a template container to hold our full results
# Use our first processed result object as a template container to hold our full results
@ -558,8 +558,6 @@ class Script(scripts.Script):
print(f"X/Y/Z plot will create {len(xs)*len(ys)*len(zs)*image_cell_count} images on {len(zs)}{len(xs)}x{len(ys)} grid{plural_s}{cell_console_text}. (Total steps to process: {total_steps})")
print(f"X/Y/Z plot will create {len(xs)*len(ys)*len(zs)*image_cell_count} images on {len(zs)}{len(xs)}x{len(ys)} grid{plural_s}{cell_console_text}. (Total steps to process: {total_steps})")