@ -107,10 +107,7 @@ if not is_installed("torch") or not is_installed("torchvision"):
run(f'"{python}" -m {torch_command}',"Installing torch and torchvision","Couldn't install torch")
run(f'"{python}" -m {torch_command}',"Installing torch and torchvision","Couldn't install torch")
ifnotskip_torch_cuda_test:
ifnotskip_torch_cuda_test:
run_python("import torch; assert torch.cuda.is_available(), 'Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDINE_ARGS variable to disable this check'")
run_python("import torch; assert torch.cuda.is_available(), 'Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check'")
theta_0[key]=theta_func(theta_0[key],theta_1[key],(float(1.0)-interp_amount))# Need to reverse the interp_amount to match the desired mix ration in the merged checkpoint
#get_learned_conditioning_prompt_schedules(["fantasy landscape with a [mountain:lake:0.25] and [an oak:a christmas tree:0.75][ in foreground::0.6][ in background:0.25] [shoddy:masterful:0.5]"], 100)
"img2img_color_correction":OptionInfo(False,"Apply color correction to img2img results to match original colors."),
"img2img_color_correction":OptionInfo(False,"Apply color correction to img2img results to match original colors."),
"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"),
"img2img_fix_steps":OptionInfo(False,"With img2img, do exactly the amount of steps the slider specifies (normally you'd do less with less denoising)."),
"img2img_fix_steps":OptionInfo(False,"With img2img, do exactly the amount of steps the slider specifies (normally you'd do less with less denoising)."),
"enable_quantization":OptionInfo(False,"Enable quantization in K samplers for sharper and cleaner results. This may change existing seeds. Requires restart to apply."),
"enable_quantization":OptionInfo(False,"Enable quantization in K samplers for sharper and cleaner results. This may change existing seeds. Requires restart to apply."),
"enable_emphasis":OptionInfo(True,"Use (text) to make model pay more attention to text and [text] to make it pay less attention"),
"enable_emphasis":OptionInfo(True,"Eemphasis: use (text) to make model pay more attention to text and [text] to make it pay less attention"),
"use_old_emphasis_implementation":OptionInfo(False,"Use old emphasis implementation. Can be useful to reproduce old seeds."),
"enable_batch_seeds":OptionInfo(True,"Make K-diffusion samplers produce same images in a batch as when making a single image"),
"enable_batch_seeds":OptionInfo(True,"Make K-diffusion samplers produce same images in a batch as when making a single image"),
"random_artist_categories":OptionInfo([],"Allowed categories for random artists selection when using the Roll button",gr.CheckboxGroup,{"choices":artist_db.categories()}),
"random_artist_categories":OptionInfo([],"Allowed categories for random artists selection when using the Roll button",gr.CheckboxGroup,{"choices":artist_db.categories()}),
ifindex>-1andopts.save_selected_onlyand(index>=data["index_of_first_image"]):# ensures we are looking at a specific non-grid picture, and we have save_selected_only
ifindex>-1andopts.save_selected_onlyand(index>0ornotopts.return_grid):# ensures we are looking at a specific non-grid picture, and we have save_selected_only
print("Error loading/saving model file:",file=sys.stderr)
print(traceback.format_exc(),file=sys.stderr)
modules.sd_models.list_models()#To remove the potentially missing models from the list
return["Error loading/saving model file. It doesn't exist or the name contains illegal characters"]+[gr.Dropdown.update(choices=modules.sd_models.checkpoint_tiles())for_inrange(3)]
AxisOptionImg2Img("Denoising",float,apply_field("denoising_strength"),format_value_add_label),# as it is now all AxisOptionImg2Img items must go after AxisOption ones
AxisOptionImg2Img("Denoising",float,apply_field("denoising_strength"),format_value_add_label),# as it is now all AxisOptionImg2Img items must go after AxisOption ones