diff --git a/launch.py b/launch.py index f83820d2..6c993e4b 100644 --- a/launch.py +++ b/launch.py @@ -1,4 +1,5 @@ from modules import launch_utils +import sys args = launch_utils.args python = launch_utils.python @@ -25,6 +26,9 @@ def main(): + if args.enable_trace: + sys.setprofile(tracefunc) + if args.dump_sysinfo: filename = launch_utils.dump_sysinfo() diff --git a/manifest.json b/manifest.json new file mode 100644 index 00000000..bdfcf9be --- /dev/null +++ b/manifest.json @@ -0,0 +1,35349 @@ +{ + "primary_language": "Python", + "languages": [ + "Shell", + "JavaScript", + "Python" + ], + "root_entry_points": { + "Python": "launch.py" + }, + "analysis": { + ".eslintrc.js": { + "info": "Detailed JavaScript analysis not implemented in this version." + }, + "extensions-builtin/LDSR/ldsr_model_arch.py": [ + { + "type": "class", + "name": "LDSR", + "methods": [ + { + "type": "function", + "name": "load_model_from_config", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "half_attention", + "type": null + } + ], + "return_type": "{'model': model}", + "parent": "LDSR" + }, + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "model_path", + "type": null + }, + { + "name": "yaml_path", + "type": null + } + ], + "return_type": null, + "parent": "LDSR" + }, + { + "type": "function", + "name": "run", + "args": [ + { + "name": "model", + "type": null + }, + { + "name": "selected_path", + "type": null + }, + { + "name": "custom_steps", + "type": null + }, + { + "name": "eta", + "type": null + } + ], + "return_type": "logs", + "parent": "LDSR" + }, + { + "type": "function", + "name": "super_resolution", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "image", + "type": null + }, + { + "name": "steps", + "type": null + }, + { + "name": "target_scale", + "type": null + }, + { + "name": "half_attention", + "type": null + } + ], + "return_type": "a", + "parent": "LDSR" + } + ], + "parent": null + }, + { + "type": "function", + "name": "get_cond", + "args": [ + { + "name": "selected_path", + "type": null + } + ], + "return_type": "example", + "parent": null + }, + { + "type": "function", + "name": "convsample_ddim", + "args": [ + { + "name": "model", + "type": null + }, + { + "name": "cond", + "type": null + }, + { + "name": "steps", + "type": null + }, + { + "name": "shape", + "type": null + }, + { + "name": "eta", + "type": null + }, + { + "name": "callback", + "type": null + }, + { + "name": "normals_sequence", + "type": null + }, + { + "name": "mask", + "type": null + }, + { + "name": "x0", + "type": null + }, + { + "name": "quantize_x0", + "type": null + }, + { + "name": "temperature", + "type": null + }, + { + "name": "score_corrector", + "type": null + }, + { + "name": "corrector_kwargs", + "type": null + }, + { + "name": "x_t", + "type": null + } + ], + "return_type": "(samples, intermediates)", + "parent": null + }, + { + "type": "function", + "name": "make_convolutional_sample", + "args": [ + { + "name": "batch", + "type": null + }, + { + "name": "model", + "type": null + }, + { + "name": "custom_steps", + "type": null + }, + { + "name": "eta", + "type": null + }, + { + "name": "quantize_x0", + "type": null + }, + { + "name": "custom_shape", + "type": null + }, + { + "name": "temperature", + "type": null + }, + { + "name": "noise_dropout", + "type": null + }, + { + "name": "corrector", + "type": null + }, + { + "name": "corrector_kwargs", + "type": null + }, + { + "name": "x_T", + "type": null + }, + { + "name": "ddim_use_x0_pred", + "type": null + } + ], + "return_type": "log", + "parent": null + } + ], + "extensions-builtin/LDSR/preload.py": [ + { + "type": "function", + "name": "preload", + "args": [ + { + "name": "parser", + "type": null + } + ], + "return_type": null, + "parent": null + } + ], + "extensions-builtin/LDSR/scripts/ldsr_model.py": [ + { + "type": "class", + "name": "UpscalerLDSR", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "user_path", + "type": null + } + ], + "return_type": null, + "parent": "UpscalerLDSR" + }, + { + "type": "function", + "name": "load_model", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "path", + "type": "str" + } + ], + "return_type": "LDSR(model, yaml)", + "parent": "UpscalerLDSR" + }, + { + "type": "function", + "name": "do_upscale", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "img", + "type": null + }, + { + "name": "path", + "type": null + } + ], + "return_type": "ldsr.super_resolution(img, ddim_steps, self.scale)", + "parent": "UpscalerLDSR" + } + ], + "parent": null + }, + { + "type": "function", + "name": "on_ui_settings", + "args": [], + "return_type": null, + "parent": null + } + ], + "extensions-builtin/LDSR/sd_hijack_autoencoder.py": [ + { + "type": "class", + "name": "VQModel", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "ddconfig", + "type": null + }, + { + "name": "lossconfig", + "type": null + }, + { + "name": "n_embed", + "type": null + }, + { + "name": "embed_dim", + "type": null + }, + { + "name": "ckpt_path", + "type": null + }, + { + "name": "ignore_keys", + "type": null + }, + { + "name": "image_key", + "type": null + }, + { + "name": "colorize_nlabels", + "type": null + }, + { + "name": "monitor", + "type": null + }, + { + "name": "batch_resize_range", + "type": null + }, + { + "name": "scheduler_config", + "type": null + }, + { + "name": "lr_g_factor", + "type": null + }, + { + "name": "remap", + "type": null + }, + { + "name": "sane_index_shape", + "type": null + }, + { + "name": "use_ema", + "type": null + } + ], + "return_type": null, + "parent": "VQModel" + }, + { + "type": "function", + "name": "ema_scope", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "context", + "type": null + } + ], + "return_type": null, + "parent": "VQModel" + }, + { + "type": "function", + "name": "init_from_ckpt", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "path", + "type": null + }, + { + "name": "ignore_keys", + "type": null + } + ], + "return_type": null, + "parent": "VQModel" + }, + { + "type": "function", + "name": "on_train_batch_end", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "VQModel" + }, + { + "type": "function", + "name": "encode", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "(quant, emb_loss, info)", + "parent": "VQModel" + }, + { + "type": "function", + "name": "encode_to_prequant", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "h", + "parent": "VQModel" + }, + { + "type": "function", + "name": "decode", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "quant", + "type": null + } + ], + "return_type": "dec", + "parent": "VQModel" + }, + { + "type": "function", + "name": "decode_code", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "code_b", + "type": null + } + ], + "return_type": "dec", + "parent": "VQModel" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "input", + "type": null + }, + { + "name": "return_pred_indices", + "type": null + } + ], + "return_type": "(dec, diff)", + "parent": "VQModel" + }, + { + "type": "function", + "name": "get_input", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "batch", + "type": null + }, + { + "name": "k", + "type": null + } + ], + "return_type": "x", + "parent": "VQModel" + }, + { + "type": "function", + "name": "training_step", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "batch", + "type": null + }, + { + "name": "batch_idx", + "type": null + }, + { + "name": "optimizer_idx", + "type": null + } + ], + "return_type": "aeloss", + "parent": "VQModel" + }, + { + "type": "function", + "name": "validation_step", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "batch", + "type": null + }, + { + "name": "batch_idx", + "type": null + } + ], + "return_type": "log_dict", + "parent": "VQModel" + }, + { + "type": "function", + "name": "_validation_step", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "batch", + "type": null + }, + { + "name": "batch_idx", + "type": null + }, + { + "name": "suffix", + "type": null + } + ], + "return_type": "self.log_dict", + "parent": "VQModel" + }, + { + "type": "function", + "name": "configure_optimizers", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "([opt_ae, opt_disc], [])", + "parent": "VQModel" + }, + { + "type": "function", + "name": "get_last_layer", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "self.decoder.conv_out.weight", + "parent": "VQModel" + }, + { + "type": "function", + "name": "log_images", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "batch", + "type": null + }, + { + "name": "only_inputs", + "type": null + }, + { + "name": "plot_ema", + "type": null + } + ], + "return_type": "log", + "parent": "VQModel" + }, + { + "type": "function", + "name": "to_rgb", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "x", + "parent": "VQModel" + } + ], + "parent": null + }, + { + "type": "class", + "name": "VQModelInterface", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "embed_dim", + "type": null + } + ], + "return_type": null, + "parent": "VQModelInterface" + }, + { + "type": "function", + "name": "encode", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "h", + "parent": "VQModelInterface" + }, + { + "type": "function", + "name": "decode", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "h", + "type": null + }, + { + "name": "force_not_quantize", + "type": null + } + ], + "return_type": "dec", + "parent": "VQModelInterface" + } + ], + "parent": null + } + ], + "extensions-builtin/LDSR/sd_hijack_ddpm_v1.py": [ + { + "type": "function", + "name": "disabled_train", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "mode", + "type": null + } + ], + "return_type": "self", + "parent": null + }, + { + "type": "function", + "name": "uniform_on_device", + "args": [ + { + "name": "r1", + "type": null + }, + { + "name": "r2", + "type": null + }, + { + "name": "shape", + "type": null + }, + { + "name": "device", + "type": null + } + ], + "return_type": "((r1 - r2) * torch.rand(*shape, device=device) + r2)", + "parent": null + }, + { + "type": "class", + "name": "DDPMV1", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "unet_config", + "type": null + }, + { + "name": "timesteps", + "type": null + }, + { + "name": "beta_schedule", + "type": null + }, + { + "name": "loss_type", + "type": null + }, + { + "name": "ckpt_path", + "type": null + }, + { + "name": "ignore_keys", + "type": null + }, + { + "name": "load_only_unet", + "type": null + }, + { + "name": "monitor", + "type": null + }, + { + "name": "use_ema", + "type": null + }, + { + "name": "first_stage_key", + "type": null + }, + { + "name": "image_size", + "type": null + }, + { + "name": "channels", + "type": null + }, + { + "name": "log_every_t", + "type": null + }, + { + "name": "clip_denoised", + "type": null + }, + { + "name": "linear_start", + "type": null + }, + { + "name": "linear_end", + "type": null + }, + { + "name": "cosine_s", + "type": null + }, + { + "name": "given_betas", + "type": null + }, + { + "name": "original_elbo_weight", + "type": null + }, + { + "name": "v_posterior", + "type": null + }, + { + "name": "l_simple_weight", + "type": null + }, + { + "name": "conditioning_key", + "type": null + }, + { + "name": "parameterization", + "type": null + }, + { + "name": "scheduler_config", + "type": null + }, + { + "name": "use_positional_encodings", + "type": null + }, + { + "name": "learn_logvar", + "type": null + }, + { + "name": "logvar_init", + "type": null + } + ], + "return_type": null, + "parent": "DDPMV1" + }, + { + "type": "function", + "name": "register_schedule", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "given_betas", + "type": null + }, + { + "name": "beta_schedule", + "type": null + }, + { + "name": "timesteps", + "type": null + }, + { + "name": "linear_start", + "type": null + }, + { + "name": "linear_end", + "type": null + }, + { + "name": "cosine_s", + "type": null + } + ], + "return_type": null, + "parent": "DDPMV1" + }, + { + "type": "function", + "name": "ema_scope", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "context", + "type": null + } + ], + "return_type": null, + "parent": "DDPMV1" + }, + { + "type": "function", + "name": "init_from_ckpt", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "path", + "type": null + }, + { + "name": "ignore_keys", + "type": null + }, + { + "name": "only_model", + "type": null + } + ], + "return_type": null, + "parent": "DDPMV1" + }, + { + "type": "function", + "name": "q_mean_variance", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x_start", + "type": null + }, + { + "name": "t", + "type": null + } + ], + "return_type": "(mean, variance, log_variance)", + "parent": "DDPMV1" + }, + { + "type": "function", + "name": "predict_start_from_noise", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x_t", + "type": null + }, + { + "name": "t", + "type": null + }, + { + "name": "noise", + "type": null + } + ], + "return_type": "(extract_into_tensor(self.sqrt_recip_alphas_cumprod, t, x_t.shape) * x_t - \n extract_into_tensor(self.sqrt_recipm1_alphas_cumprod, t, x_t.shape) * noise\n )", + "parent": "DDPMV1" + }, + { + "type": "function", + "name": "q_posterior", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x_start", + "type": null + }, + { + "name": "x_t", + "type": null + }, + { + "name": "t", + "type": null + } + ], + "return_type": "(posterior_mean, posterior_variance, posterior_log_variance_clipped)", + "parent": "DDPMV1" + }, + { + "type": "function", + "name": "p_mean_variance", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "t", + "type": null + }, + { + "name": "clip_denoised", + "type": "bool" + } + ], + "return_type": "(model_mean, posterior_variance, posterior_log_variance)", + "parent": "DDPMV1" + }, + { + "type": "function", + "name": "p_sample", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "t", + "type": null + }, + { + "name": "clip_denoised", + "type": null + }, + { + "name": "repeat_noise", + "type": null + } + ], + "return_type": "(model_mean + nonzero_mask * (0.5 * model_log_variance).exp() * noise)", + "parent": "DDPMV1" + }, + { + "type": "function", + "name": "p_sample_loop", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "shape", + "type": null + }, + { + "name": "return_intermediates", + "type": null + } + ], + "return_type": "img", + "parent": "DDPMV1" + }, + { + "type": "function", + "name": "sample", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "batch_size", + "type": null + }, + { + "name": "return_intermediates", + "type": null + } + ], + "return_type": "self.p_sample_loop((batch_size, channels, image_size, image_size),\n return_intermediates=return_intermediates)", + "parent": "DDPMV1" + }, + { + "type": "function", + "name": "q_sample", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x_start", + "type": null + }, + { + "name": "t", + "type": null + }, + { + "name": "noise", + "type": null + } + ], + "return_type": "(extract_into_tensor(self.sqrt_alphas_cumprod, t, x_start.shape) * x_start +\n extract_into_tensor(self.sqrt_one_minus_alphas_cumprod, t, x_start.\n shape) * noise)", + "parent": "DDPMV1" + }, + { + "type": "function", + "name": "get_loss", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "pred", + "type": null + }, + { + "name": "target", + "type": null + }, + { + "name": "mean", + "type": null + } + ], + "return_type": "loss", + "parent": "DDPMV1" + }, + { + "type": "function", + "name": "p_losses", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x_start", + "type": null + }, + { + "name": "t", + "type": null + }, + { + "name": "noise", + "type": null + } + ], + "return_type": "(loss, loss_dict)", + "parent": "DDPMV1" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "self.p_losses(x, t, *args, **kwargs)", + "parent": "DDPMV1" + }, + { + "type": "function", + "name": "get_input", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "batch", + "type": null + }, + { + "name": "k", + "type": null + } + ], + "return_type": "x", + "parent": "DDPMV1" + }, + { + "type": "function", + "name": "shared_step", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "batch", + "type": null + } + ], + "return_type": "(loss, loss_dict)", + "parent": "DDPMV1" + }, + { + "type": "function", + "name": "training_step", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "batch", + "type": null + }, + { + "name": "batch_idx", + "type": null + } + ], + "return_type": "loss", + "parent": "DDPMV1" + }, + { + "type": "function", + "name": "validation_step", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "batch", + "type": null + }, + { + "name": "batch_idx", + "type": null + } + ], + "return_type": null, + "parent": "DDPMV1" + }, + { + "type": "function", + "name": "on_train_batch_end", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "DDPMV1" + }, + { + "type": "function", + "name": "_get_rows_from_list", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "samples", + "type": null + } + ], + "return_type": "denoise_grid", + "parent": "DDPMV1" + }, + { + "type": "function", + "name": "log_images", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "batch", + "type": null + }, + { + "name": "N", + "type": null + }, + { + "name": "n_row", + "type": null + }, + { + "name": "sample", + "type": null + }, + { + "name": "return_keys", + "type": null + } + ], + "return_type": "log", + "parent": "DDPMV1" + }, + { + "type": "function", + "name": "configure_optimizers", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "opt", + "parent": "DDPMV1" + } + ], + "parent": null + }, + { + "type": "class", + "name": "LatentDiffusionV1", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "first_stage_config", + "type": null + }, + { + "name": "cond_stage_config", + "type": null + }, + { + "name": "num_timesteps_cond", + "type": null + }, + { + "name": "cond_stage_key", + "type": null + }, + { + "name": "cond_stage_trainable", + "type": null + }, + { + "name": "concat_mode", + "type": null + }, + { + "name": "cond_stage_forward", + "type": null + }, + { + "name": "conditioning_key", + "type": null + }, + { + "name": "scale_factor", + "type": null + }, + { + "name": "scale_by_std", + "type": null + } + ], + "return_type": null, + "parent": "LatentDiffusionV1" + }, + { + "type": "function", + "name": "make_cond_schedule", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "LatentDiffusionV1" + }, + { + "type": "function", + "name": "on_train_batch_start", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "batch", + "type": null + }, + { + "name": "batch_idx", + "type": null + }, + { + "name": "dataloader_idx", + "type": null + } + ], + "return_type": null, + "parent": "LatentDiffusionV1" + }, + { + "type": "function", + "name": "register_schedule", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "given_betas", + "type": null + }, + { + "name": "beta_schedule", + "type": null + }, + { + "name": "timesteps", + "type": null + }, + { + "name": "linear_start", + "type": null + }, + { + "name": "linear_end", + "type": null + }, + { + "name": "cosine_s", + "type": null + } + ], + "return_type": null, + "parent": "LatentDiffusionV1" + }, + { + "type": "function", + "name": "instantiate_first_stage", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "config", + "type": null + } + ], + "return_type": null, + "parent": "LatentDiffusionV1" + }, + { + "type": "function", + "name": "instantiate_cond_stage", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "config", + "type": null + } + ], + "return_type": null, + "parent": "LatentDiffusionV1" + }, + { + "type": "function", + "name": "_get_denoise_row_from_list", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "samples", + "type": null + }, + { + "name": "desc", + "type": null + }, + { + "name": "force_no_decoder_quantization", + "type": null + } + ], + "return_type": "denoise_grid", + "parent": "LatentDiffusionV1" + }, + { + "type": "function", + "name": "get_first_stage_encoding", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "encoder_posterior", + "type": null + } + ], + "return_type": "(self.scale_factor * z)", + "parent": "LatentDiffusionV1" + }, + { + "type": "function", + "name": "get_learned_conditioning", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "c", + "type": null + } + ], + "return_type": "c", + "parent": "LatentDiffusionV1" + }, + { + "type": "function", + "name": "meshgrid", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "h", + "type": null + }, + { + "name": "w", + "type": null + } + ], + "return_type": "arr", + "parent": "LatentDiffusionV1" + }, + { + "type": "function", + "name": "delta_border", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "h", + "type": null + }, + { + "name": "w", + "type": null + } + ], + "return_type": "edge_dist", + "parent": "LatentDiffusionV1" + }, + { + "type": "function", + "name": "get_weighting", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "h", + "type": null + }, + { + "name": "w", + "type": null + }, + { + "name": "Ly", + "type": null + }, + { + "name": "Lx", + "type": null + }, + { + "name": "device", + "type": null + } + ], + "return_type": "weighting", + "parent": "LatentDiffusionV1" + }, + { + "type": "function", + "name": "get_fold_unfold", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "kernel_size", + "type": null + }, + { + "name": "stride", + "type": null + }, + { + "name": "uf", + "type": null + }, + { + "name": "df", + "type": null + } + ], + "return_type": "(fold, unfold, normalization, weighting)", + "parent": "LatentDiffusionV1" + }, + { + "type": "function", + "name": "get_input", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "batch", + "type": null + }, + { + "name": "k", + "type": null + }, + { + "name": "return_first_stage_outputs", + "type": null + }, + { + "name": "force_c_encode", + "type": null + }, + { + "name": "cond_key", + "type": null + }, + { + "name": "return_original_cond", + "type": null + }, + { + "name": "bs", + "type": null + } + ], + "return_type": "out", + "parent": "LatentDiffusionV1" + }, + { + "type": "function", + "name": "decode_first_stage", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "z", + "type": null + }, + { + "name": "predict_cids", + "type": null + }, + { + "name": "force_not_quantize", + "type": null + } + ], + "return_type": "decoded", + "parent": "LatentDiffusionV1" + }, + { + "type": "function", + "name": "differentiable_decode_first_stage", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "z", + "type": null + }, + { + "name": "predict_cids", + "type": null + }, + { + "name": "force_not_quantize", + "type": null + } + ], + "return_type": "decoded", + "parent": "LatentDiffusionV1" + }, + { + "type": "function", + "name": "encode_first_stage", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "self.first_stage_model.encode(x)", + "parent": "LatentDiffusionV1" + }, + { + "type": "function", + "name": "shared_step", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "batch", + "type": null + } + ], + "return_type": "loss", + "parent": "LatentDiffusionV1" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "c", + "type": null + } + ], + "return_type": "self.p_losses(x, c, t, *args, **kwargs)", + "parent": "LatentDiffusionV1" + }, + { + "type": "function", + "name": "apply_model", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x_noisy", + "type": null + }, + { + "name": "t", + "type": null + }, + { + "name": "cond", + "type": null + }, + { + "name": "return_ids", + "type": null + } + ], + "return_type": "x_recon[0]", + "parent": "LatentDiffusionV1" + }, + { + "type": "function", + "name": "_predict_eps_from_xstart", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x_t", + "type": null + }, + { + "name": "t", + "type": null + }, + { + "name": "pred_xstart", + "type": null + } + ], + "return_type": "((extract_into_tensor(self.sqrt_recip_alphas_cumprod, t, x_t.shape) * x_t -\n pred_xstart) / extract_into_tensor(self.sqrt_recipm1_alphas_cumprod, t,\n x_t.shape))", + "parent": "LatentDiffusionV1" + }, + { + "type": "function", + "name": "_prior_bpd", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x_start", + "type": null + } + ], + "return_type": "(mean_flat(kl_prior) / np.log(2.0))", + "parent": "LatentDiffusionV1" + }, + { + "type": "function", + "name": "p_losses", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x_start", + "type": null + }, + { + "name": "cond", + "type": null + }, + { + "name": "t", + "type": null + }, + { + "name": "noise", + "type": null + } + ], + "return_type": "(loss, loss_dict)", + "parent": "LatentDiffusionV1" + }, + { + "type": "function", + "name": "p_mean_variance", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "c", + "type": null + }, + { + "name": "t", + "type": null + }, + { + "name": "clip_denoised", + "type": "bool" + }, + { + "name": "return_codebook_ids", + "type": null + }, + { + "name": "quantize_denoised", + "type": null + }, + { + "name": "return_x0", + "type": null + }, + { + "name": "score_corrector", + "type": null + }, + { + "name": "corrector_kwargs", + "type": null + } + ], + "return_type": "(model_mean, posterior_variance, posterior_log_variance, logits)", + "parent": "LatentDiffusionV1" + }, + { + "type": "function", + "name": "p_sample", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "c", + "type": null + }, + { + "name": "t", + "type": null + }, + { + "name": "clip_denoised", + "type": null + }, + { + "name": "repeat_noise", + "type": null + }, + { + "name": "return_codebook_ids", + "type": null + }, + { + "name": "quantize_denoised", + "type": null + }, + { + "name": "return_x0", + "type": null + }, + { + "name": "temperature", + "type": null + }, + { + "name": "noise_dropout", + "type": null + }, + { + "name": "score_corrector", + "type": null + }, + { + "name": "corrector_kwargs", + "type": null + } + ], + "return_type": "(model_mean + nonzero_mask * (0.5 * model_log_variance).exp() * noise,\n logits.argmax(dim=1))", + "parent": "LatentDiffusionV1" + }, + { + "type": "function", + "name": "progressive_denoising", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "cond", + "type": null + }, + { + "name": "shape", + "type": null + }, + { + "name": "verbose", + "type": null + }, + { + "name": "callback", + "type": null + }, + { + "name": "quantize_denoised", + "type": null + }, + { + "name": "img_callback", + "type": null + }, + { + "name": "mask", + "type": null + }, + { + "name": "x0", + "type": null + }, + { + "name": "temperature", + "type": null + }, + { + "name": "noise_dropout", + "type": null + }, + { + "name": "score_corrector", + "type": null + }, + { + "name": "corrector_kwargs", + "type": null + }, + { + "name": "batch_size", + "type": null + }, + { + "name": "x_T", + "type": null + }, + { + "name": "start_T", + "type": null + }, + { + "name": "log_every_t", + "type": null + } + ], + "return_type": "(img, intermediates)", + "parent": "LatentDiffusionV1" + }, + { + "type": "function", + "name": "p_sample_loop", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "cond", + "type": null + }, + { + "name": "shape", + "type": null + }, + { + "name": "return_intermediates", + "type": null + }, + { + "name": "x_T", + "type": null + }, + { + "name": "verbose", + "type": null + }, + { + "name": "callback", + "type": null + }, + { + "name": "timesteps", + "type": null + }, + { + "name": "quantize_denoised", + "type": null + }, + { + "name": "mask", + "type": null + }, + { + "name": "x0", + "type": null + }, + { + "name": "img_callback", + "type": null + }, + { + "name": "start_T", + "type": null + }, + { + "name": "log_every_t", + "type": null + } + ], + "return_type": "img", + "parent": "LatentDiffusionV1" + }, + { + "type": "function", + "name": "sample", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "cond", + "type": null + }, + { + "name": "batch_size", + "type": null + }, + { + "name": "return_intermediates", + "type": null + }, + { + "name": "x_T", + "type": null + }, + { + "name": "verbose", + "type": null + }, + { + "name": "timesteps", + "type": null + }, + { + "name": "quantize_denoised", + "type": null + }, + { + "name": "mask", + "type": null + }, + { + "name": "x0", + "type": null + }, + { + "name": "shape", + "type": null + } + ], + "return_type": "self.p_sample_loop(cond, shape, return_intermediates=return_intermediates,\n x_T=x_T, verbose=verbose, timesteps=timesteps, quantize_denoised=\n quantize_denoised, mask=mask, x0=x0)", + "parent": "LatentDiffusionV1" + }, + { + "type": "function", + "name": "sample_log", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "cond", + "type": null + }, + { + "name": "batch_size", + "type": null + }, + { + "name": "ddim", + "type": null + }, + { + "name": "ddim_steps", + "type": null + } + ], + "return_type": "(samples, intermediates)", + "parent": "LatentDiffusionV1" + }, + { + "type": "function", + "name": "log_images", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "batch", + "type": null + }, + { + "name": "N", + "type": null + }, + { + "name": "n_row", + "type": null + }, + { + "name": "sample", + "type": null + }, + { + "name": "ddim_steps", + "type": null + }, + { + "name": "ddim_eta", + "type": null + }, + { + "name": "return_keys", + "type": null + }, + { + "name": "quantize_denoised", + "type": null + }, + { + "name": "inpaint", + "type": null + }, + { + "name": "plot_denoise_rows", + "type": null + }, + { + "name": "plot_progressive_rows", + "type": null + }, + { + "name": "plot_diffusion_rows", + "type": null + } + ], + "return_type": "log", + "parent": "LatentDiffusionV1" + }, + { + "type": "function", + "name": "configure_optimizers", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "opt", + "parent": "LatentDiffusionV1" + }, + { + "type": "function", + "name": "to_rgb", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "x", + "parent": "LatentDiffusionV1" + } + ], + "parent": null + }, + { + "type": "class", + "name": "DiffusionWrapperV1", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "diff_model_config", + "type": null + }, + { + "name": "conditioning_key", + "type": null + } + ], + "return_type": null, + "parent": "DiffusionWrapperV1" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "t", + "type": null + }, + { + "name": "c_concat", + "type": "list" + }, + { + "name": "c_crossattn", + "type": "list" + } + ], + "return_type": "out", + "parent": "DiffusionWrapperV1" + } + ], + "parent": null + }, + { + "type": "class", + "name": "Layout2ImgDiffusionV1", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "cond_stage_key", + "type": null + } + ], + "return_type": null, + "parent": "Layout2ImgDiffusionV1" + }, + { + "type": "function", + "name": "log_images", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "batch", + "type": null + }, + { + "name": "N", + "type": null + } + ], + "return_type": "logs", + "parent": "Layout2ImgDiffusionV1" + } + ], + "parent": null + } + ], + "extensions-builtin/LDSR/vqvae_quantize.py": [ + { + "type": "class", + "name": "VectorQuantizer2", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "n_e", + "type": null + }, + { + "name": "e_dim", + "type": null + }, + { + "name": "beta", + "type": null + }, + { + "name": "remap", + "type": null + }, + { + "name": "unknown_index", + "type": null + }, + { + "name": "sane_index_shape", + "type": null + }, + { + "name": "legacy", + "type": null + } + ], + "return_type": null, + "parent": "VectorQuantizer2" + }, + { + "type": "function", + "name": "remap_to_used", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "inds", + "type": null + } + ], + "return_type": "new.reshape(ishape)", + "parent": "VectorQuantizer2" + }, + { + "type": "function", + "name": "unmap_to_all", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "inds", + "type": null + } + ], + "return_type": "back.reshape(ishape)", + "parent": "VectorQuantizer2" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "z", + "type": null + }, + { + "name": "temp", + "type": null + }, + { + "name": "rescale_logits", + "type": null + }, + { + "name": "return_logits", + "type": null + } + ], + "return_type": "(z_q, loss, (perplexity, min_encodings, min_encoding_indices))", + "parent": "VectorQuantizer2" + }, + { + "type": "function", + "name": "get_codebook_entry", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "indices", + "type": null + }, + { + "name": "shape", + "type": null + } + ], + "return_type": "z_q", + "parent": "VectorQuantizer2" + } + ], + "parent": null + } + ], + "extensions-builtin/Lora/extra_networks_lora.py": [ + { + "type": "class", + "name": "ExtraNetworkLora", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "ExtraNetworkLora" + }, + { + "type": "function", + "name": "activate", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": null + }, + { + "name": "params_list", + "type": null + } + ], + "return_type": null, + "parent": "ExtraNetworkLora" + }, + { + "type": "function", + "name": "deactivate", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": null + } + ], + "return_type": null, + "parent": "ExtraNetworkLora" + } + ], + "parent": null + } + ], + "extensions-builtin/Lora/lora.py": [], + "extensions-builtin/Lora/lora_patches.py": [ + { + "type": "class", + "name": "LoraPatches", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "LoraPatches" + }, + { + "type": "function", + "name": "undo", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "LoraPatches" + } + ], + "parent": null + } + ], + "extensions-builtin/Lora/lyco_helpers.py": [ + { + "type": "function", + "name": "make_weight_cp", + "args": [ + { + "name": "t", + "type": null + }, + { + "name": "wa", + "type": null + }, + { + "name": "wb", + "type": null + } + ], + "return_type": "torch.einsum('i j k l, i r -> r j k l', temp, wa)", + "parent": null + }, + { + "type": "function", + "name": "rebuild_conventional", + "args": [ + { + "name": "up", + "type": null + }, + { + "name": "down", + "type": null + }, + { + "name": "shape", + "type": null + }, + { + "name": "dyn_dim", + "type": null + } + ], + "return_type": "(up @ down).reshape(shape)", + "parent": null + }, + { + "type": "function", + "name": "rebuild_cp_decomposition", + "args": [ + { + "name": "up", + "type": null + }, + { + "name": "down", + "type": null + }, + { + "name": "mid", + "type": null + } + ], + "return_type": "torch.einsum('n m k l, i n, m j -> i j k l', mid, up, down)", + "parent": null + } + ], + "extensions-builtin/Lora/network.py": [ + { + "type": "class", + "name": "SdVersion", + "methods": [], + "parent": null + }, + { + "type": "class", + "name": "NetworkOnDisk", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "name", + "type": null + }, + { + "name": "filename", + "type": null + } + ], + "return_type": "metadata", + "parent": "NetworkOnDisk" + }, + { + "type": "function", + "name": "detect_version", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "SdVersion.Unknown", + "parent": "NetworkOnDisk" + }, + { + "type": "function", + "name": "set_hash", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "v", + "type": null + } + ], + "return_type": null, + "parent": "NetworkOnDisk" + }, + { + "type": "function", + "name": "read_hash", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "NetworkOnDisk" + }, + { + "type": "function", + "name": "get_alias", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "self.name", + "parent": "NetworkOnDisk" + } + ], + "parent": null + }, + { + "type": "class", + "name": "Network", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "name", + "type": null + }, + { + "name": "network_on_disk", + "type": "NetworkOnDisk" + } + ], + "return_type": null, + "parent": "Network" + } + ], + "parent": null + }, + { + "type": "class", + "name": "ModuleType", + "methods": [ + { + "type": "function", + "name": "create_module", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "net", + "type": "Network" + }, + { + "name": "weights", + "type": "NetworkWeights" + } + ], + "return_type": "None", + "parent": "ModuleType" + } + ], + "parent": null + }, + { + "type": "class", + "name": "NetworkModule", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "net", + "type": "Network" + }, + { + "name": "weights", + "type": "NetworkWeights" + } + ], + "return_type": null, + "parent": "NetworkModule" + }, + { + "type": "function", + "name": "multiplier", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "self.network.te_multiplier", + "parent": "NetworkModule" + }, + { + "type": "function", + "name": "calc_scale", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "(1.0)", + "parent": "NetworkModule" + }, + { + "type": "function", + "name": "finalize_updown", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "updown", + "type": null + }, + { + "name": "orig_weight", + "type": null + }, + { + "name": "output_shape", + "type": null + }, + { + "name": "ex_bias", + "type": null + } + ], + "return_type": "(updown * self.calc_scale() * self.multiplier(), ex_bias)", + "parent": "NetworkModule" + }, + { + "type": "function", + "name": "calc_updown", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "target", + "type": null + } + ], + "return_type": null, + "parent": "NetworkModule" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "y", + "type": null + } + ], + "return_type": null, + "parent": "NetworkModule" + } + ], + "parent": null + } + ], + "extensions-builtin/Lora/network_full.py": [ + { + "type": "class", + "name": "ModuleTypeFull", + "methods": [ + { + "type": "function", + "name": "create_module", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "net", + "type": "network.Network" + }, + { + "name": "weights", + "type": "network.NetworkWeights" + } + ], + "return_type": "None", + "parent": "ModuleTypeFull" + } + ], + "parent": null + }, + { + "type": "class", + "name": "NetworkModuleFull", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "net", + "type": "network.Network" + }, + { + "name": "weights", + "type": "network.NetworkWeights" + } + ], + "return_type": null, + "parent": "NetworkModuleFull" + }, + { + "type": "function", + "name": "calc_updown", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "orig_weight", + "type": null + } + ], + "return_type": "self.finalize_updown(updown, orig_weight, output_shape, ex_bias)", + "parent": "NetworkModuleFull" + } + ], + "parent": null + } + ], + "extensions-builtin/Lora/network_hada.py": [ + { + "type": "class", + "name": "ModuleTypeHada", + "methods": [ + { + "type": "function", + "name": "create_module", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "net", + "type": "network.Network" + }, + { + "name": "weights", + "type": "network.NetworkWeights" + } + ], + "return_type": "None", + "parent": "ModuleTypeHada" + } + ], + "parent": null + }, + { + "type": "class", + "name": "NetworkModuleHada", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "net", + "type": "network.Network" + }, + { + "name": "weights", + "type": "network.NetworkWeights" + } + ], + "return_type": null, + "parent": "NetworkModuleHada" + }, + { + "type": "function", + "name": "calc_updown", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "orig_weight", + "type": null + } + ], + "return_type": "self.finalize_updown(updown, orig_weight, output_shape)", + "parent": "NetworkModuleHada" + } + ], + "parent": null + } + ], + "extensions-builtin/Lora/network_ia3.py": [ + { + "type": "class", + "name": "ModuleTypeIa3", + "methods": [ + { + "type": "function", + "name": "create_module", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "net", + "type": "network.Network" + }, + { + "name": "weights", + "type": "network.NetworkWeights" + } + ], + "return_type": "None", + "parent": "ModuleTypeIa3" + } + ], + "parent": null + }, + { + "type": "class", + "name": "NetworkModuleIa3", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "net", + "type": "network.Network" + }, + { + "name": "weights", + "type": "network.NetworkWeights" + } + ], + "return_type": null, + "parent": "NetworkModuleIa3" + }, + { + "type": "function", + "name": "calc_updown", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "orig_weight", + "type": null + } + ], + "return_type": "self.finalize_updown(updown, orig_weight, output_shape)", + "parent": "NetworkModuleIa3" + } + ], + "parent": null + } + ], + "extensions-builtin/Lora/network_lokr.py": [ + { + "type": "class", + "name": "ModuleTypeLokr", + "methods": [ + { + "type": "function", + "name": "create_module", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "net", + "type": "network.Network" + }, + { + "name": "weights", + "type": "network.NetworkWeights" + } + ], + "return_type": "None", + "parent": "ModuleTypeLokr" + } + ], + "parent": null + }, + { + "type": "function", + "name": "make_kron", + "args": [ + { + "name": "orig_shape", + "type": null + }, + { + "name": "w1", + "type": null + }, + { + "name": "w2", + "type": null + } + ], + "return_type": "torch.kron(w1, w2).reshape(orig_shape)", + "parent": null + }, + { + "type": "class", + "name": "NetworkModuleLokr", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "net", + "type": "network.Network" + }, + { + "name": "weights", + "type": "network.NetworkWeights" + } + ], + "return_type": null, + "parent": "NetworkModuleLokr" + }, + { + "type": "function", + "name": "calc_updown", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "orig_weight", + "type": null + } + ], + "return_type": "self.finalize_updown(updown, orig_weight, output_shape)", + "parent": "NetworkModuleLokr" + } + ], + "parent": null + } + ], + "extensions-builtin/Lora/network_lora.py": [ + { + "type": "class", + "name": "ModuleTypeLora", + "methods": [ + { + "type": "function", + "name": "create_module", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "net", + "type": "network.Network" + }, + { + "name": "weights", + "type": "network.NetworkWeights" + } + ], + "return_type": "None", + "parent": "ModuleTypeLora" + } + ], + "parent": null + }, + { + "type": "class", + "name": "NetworkModuleLora", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "net", + "type": "network.Network" + }, + { + "name": "weights", + "type": "network.NetworkWeights" + } + ], + "return_type": null, + "parent": "NetworkModuleLora" + }, + { + "type": "function", + "name": "create_module", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "weights", + "type": null + }, + { + "name": "key", + "type": null + }, + { + "name": "none_ok", + "type": null + } + ], + "return_type": "module", + "parent": "NetworkModuleLora" + }, + { + "type": "function", + "name": "calc_updown", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "orig_weight", + "type": null + } + ], + "return_type": "self.finalize_updown(updown, orig_weight, output_shape)", + "parent": "NetworkModuleLora" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "y", + "type": null + } + ], + "return_type": "(y + self.up_model(self.down_model(x)) * self.multiplier() * self.calc_scale())", + "parent": "NetworkModuleLora" + } + ], + "parent": null + } + ], + "extensions-builtin/Lora/network_norm.py": [ + { + "type": "class", + "name": "ModuleTypeNorm", + "methods": [ + { + "type": "function", + "name": "create_module", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "net", + "type": "network.Network" + }, + { + "name": "weights", + "type": "network.NetworkWeights" + } + ], + "return_type": "None", + "parent": "ModuleTypeNorm" + } + ], + "parent": null + }, + { + "type": "class", + "name": "NetworkModuleNorm", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "net", + "type": "network.Network" + }, + { + "name": "weights", + "type": "network.NetworkWeights" + } + ], + "return_type": null, + "parent": "NetworkModuleNorm" + }, + { + "type": "function", + "name": "calc_updown", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "orig_weight", + "type": null + } + ], + "return_type": "self.finalize_updown(updown, orig_weight, output_shape, ex_bias)", + "parent": "NetworkModuleNorm" + } + ], + "parent": null + } + ], + "extensions-builtin/Lora/networks.py": [ + { + "type": "function", + "name": "convert_diffusers_name_to_compvis", + "args": [ + { + "name": "key", + "type": null + }, + { + "name": "is_sd2", + "type": null + } + ], + "return_type": "key", + "parent": null + }, + { + "type": "function", + "name": "assign_network_names_to_compvis_modules", + "args": [ + { + "name": "sd_model", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "load_network", + "args": [ + { + "name": "name", + "type": null + }, + { + "name": "network_on_disk", + "type": null + } + ], + "return_type": "net", + "parent": null + }, + { + "type": "function", + "name": "purge_networks_from_memory", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "load_networks", + "args": [ + { + "name": "names", + "type": null + }, + { + "name": "te_multipliers", + "type": null + }, + { + "name": "unet_multipliers", + "type": null + }, + { + "name": "dyn_dims", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "network_restore_weights_from_backup", + "args": [ + { + "name": "self", + "type": "Union[torch.nn.Conv2d, torch.nn.Linear, torch.nn.GroupNorm, torch.nn.\n LayerNorm, torch.nn.MultiheadAttention]" + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "network_apply_weights", + "args": [ + { + "name": "self", + "type": "Union[torch.nn.Conv2d, torch.nn.Linear, torch.nn.GroupNorm, torch.nn.\n LayerNorm, torch.nn.MultiheadAttention]" + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "network_forward", + "args": [ + { + "name": "module", + "type": null + }, + { + "name": "input", + "type": null + }, + { + "name": "original_forward", + "type": null + } + ], + "return_type": "y", + "parent": null + }, + { + "type": "function", + "name": "network_reset_cached_weight", + "args": [ + { + "name": "self", + "type": "Union[torch.nn.Conv2d, torch.nn.Linear]" + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "network_Linear_forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "input", + "type": null + } + ], + "return_type": "originals.Linear_forward(self, input)", + "parent": null + }, + { + "type": "function", + "name": "network_Linear_load_state_dict", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "originals.Linear_load_state_dict(self, *args, **kwargs)", + "parent": null + }, + { + "type": "function", + "name": "network_Conv2d_forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "input", + "type": null + } + ], + "return_type": "originals.Conv2d_forward(self, input)", + "parent": null + }, + { + "type": "function", + "name": "network_Conv2d_load_state_dict", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "originals.Conv2d_load_state_dict(self, *args, **kwargs)", + "parent": null + }, + { + "type": "function", + "name": "network_GroupNorm_forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "input", + "type": null + } + ], + "return_type": "originals.GroupNorm_forward(self, input)", + "parent": null + }, + { + "type": "function", + "name": "network_GroupNorm_load_state_dict", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "originals.GroupNorm_load_state_dict(self, *args, **kwargs)", + "parent": null + }, + { + "type": "function", + "name": "network_LayerNorm_forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "input", + "type": null + } + ], + "return_type": "originals.LayerNorm_forward(self, input)", + "parent": null + }, + { + "type": "function", + "name": "network_LayerNorm_load_state_dict", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "originals.LayerNorm_load_state_dict(self, *args, **kwargs)", + "parent": null + }, + { + "type": "function", + "name": "network_MultiheadAttention_forward", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "originals.MultiheadAttention_forward(self, *args, **kwargs)", + "parent": null + }, + { + "type": "function", + "name": "network_MultiheadAttention_load_state_dict", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "originals.MultiheadAttention_load_state_dict(self, *args, **kwargs)", + "parent": null + }, + { + "type": "function", + "name": "list_available_networks", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "infotext_pasted", + "args": [ + { + "name": "infotext", + "type": null + }, + { + "name": "params", + "type": null + } + ], + "return_type": null, + "parent": null + } + ], + "extensions-builtin/Lora/preload.py": [ + { + "type": "function", + "name": "preload", + "args": [ + { + "name": "parser", + "type": null + } + ], + "return_type": null, + "parent": null + } + ], + "extensions-builtin/Lora/scripts/lora_script.py": [ + { + "type": "function", + "name": "unload", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "before_ui", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "create_lora_json", + "args": [ + { + "name": "obj", + "type": "network.NetworkOnDisk" + } + ], + "return_type": "{'name': obj.name, 'alias': obj.alias, 'path': obj.filename, 'metadata':\n obj.metadata}", + "parent": null + }, + { + "type": "function", + "name": "api_networks", + "args": [ + { + "name": "_", + "type": "gr.Blocks" + }, + { + "name": "app", + "type": "FastAPI" + } + ], + "return_type": "[create_lora_json(obj) for obj in networks.available_networks.values()]", + "parent": null + }, + { + "type": "function", + "name": "infotext_pasted", + "args": [ + { + "name": "infotext", + "type": null + }, + { + "name": "d", + "type": null + } + ], + "return_type": "f\"\"\"= 16)", + "parent": null + }, + { + "type": "function", + "name": "build_tags", + "args": [ + { + "name": "metadata", + "type": null + } + ], + "return_type": "[(tag, tags[tag]) for tag in ordered_tags]", + "parent": null + }, + { + "type": "class", + "name": "LoraUserMetadataEditor", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "ui", + "type": null + }, + { + "name": "tabname", + "type": null + }, + { + "name": "page", + "type": null + } + ], + "return_type": null, + "parent": "LoraUserMetadataEditor" + }, + { + "type": "function", + "name": "save_lora_user_metadata", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "name", + "type": null + }, + { + "name": "desc", + "type": null + }, + { + "name": "sd_version", + "type": null + }, + { + "name": "activation_text", + "type": null + }, + { + "name": "preferred_weight", + "type": null + }, + { + "name": "notes", + "type": null + } + ], + "return_type": null, + "parent": "LoraUserMetadataEditor" + }, + { + "type": "function", + "name": "get_metadata_table", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "name", + "type": null + } + ], + "return_type": "table", + "parent": "LoraUserMetadataEditor" + }, + { + "type": "function", + "name": "put_values_into_components", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "name", + "type": null + } + ], + "return_type": "[*values[0:5], item.get('sd_version', 'Unknown'), gr.HighlightedText.update\n (value=gradio_tags, visible=True if tags else False), user_metadata.get\n ('activation text', ''), float(user_metadata.get('preferred weight', \n 0.0)), gr.update(visible=True if tags else False), gr.update(value=self\n .generate_random_prompt_from_tags(tags), visible=True if tags else False)]", + "parent": "LoraUserMetadataEditor" + }, + { + "type": "function", + "name": "generate_random_prompt", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "name", + "type": null + } + ], + "return_type": "self.generate_random_prompt_from_tags(tags)", + "parent": "LoraUserMetadataEditor" + }, + { + "type": "function", + "name": "generate_random_prompt_from_tags", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "tags", + "type": null + } + ], + "return_type": "\"\"\", \"\"\".join(sorted(res))", + "parent": "LoraUserMetadataEditor" + }, + { + "type": "function", + "name": "create_extra_default_items_in_left_column", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "LoraUserMetadataEditor" + }, + { + "type": "function", + "name": "create_editor", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "(activation_text + ', ' + tag if activation_text else tag)", + "parent": "LoraUserMetadataEditor" + } + ], + "parent": null + } + ], + "extensions-builtin/Lora/ui_extra_networks_lora.py": [ + { + "type": "class", + "name": "ExtraNetworksPageLora", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "ExtraNetworksPageLora" + }, + { + "type": "function", + "name": "refresh", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "ExtraNetworksPageLora" + }, + { + "type": "function", + "name": "create_item", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "name", + "type": null + }, + { + "name": "index", + "type": null + }, + { + "name": "enable_filter", + "type": null + } + ], + "return_type": "item", + "parent": "ExtraNetworksPageLora" + }, + { + "type": "function", + "name": "list_items", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "ExtraNetworksPageLora" + }, + { + "type": "function", + "name": "allowed_directories_for_previews", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "[shared.cmd_opts.lora_dir, shared.cmd_opts.lyco_dir_backcompat]", + "parent": "ExtraNetworksPageLora" + }, + { + "type": "function", + "name": "create_user_metadata_editor", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "ui", + "type": null + }, + { + "name": "tabname", + "type": null + } + ], + "return_type": "LoraUserMetadataEditor(ui, tabname, self)", + "parent": "ExtraNetworksPageLora" + } + ], + "parent": null + } + ], + "extensions-builtin/ScuNET/preload.py": [ + { + "type": "function", + "name": "preload", + "args": [ + { + "name": "parser", + "type": null + } + ], + "return_type": null, + "parent": null + } + ], + "extensions-builtin/ScuNET/scripts/scunet_model.py": [ + { + "type": "class", + "name": "UpscalerScuNET", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "dirname", + "type": null + } + ], + "return_type": null, + "parent": "UpscalerScuNET" + }, + { + "type": "function", + "name": "tiled_inference", + "args": [ + { + "name": "img", + "type": null + }, + { + "name": "model", + "type": null + } + ], + "return_type": "output", + "parent": "UpscalerScuNET" + }, + { + "type": "function", + "name": "do_upscale", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "img", + "type": "PIL.Image.Image" + }, + { + "name": "selected_file", + "type": null + } + ], + "return_type": "PIL.Image.fromarray((output * 255).astype(np.uint8))", + "parent": "UpscalerScuNET" + }, + { + "type": "function", + "name": "load_model", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "path", + "type": "str" + } + ], + "return_type": "model", + "parent": "UpscalerScuNET" + } + ], + "parent": null + }, + { + "type": "function", + "name": "on_ui_settings", + "args": [], + "return_type": null, + "parent": null + } + ], + "extensions-builtin/ScuNET/scunet_model_arch.py": [ + { + "type": "class", + "name": "WMSA", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "input_dim", + "type": null + }, + { + "name": "output_dim", + "type": null + }, + { + "name": "head_dim", + "type": null + }, + { + "name": "window_size", + "type": null + }, + { + "name": "type", + "type": null + } + ], + "return_type": null, + "parent": "WMSA" + }, + { + "type": "function", + "name": "generate_mask", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "h", + "type": null + }, + { + "name": "w", + "type": null + }, + { + "name": "p", + "type": null + }, + { + "name": "shift", + "type": null + } + ], + "return_type": "attn_mask", + "parent": "WMSA" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "output", + "parent": "WMSA" + }, + { + "type": "function", + "name": "relative_embedding", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "self.relative_position_params[:, relation[:, :, 0].long(), relation[:, :, 1\n ].long()]", + "parent": "WMSA" + } + ], + "parent": null + }, + { + "type": "class", + "name": "Block", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "input_dim", + "type": null + }, + { + "name": "output_dim", + "type": null + }, + { + "name": "head_dim", + "type": null + }, + { + "name": "window_size", + "type": null + }, + { + "name": "drop_path", + "type": null + }, + { + "name": "type", + "type": null + }, + { + "name": "input_resolution", + "type": null + } + ], + "return_type": null, + "parent": "Block" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "x", + "parent": "Block" + } + ], + "parent": null + }, + { + "type": "class", + "name": "ConvTransBlock", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "conv_dim", + "type": null + }, + { + "name": "trans_dim", + "type": null + }, + { + "name": "head_dim", + "type": null + }, + { + "name": "window_size", + "type": null + }, + { + "name": "drop_path", + "type": null + }, + { + "name": "type", + "type": null + }, + { + "name": "input_resolution", + "type": null + } + ], + "return_type": null, + "parent": "ConvTransBlock" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "x", + "parent": "ConvTransBlock" + } + ], + "parent": null + }, + { + "type": "class", + "name": "SCUNet", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "in_nc", + "type": null + }, + { + "name": "config", + "type": null + }, + { + "name": "dim", + "type": null + }, + { + "name": "drop_path_rate", + "type": null + }, + { + "name": "input_resolution", + "type": null + } + ], + "return_type": null, + "parent": "SCUNet" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x0", + "type": null + } + ], + "return_type": "x", + "parent": "SCUNet" + }, + { + "type": "function", + "name": "_init_weights", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "m", + "type": null + } + ], + "return_type": null, + "parent": "SCUNet" + } + ], + "parent": null + } + ], + "extensions-builtin/SwinIR/preload.py": [ + { + "type": "function", + "name": "preload", + "args": [ + { + "name": "parser", + "type": null + } + ], + "return_type": null, + "parent": null + } + ], + "extensions-builtin/SwinIR/scripts/swinir_model.py": [ + { + "type": "class", + "name": "UpscalerSwinIR", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "dirname", + "type": null + } + ], + "return_type": null, + "parent": "UpscalerSwinIR" + }, + { + "type": "function", + "name": "do_upscale", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "img", + "type": null + }, + { + "name": "model_file", + "type": null + } + ], + "return_type": "img", + "parent": "UpscalerSwinIR" + }, + { + "type": "function", + "name": "load_model", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "path", + "type": null + }, + { + "name": "scale", + "type": null + } + ], + "return_type": "model", + "parent": "UpscalerSwinIR" + } + ], + "parent": null + }, + { + "type": "function", + "name": "upscale", + "args": [ + { + "name": "img", + "type": null + }, + { + "name": "model", + "type": null + }, + { + "name": "tile", + "type": null + }, + { + "name": "tile_overlap", + "type": null + }, + { + "name": "window_size", + "type": null + }, + { + "name": "scale", + "type": null + } + ], + "return_type": "Image.fromarray(output, 'RGB')", + "parent": null + }, + { + "type": "function", + "name": "inference", + "args": [ + { + "name": "img", + "type": null + }, + { + "name": "model", + "type": null + }, + { + "name": "tile", + "type": null + }, + { + "name": "tile_overlap", + "type": null + }, + { + "name": "window_size", + "type": null + }, + { + "name": "scale", + "type": null + } + ], + "return_type": "output", + "parent": null + }, + { + "type": "function", + "name": "on_ui_settings", + "args": [], + "return_type": null, + "parent": null + } + ], + "extensions-builtin/SwinIR/swinir_model_arch.py": [ + { + "type": "class", + "name": "Mlp", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "in_features", + "type": null + }, + { + "name": "hidden_features", + "type": null + }, + { + "name": "out_features", + "type": null + }, + { + "name": "act_layer", + "type": null + }, + { + "name": "drop", + "type": null + } + ], + "return_type": null, + "parent": "Mlp" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "x", + "parent": "Mlp" + } + ], + "parent": null + }, + { + "type": "function", + "name": "window_partition", + "args": [ + { + "name": "x", + "type": null + }, + { + "name": "window_size", + "type": null + } + ], + "return_type": "windows", + "parent": null + }, + { + "type": "function", + "name": "window_reverse", + "args": [ + { + "name": "windows", + "type": null + }, + { + "name": "window_size", + "type": null + }, + { + "name": "H", + "type": null + }, + { + "name": "W", + "type": null + } + ], + "return_type": "x", + "parent": null + }, + { + "type": "class", + "name": "WindowAttention", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "dim", + "type": null + }, + { + "name": "window_size", + "type": null + }, + { + "name": "num_heads", + "type": null + }, + { + "name": "qkv_bias", + "type": null + }, + { + "name": "qk_scale", + "type": null + }, + { + "name": "attn_drop", + "type": null + }, + { + "name": "proj_drop", + "type": null + } + ], + "return_type": null, + "parent": "WindowAttention" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "mask", + "type": null + } + ], + "return_type": "x", + "parent": "WindowAttention" + }, + { + "type": "function", + "name": "extra_repr", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "f\"\"\"dim={self.dim}, window_size={self.window_size}, num_heads={self.num_heads}\"\"\"", + "parent": "WindowAttention" + }, + { + "type": "function", + "name": "flops", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "N", + "type": null + } + ], + "return_type": "flops", + "parent": "WindowAttention" + } + ], + "parent": null + }, + { + "type": "class", + "name": "SwinTransformerBlock", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "dim", + "type": null + }, + { + "name": "input_resolution", + "type": null + }, + { + "name": "num_heads", + "type": null + }, + { + "name": "window_size", + "type": null + }, + { + "name": "shift_size", + "type": null + }, + { + "name": "mlp_ratio", + "type": null + }, + { + "name": "qkv_bias", + "type": null + }, + { + "name": "qk_scale", + "type": null + }, + { + "name": "drop", + "type": null + }, + { + "name": "attn_drop", + "type": null + }, + { + "name": "drop_path", + "type": null + }, + { + "name": "act_layer", + "type": null + }, + { + "name": "norm_layer", + "type": null + } + ], + "return_type": null, + "parent": "SwinTransformerBlock" + }, + { + "type": "function", + "name": "calculate_mask", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x_size", + "type": null + } + ], + "return_type": "attn_mask", + "parent": "SwinTransformerBlock" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "x_size", + "type": null + } + ], + "return_type": "x", + "parent": "SwinTransformerBlock" + }, + { + "type": "function", + "name": "extra_repr", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "f\"\"\"dim={self.dim}, input_resolution={self.input_resolution}, num_heads={self.num_heads}, window_size={self.window_size}, shift_size={self.shift_size}, mlp_ratio={self.mlp_ratio}\"\"\"", + "parent": "SwinTransformerBlock" + }, + { + "type": "function", + "name": "flops", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "flops", + "parent": "SwinTransformerBlock" + } + ], + "parent": null + }, + { + "type": "class", + "name": "PatchMerging", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "input_resolution", + "type": null + }, + { + "name": "dim", + "type": null + }, + { + "name": "norm_layer", + "type": null + } + ], + "return_type": null, + "parent": "PatchMerging" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "x", + "parent": "PatchMerging" + }, + { + "type": "function", + "name": "extra_repr", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "f\"\"\"input_resolution={self.input_resolution}, dim={self.dim}\"\"\"", + "parent": "PatchMerging" + }, + { + "type": "function", + "name": "flops", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "flops", + "parent": "PatchMerging" + } + ], + "parent": null + }, + { + "type": "class", + "name": "BasicLayer", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "dim", + "type": null + }, + { + "name": "input_resolution", + "type": null + }, + { + "name": "depth", + "type": null + }, + { + "name": "num_heads", + "type": null + }, + { + "name": "window_size", + "type": null + }, + { + "name": "mlp_ratio", + "type": null + }, + { + "name": "qkv_bias", + "type": null + }, + { + "name": "qk_scale", + "type": null + }, + { + "name": "drop", + "type": null + }, + { + "name": "attn_drop", + "type": null + }, + { + "name": "drop_path", + "type": null + }, + { + "name": "norm_layer", + "type": null + }, + { + "name": "downsample", + "type": null + }, + { + "name": "use_checkpoint", + "type": null + } + ], + "return_type": null, + "parent": "BasicLayer" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "x_size", + "type": null + } + ], + "return_type": "x", + "parent": "BasicLayer" + }, + { + "type": "function", + "name": "extra_repr", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "f\"\"\"dim={self.dim}, input_resolution={self.input_resolution}, depth={self.depth}\"\"\"", + "parent": "BasicLayer" + }, + { + "type": "function", + "name": "flops", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "flops", + "parent": "BasicLayer" + } + ], + "parent": null + }, + { + "type": "class", + "name": "RSTB", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "dim", + "type": null + }, + { + "name": "input_resolution", + "type": null + }, + { + "name": "depth", + "type": null + }, + { + "name": "num_heads", + "type": null + }, + { + "name": "window_size", + "type": null + }, + { + "name": "mlp_ratio", + "type": null + }, + { + "name": "qkv_bias", + "type": null + }, + { + "name": "qk_scale", + "type": null + }, + { + "name": "drop", + "type": null + }, + { + "name": "attn_drop", + "type": null + }, + { + "name": "drop_path", + "type": null + }, + { + "name": "norm_layer", + "type": null + }, + { + "name": "downsample", + "type": null + }, + { + "name": "use_checkpoint", + "type": null + }, + { + "name": "img_size", + "type": null + }, + { + "name": "patch_size", + "type": null + }, + { + "name": "resi_connection", + "type": null + } + ], + "return_type": null, + "parent": "RSTB" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "x_size", + "type": null + } + ], + "return_type": "(self.patch_embed(self.conv(self.patch_unembed(self.residual_group(x,\n x_size), x_size))) + x)", + "parent": "RSTB" + }, + { + "type": "function", + "name": "flops", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "flops", + "parent": "RSTB" + } + ], + "parent": null + }, + { + "type": "class", + "name": "PatchEmbed", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "img_size", + "type": null + }, + { + "name": "patch_size", + "type": null + }, + { + "name": "in_chans", + "type": null + }, + { + "name": "embed_dim", + "type": null + }, + { + "name": "norm_layer", + "type": null + } + ], + "return_type": null, + "parent": "PatchEmbed" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "x", + "parent": "PatchEmbed" + }, + { + "type": "function", + "name": "flops", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "flops", + "parent": "PatchEmbed" + } + ], + "parent": null + }, + { + "type": "class", + "name": "PatchUnEmbed", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "img_size", + "type": null + }, + { + "name": "patch_size", + "type": null + }, + { + "name": "in_chans", + "type": null + }, + { + "name": "embed_dim", + "type": null + }, + { + "name": "norm_layer", + "type": null + } + ], + "return_type": null, + "parent": "PatchUnEmbed" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "x_size", + "type": null + } + ], + "return_type": "x", + "parent": "PatchUnEmbed" + }, + { + "type": "function", + "name": "flops", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "flops", + "parent": "PatchUnEmbed" + } + ], + "parent": null + }, + { + "type": "class", + "name": "Upsample", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "scale", + "type": null + }, + { + "name": "num_feat", + "type": null + } + ], + "return_type": null, + "parent": "Upsample" + } + ], + "parent": null + }, + { + "type": "class", + "name": "UpsampleOneStep", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "scale", + "type": null + }, + { + "name": "num_feat", + "type": null + }, + { + "name": "num_out_ch", + "type": null + }, + { + "name": "input_resolution", + "type": null + } + ], + "return_type": null, + "parent": "UpsampleOneStep" + }, + { + "type": "function", + "name": "flops", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "flops", + "parent": "UpsampleOneStep" + } + ], + "parent": null + }, + { + "type": "class", + "name": "SwinIR", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "img_size", + "type": null + }, + { + "name": "patch_size", + "type": null + }, + { + "name": "in_chans", + "type": null + }, + { + "name": "embed_dim", + "type": null + }, + { + "name": "depths", + "type": null + }, + { + "name": "num_heads", + "type": null + }, + { + "name": "window_size", + "type": null + }, + { + "name": "mlp_ratio", + "type": null + }, + { + "name": "qkv_bias", + "type": null + }, + { + "name": "qk_scale", + "type": null + }, + { + "name": "drop_rate", + "type": null + }, + { + "name": "attn_drop_rate", + "type": null + }, + { + "name": "drop_path_rate", + "type": null + }, + { + "name": "norm_layer", + "type": null + }, + { + "name": "ape", + "type": null + }, + { + "name": "patch_norm", + "type": null + }, + { + "name": "use_checkpoint", + "type": null + }, + { + "name": "upscale", + "type": null + }, + { + "name": "img_range", + "type": null + }, + { + "name": "upsampler", + "type": null + }, + { + "name": "resi_connection", + "type": null + } + ], + "return_type": null, + "parent": "SwinIR" + }, + { + "type": "function", + "name": "_init_weights", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "m", + "type": null + } + ], + "return_type": null, + "parent": "SwinIR" + }, + { + "type": "function", + "name": "no_weight_decay", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "{'absolute_pos_embed'}", + "parent": "SwinIR" + }, + { + "type": "function", + "name": "no_weight_decay_keywords", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "{'relative_position_bias_table'}", + "parent": "SwinIR" + }, + { + "type": "function", + "name": "check_image_size", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "x", + "parent": "SwinIR" + }, + { + "type": "function", + "name": "forward_features", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "x", + "parent": "SwinIR" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "x[:, :, :H * self.upscale, :W * self.upscale]", + "parent": "SwinIR" + }, + { + "type": "function", + "name": "flops", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "flops", + "parent": "SwinIR" + } + ], + "parent": null + } + ], + "extensions-builtin/SwinIR/swinir_model_arch_v2.py": [ + { + "type": "class", + "name": "Mlp", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "in_features", + "type": null + }, + { + "name": "hidden_features", + "type": null + }, + { + "name": "out_features", + "type": null + }, + { + "name": "act_layer", + "type": null + }, + { + "name": "drop", + "type": null + } + ], + "return_type": null, + "parent": "Mlp" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "x", + "parent": "Mlp" + } + ], + "parent": null + }, + { + "type": "function", + "name": "window_partition", + "args": [ + { + "name": "x", + "type": null + }, + { + "name": "window_size", + "type": null + } + ], + "return_type": "windows", + "parent": null + }, + { + "type": "function", + "name": "window_reverse", + "args": [ + { + "name": "windows", + "type": null + }, + { + "name": "window_size", + "type": null + }, + { + "name": "H", + "type": null + }, + { + "name": "W", + "type": null + } + ], + "return_type": "x", + "parent": null + }, + { + "type": "class", + "name": "WindowAttention", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "dim", + "type": null + }, + { + "name": "window_size", + "type": null + }, + { + "name": "num_heads", + "type": null + }, + { + "name": "qkv_bias", + "type": null + }, + { + "name": "attn_drop", + "type": null + }, + { + "name": "proj_drop", + "type": null + }, + { + "name": "pretrained_window_size", + "type": null + } + ], + "return_type": null, + "parent": "WindowAttention" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "mask", + "type": null + } + ], + "return_type": "x", + "parent": "WindowAttention" + }, + { + "type": "function", + "name": "extra_repr", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "f\"\"\"dim={self.dim}, window_size={self.window_size}, pretrained_window_size={self.pretrained_window_size}, num_heads={self.num_heads}\"\"\"", + "parent": "WindowAttention" + }, + { + "type": "function", + "name": "flops", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "N", + "type": null + } + ], + "return_type": "flops", + "parent": "WindowAttention" + } + ], + "parent": null + }, + { + "type": "class", + "name": "SwinTransformerBlock", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "dim", + "type": null + }, + { + "name": "input_resolution", + "type": null + }, + { + "name": "num_heads", + "type": null + }, + { + "name": "window_size", + "type": null + }, + { + "name": "shift_size", + "type": null + }, + { + "name": "mlp_ratio", + "type": null + }, + { + "name": "qkv_bias", + "type": null + }, + { + "name": "drop", + "type": null + }, + { + "name": "attn_drop", + "type": null + }, + { + "name": "drop_path", + "type": null + }, + { + "name": "act_layer", + "type": null + }, + { + "name": "norm_layer", + "type": null + }, + { + "name": "pretrained_window_size", + "type": null + } + ], + "return_type": null, + "parent": "SwinTransformerBlock" + }, + { + "type": "function", + "name": "calculate_mask", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x_size", + "type": null + } + ], + "return_type": "attn_mask", + "parent": "SwinTransformerBlock" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "x_size", + "type": null + } + ], + "return_type": "x", + "parent": "SwinTransformerBlock" + }, + { + "type": "function", + "name": "extra_repr", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "f\"\"\"dim={self.dim}, input_resolution={self.input_resolution}, num_heads={self.num_heads}, window_size={self.window_size}, shift_size={self.shift_size}, mlp_ratio={self.mlp_ratio}\"\"\"", + "parent": "SwinTransformerBlock" + }, + { + "type": "function", + "name": "flops", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "flops", + "parent": "SwinTransformerBlock" + } + ], + "parent": null + }, + { + "type": "class", + "name": "PatchMerging", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "input_resolution", + "type": null + }, + { + "name": "dim", + "type": null + }, + { + "name": "norm_layer", + "type": null + } + ], + "return_type": null, + "parent": "PatchMerging" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "x", + "parent": "PatchMerging" + }, + { + "type": "function", + "name": "extra_repr", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "f\"\"\"input_resolution={self.input_resolution}, dim={self.dim}\"\"\"", + "parent": "PatchMerging" + }, + { + "type": "function", + "name": "flops", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "flops", + "parent": "PatchMerging" + } + ], + "parent": null + }, + { + "type": "class", + "name": "BasicLayer", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "dim", + "type": null + }, + { + "name": "input_resolution", + "type": null + }, + { + "name": "depth", + "type": null + }, + { + "name": "num_heads", + "type": null + }, + { + "name": "window_size", + "type": null + }, + { + "name": "mlp_ratio", + "type": null + }, + { + "name": "qkv_bias", + "type": null + }, + { + "name": "drop", + "type": null + }, + { + "name": "attn_drop", + "type": null + }, + { + "name": "drop_path", + "type": null + }, + { + "name": "norm_layer", + "type": null + }, + { + "name": "downsample", + "type": null + }, + { + "name": "use_checkpoint", + "type": null + }, + { + "name": "pretrained_window_size", + "type": null + } + ], + "return_type": null, + "parent": "BasicLayer" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "x_size", + "type": null + } + ], + "return_type": "x", + "parent": "BasicLayer" + }, + { + "type": "function", + "name": "extra_repr", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "f\"\"\"dim={self.dim}, input_resolution={self.input_resolution}, depth={self.depth}\"\"\"", + "parent": "BasicLayer" + }, + { + "type": "function", + "name": "flops", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "flops", + "parent": "BasicLayer" + }, + { + "type": "function", + "name": "_init_respostnorm", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "BasicLayer" + } + ], + "parent": null + }, + { + "type": "class", + "name": "PatchEmbed", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "img_size", + "type": null + }, + { + "name": "patch_size", + "type": null + }, + { + "name": "in_chans", + "type": null + }, + { + "name": "embed_dim", + "type": null + }, + { + "name": "norm_layer", + "type": null + } + ], + "return_type": null, + "parent": "PatchEmbed" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "x", + "parent": "PatchEmbed" + }, + { + "type": "function", + "name": "flops", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "flops", + "parent": "PatchEmbed" + } + ], + "parent": null + }, + { + "type": "class", + "name": "RSTB", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "dim", + "type": null + }, + { + "name": "input_resolution", + "type": null + }, + { + "name": "depth", + "type": null + }, + { + "name": "num_heads", + "type": null + }, + { + "name": "window_size", + "type": null + }, + { + "name": "mlp_ratio", + "type": null + }, + { + "name": "qkv_bias", + "type": null + }, + { + "name": "drop", + "type": null + }, + { + "name": "attn_drop", + "type": null + }, + { + "name": "drop_path", + "type": null + }, + { + "name": "norm_layer", + "type": null + }, + { + "name": "downsample", + "type": null + }, + { + "name": "use_checkpoint", + "type": null + }, + { + "name": "img_size", + "type": null + }, + { + "name": "patch_size", + "type": null + }, + { + "name": "resi_connection", + "type": null + } + ], + "return_type": null, + "parent": "RSTB" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "x_size", + "type": null + } + ], + "return_type": "(self.patch_embed(self.conv(self.patch_unembed(self.residual_group(x,\n x_size), x_size))) + x)", + "parent": "RSTB" + }, + { + "type": "function", + "name": "flops", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "flops", + "parent": "RSTB" + } + ], + "parent": null + }, + { + "type": "class", + "name": "PatchUnEmbed", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "img_size", + "type": null + }, + { + "name": "patch_size", + "type": null + }, + { + "name": "in_chans", + "type": null + }, + { + "name": "embed_dim", + "type": null + }, + { + "name": "norm_layer", + "type": null + } + ], + "return_type": null, + "parent": "PatchUnEmbed" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "x_size", + "type": null + } + ], + "return_type": "x", + "parent": "PatchUnEmbed" + }, + { + "type": "function", + "name": "flops", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "flops", + "parent": "PatchUnEmbed" + } + ], + "parent": null + }, + { + "type": "class", + "name": "Upsample", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "scale", + "type": null + }, + { + "name": "num_feat", + "type": null + } + ], + "return_type": null, + "parent": "Upsample" + } + ], + "parent": null + }, + { + "type": "class", + "name": "Upsample_hf", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "scale", + "type": null + }, + { + "name": "num_feat", + "type": null + } + ], + "return_type": null, + "parent": "Upsample_hf" + } + ], + "parent": null + }, + { + "type": "class", + "name": "UpsampleOneStep", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "scale", + "type": null + }, + { + "name": "num_feat", + "type": null + }, + { + "name": "num_out_ch", + "type": null + }, + { + "name": "input_resolution", + "type": null + } + ], + "return_type": null, + "parent": "UpsampleOneStep" + }, + { + "type": "function", + "name": "flops", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "flops", + "parent": "UpsampleOneStep" + } + ], + "parent": null + }, + { + "type": "class", + "name": "Swin2SR", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "img_size", + "type": null + }, + { + "name": "patch_size", + "type": null + }, + { + "name": "in_chans", + "type": null + }, + { + "name": "embed_dim", + "type": null + }, + { + "name": "depths", + "type": null + }, + { + "name": "num_heads", + "type": null + }, + { + "name": "window_size", + "type": null + }, + { + "name": "mlp_ratio", + "type": null + }, + { + "name": "qkv_bias", + "type": null + }, + { + "name": "drop_rate", + "type": null + }, + { + "name": "attn_drop_rate", + "type": null + }, + { + "name": "drop_path_rate", + "type": null + }, + { + "name": "norm_layer", + "type": null + }, + { + "name": "ape", + "type": null + }, + { + "name": "patch_norm", + "type": null + }, + { + "name": "use_checkpoint", + "type": null + }, + { + "name": "upscale", + "type": null + }, + { + "name": "img_range", + "type": null + }, + { + "name": "upsampler", + "type": null + }, + { + "name": "resi_connection", + "type": null + } + ], + "return_type": null, + "parent": "Swin2SR" + }, + { + "type": "function", + "name": "_init_weights", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "m", + "type": null + } + ], + "return_type": null, + "parent": "Swin2SR" + }, + { + "type": "function", + "name": "no_weight_decay", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "{'absolute_pos_embed'}", + "parent": "Swin2SR" + }, + { + "type": "function", + "name": "no_weight_decay_keywords", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "{'relative_position_bias_table'}", + "parent": "Swin2SR" + }, + { + "type": "function", + "name": "check_image_size", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "x", + "parent": "Swin2SR" + }, + { + "type": "function", + "name": "forward_features", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "x", + "parent": "Swin2SR" + }, + { + "type": "function", + "name": "forward_features_hf", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "x", + "parent": "Swin2SR" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "(x[:, :, :H * self.upscale, :W * self.upscale], aux)", + "parent": "Swin2SR" + }, + { + "type": "function", + "name": "flops", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "flops", + "parent": "Swin2SR" + } + ], + "parent": null + } + ], + "extensions-builtin/canvas-zoom-and-pan/javascript/zoom.js": { + "info": "Detailed JavaScript analysis not implemented in this version." + }, + "extensions-builtin/canvas-zoom-and-pan/scripts/hotkey_config.py": [], + "extensions-builtin/extra-options-section/scripts/extra_options_section.py": [ + { + "type": "class", + "name": "ExtraOptionsSection", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "ExtraOptionsSection" + }, + { + "type": "function", + "name": "title", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "\"\"\"Extra options\"\"\"", + "parent": "ExtraOptionsSection" + }, + { + "type": "function", + "name": "show", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "is_img2img", + "type": null + } + ], + "return_type": "scripts.AlwaysVisible", + "parent": "ExtraOptionsSection" + }, + { + "type": "function", + "name": "ui", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "is_img2img", + "type": null + } + ], + "return_type": "self.comps", + "parent": "ExtraOptionsSection" + }, + { + "type": "function", + "name": "before_process", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": null + } + ], + "return_type": null, + "parent": "ExtraOptionsSection" + } + ], + "parent": null + } + ], + "extensions-builtin/mobile/javascript/mobile.js": { + "info": "Detailed JavaScript analysis not implemented in this version." + }, + "extensions-builtin/prompt-bracket-checker/javascript/prompt-bracket-checker.js": { + "info": "Detailed JavaScript analysis not implemented in this version." + }, + "javascript/aspectRatioOverlay.js": { + "info": "Detailed JavaScript analysis not implemented in this version." + }, + "javascript/contextMenus.js": { + "info": "Detailed JavaScript analysis not implemented in this version." + }, + "javascript/dragdrop.js": { + "info": "Detailed JavaScript analysis not implemented in this version." + }, + "javascript/edit-attention.js": { + "info": "Detailed JavaScript analysis not implemented in this version." + }, + "javascript/edit-order.js": { + "info": "Detailed JavaScript analysis not implemented in this version." + }, + "javascript/extensions.js": { + "info": "Detailed JavaScript analysis not implemented in this version." + }, + "javascript/extraNetworks.js": { + "info": "Detailed JavaScript analysis not implemented in this version." + }, + "javascript/generationParams.js": { + "info": "Detailed JavaScript analysis not implemented in this version." + }, + "javascript/hints.js": { + "info": "Detailed JavaScript analysis not implemented in this version." + }, + "javascript/hires_fix.js": { + "info": "Detailed JavaScript analysis not implemented in this version." + }, + "javascript/imageMaskFix.js": { + "info": "Detailed JavaScript analysis not implemented in this version." + }, + "javascript/imageviewer.js": { + "info": "Detailed JavaScript analysis not implemented in this version." + }, + "javascript/imageviewerGamepad.js": { + "info": "Detailed JavaScript analysis not implemented in this version." + }, + "javascript/inputAccordion.js": { + "info": "Detailed JavaScript analysis not implemented in this version." + }, + "javascript/localStorage.js": { + "info": "Detailed JavaScript analysis not implemented in this version." + }, + "javascript/localization.js": { + "info": "Detailed JavaScript analysis not implemented in this version." + }, + "javascript/notification.js": { + "info": "Detailed JavaScript analysis not implemented in this version." + }, + "javascript/profilerVisualization.js": { + "info": "Detailed JavaScript analysis not implemented in this version." + }, + "javascript/progressbar.js": { + "info": "Detailed JavaScript analysis not implemented in this version." + }, + "javascript/resizeHandle.js": { + "info": "Detailed JavaScript analysis not implemented in this version." + }, + "javascript/textualInversion.js": { + "info": "Detailed JavaScript analysis not implemented in this version." + }, + "javascript/token-counters.js": { + "info": "Detailed JavaScript analysis not implemented in this version." + }, + "javascript/ui.js": { + "info": "Detailed JavaScript analysis not implemented in this version." + }, + "javascript/ui_settings_hints.js": { + "info": "Detailed JavaScript analysis not implemented in this version." + }, + "launch.py": [ + { + "type": "function", + "name": "main", + "args": [], + "return_type": null, + "parent": null + } + ], + "modules/api/api.py": [ + { + "type": "function", + "name": "script_name_to_index", + "args": [ + { + "name": "name", + "type": null + }, + { + "name": "scripts", + "type": null + } + ], + "return_type": "[script.title().lower() for script in scripts].index(name.lower())", + "parent": null + }, + { + "type": "function", + "name": "validate_sampler_name", + "args": [ + { + "name": "name", + "type": null + } + ], + "return_type": "name", + "parent": null + }, + { + "type": "function", + "name": "setUpscalers", + "args": [ + { + "name": "req", + "type": "dict" + } + ], + "return_type": "reqDict", + "parent": null + }, + { + "type": "function", + "name": "verify_url", + "args": [ + { + "name": "url", + "type": null + } + ], + "return_type": "(True)", + "parent": null + }, + { + "type": "function", + "name": "decode_base64_to_image", + "args": [ + { + "name": "encoding", + "type": null + } + ], + "return_type": "image", + "parent": null + }, + { + "type": "function", + "name": "encode_pil_to_base64", + "args": [ + { + "name": "image", + "type": null + } + ], + "return_type": "base64.b64encode(bytes_data)", + "parent": null + }, + { + "type": "function", + "name": "api_middleware", + "args": [ + { + "name": "app", + "type": "FastAPI" + } + ], + "return_type": "res", + "parent": null + }, + { + "type": "class", + "name": "Api", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "app", + "type": "FastAPI" + }, + { + "name": "queue_lock", + "type": "Lock" + } + ], + "return_type": null, + "parent": "Api" + }, + { + "type": "function", + "name": "add_api_route", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "path", + "type": "str" + }, + { + "name": "endpoint", + "type": null + } + ], + "return_type": "self.app.add_api_route(path, endpoint, **kwargs)", + "parent": "Api" + }, + { + "type": "function", + "name": "auth", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "credentials", + "type": "HTTPBasicCredentials" + } + ], + "return_type": "(True)", + "parent": "Api" + }, + { + "type": "function", + "name": "get_selectable_script", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "script_name", + "type": null + }, + { + "name": "script_runner", + "type": null + } + ], + "return_type": "(script, script_idx)", + "parent": "Api" + }, + { + "type": "function", + "name": "get_scripts_list", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "models.ScriptsList(txt2img=t2ilist, img2img=i2ilist)", + "parent": "Api" + }, + { + "type": "function", + "name": "get_script_info", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "res", + "parent": "Api" + }, + { + "type": "function", + "name": "get_script", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "script_name", + "type": null + }, + { + "name": "script_runner", + "type": null + } + ], + "return_type": "script_runner.scripts[script_idx]", + "parent": "Api" + }, + { + "type": "function", + "name": "init_default_script_args", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "script_runner", + "type": null + } + ], + "return_type": "script_args", + "parent": "Api" + }, + { + "type": "function", + "name": "init_script_args", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "request", + "type": null + }, + { + "name": "default_script_args", + "type": null + }, + { + "name": "selectable_scripts", + "type": null + }, + { + "name": "selectable_idx", + "type": null + }, + { + "name": "script_runner", + "type": null + } + ], + "return_type": "script_args", + "parent": "Api" + }, + { + "type": "function", + "name": "text2imgapi", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "txt2imgreq", + "type": "models.StableDiffusionTxt2ImgProcessingAPI" + } + ], + "return_type": "models.TextToImageResponse(images=b64images, parameters=vars(txt2imgreq),\n info=processed.js())", + "parent": "Api" + }, + { + "type": "function", + "name": "img2imgapi", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "img2imgreq", + "type": "models.StableDiffusionImg2ImgProcessingAPI" + } + ], + "return_type": "models.ImageToImageResponse(images=b64images, parameters=vars(img2imgreq),\n info=processed.js())", + "parent": "Api" + }, + { + "type": "function", + "name": "extras_single_image_api", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "req", + "type": "models.ExtrasSingleImageRequest" + } + ], + "return_type": "models.ExtrasSingleImageResponse(image=encode_pil_to_base64(result[0][0]),\n html_info=result[1])", + "parent": "Api" + }, + { + "type": "function", + "name": "extras_batch_images_api", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "req", + "type": "models.ExtrasBatchImagesRequest" + } + ], + "return_type": "models.ExtrasBatchImagesResponse(images=list(map(encode_pil_to_base64,\n result[0])), html_info=result[1])", + "parent": "Api" + }, + { + "type": "function", + "name": "pnginfoapi", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "req", + "type": "models.PNGInfoRequest" + } + ], + "return_type": "models.PNGInfoResponse(info=geninfo, items=items)", + "parent": "Api" + }, + { + "type": "function", + "name": "progressapi", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "req", + "type": "models.ProgressRequest" + } + ], + "return_type": "models.ProgressResponse(progress=progress, eta_relative=eta_relative, state\n =shared.state.dict(), current_image=current_image, textinfo=shared.\n state.textinfo)", + "parent": "Api" + }, + { + "type": "function", + "name": "interrogateapi", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "interrogatereq", + "type": "models.InterrogateRequest" + } + ], + "return_type": "models.InterrogateResponse(caption=processed)", + "parent": "Api" + }, + { + "type": "function", + "name": "interruptapi", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "{}", + "parent": "Api" + }, + { + "type": "function", + "name": "unloadapi", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "{}", + "parent": "Api" + }, + { + "type": "function", + "name": "reloadapi", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "{}", + "parent": "Api" + }, + { + "type": "function", + "name": "skip", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "Api" + }, + { + "type": "function", + "name": "get_config", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "options", + "parent": "Api" + }, + { + "type": "function", + "name": "set_config", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "req", + "type": "Dict[str, Any]" + } + ], + "return_type": null, + "parent": "Api" + }, + { + "type": "function", + "name": "get_cmd_flags", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "vars(shared.cmd_opts)", + "parent": "Api" + }, + { + "type": "function", + "name": "get_samplers", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "[{'name': sampler[0], 'aliases': sampler[2], 'options': sampler[3]} for\n sampler in sd_samplers.all_samplers]", + "parent": "Api" + }, + { + "type": "function", + "name": "get_upscalers", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "[{'name': upscaler.name, 'model_name': upscaler.scaler.model_name,\n 'model_path': upscaler.data_path, 'model_url': None, 'scale': upscaler.\n scale} for upscaler in shared.sd_upscalers]", + "parent": "Api" + }, + { + "type": "function", + "name": "get_latent_upscale_modes", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "[{'name': upscale_mode} for upscale_mode in [*(shared.latent_upscale_modes or\n {})]]", + "parent": "Api" + }, + { + "type": "function", + "name": "get_sd_models", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "[{'title': x.title, 'model_name': x.model_name, 'hash': x.shorthash,\n 'sha256': x.sha256, 'filename': x.filename, 'config':\n find_checkpoint_config_near_filename(x)} for x in sd_models.\n checkpoints_list.values()]", + "parent": "Api" + }, + { + "type": "function", + "name": "get_sd_vaes", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "[{'model_name': x, 'filename': sd_vae.vae_dict[x]} for x in sd_vae.vae_dict\n .keys()]", + "parent": "Api" + }, + { + "type": "function", + "name": "get_hypernetworks", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "[{'name': name, 'path': shared.hypernetworks[name]} for name in shared.\n hypernetworks]", + "parent": "Api" + }, + { + "type": "function", + "name": "get_face_restorers", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "[{'name': x.name(), 'cmd_dir': getattr(x, 'cmd_dir', None)} for x in shared\n .face_restorers]", + "parent": "Api" + }, + { + "type": "function", + "name": "get_realesrgan_models", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "[{'name': x.name, 'path': x.data_path, 'scale': x.scale} for x in\n get_realesrgan_models(None)]", + "parent": "Api" + }, + { + "type": "function", + "name": "get_prompt_styles", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "styleList", + "parent": "Api" + }, + { + "type": "function", + "name": "get_embeddings", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "{'loaded': convert_embeddings(db.word_embeddings), 'skipped':\n convert_embeddings(db.skipped_embeddings)}", + "parent": "Api" + }, + { + "type": "function", + "name": "refresh_checkpoints", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "Api" + }, + { + "type": "function", + "name": "refresh_vae", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "Api" + }, + { + "type": "function", + "name": "create_embedding", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "args", + "type": "dict" + } + ], + "return_type": "models.CreateResponse(info=f'create embedding filename: {filename}')", + "parent": "Api" + }, + { + "type": "function", + "name": "create_hypernetwork", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "args", + "type": "dict" + } + ], + "return_type": "models.CreateResponse(info=f'create hypernetwork filename: {filename}')", + "parent": "Api" + }, + { + "type": "function", + "name": "preprocess", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "args", + "type": "dict" + } + ], + "return_type": "models.PreprocessResponse(info='preprocess complete')", + "parent": "Api" + }, + { + "type": "function", + "name": "train_embedding", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "args", + "type": "dict" + } + ], + "return_type": "models.TrainResponse(info=\n f'train embedding complete: filename: {filename} error: {error}')", + "parent": "Api" + }, + { + "type": "function", + "name": "train_hypernetwork", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "args", + "type": "dict" + } + ], + "return_type": "models.TrainResponse(info=\n f'train embedding complete: filename: {filename} error: {error}')", + "parent": "Api" + }, + { + "type": "function", + "name": "get_memory", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "models.MemoryResponse(ram=ram, cuda=cuda)", + "parent": "Api" + }, + { + "type": "function", + "name": "launch", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "server_name", + "type": null + }, + { + "name": "port", + "type": null + }, + { + "name": "root_path", + "type": null + } + ], + "return_type": null, + "parent": "Api" + }, + { + "type": "function", + "name": "kill_webui", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "Api" + }, + { + "type": "function", + "name": "restart_webui", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "Response(status_code=501)", + "parent": "Api" + }, + { + "type": "function", + "name": "stop_webui", + "args": [ + { + "name": "request", + "type": null + } + ], + "return_type": "Response('Stopping.')", + "parent": "Api" + } + ], + "parent": null + } + ], + "modules/api/models.py": [ + { + "type": "class", + "name": "ModelDef", + "methods": [], + "parent": null + }, + { + "type": "class", + "name": "PydanticModelGenerator", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "model_name", + "type": "str" + }, + { + "name": "class_instance", + "type": null + }, + { + "name": "additional_fields", + "type": null + } + ], + "return_type": "Optional[field_type]", + "parent": "PydanticModelGenerator" + }, + { + "type": "function", + "name": "generate_model", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "DynamicModel", + "parent": "PydanticModelGenerator" + } + ], + "parent": null + }, + { + "type": "class", + "name": "TextToImageResponse", + "methods": [], + "parent": null + }, + { + "type": "class", + "name": "ImageToImageResponse", + "methods": [], + "parent": null + }, + { + "type": "class", + "name": "ExtrasBaseRequest", + "methods": [], + "parent": null + }, + { + "type": "class", + "name": "ExtraBaseResponse", + "methods": [], + "parent": null + }, + { + "type": "class", + "name": "ExtrasSingleImageRequest", + "methods": [], + "parent": null + }, + { + "type": "class", + "name": "ExtrasSingleImageResponse", + "methods": [], + "parent": null + }, + { + "type": "class", + "name": "FileData", + "methods": [], + "parent": null + }, + { + "type": "class", + "name": "ExtrasBatchImagesRequest", + "methods": [], + "parent": null + }, + { + "type": "class", + "name": "ExtrasBatchImagesResponse", + "methods": [], + "parent": null + }, + { + "type": "class", + "name": "PNGInfoRequest", + "methods": [], + "parent": null + }, + { + "type": "class", + "name": "PNGInfoResponse", + "methods": [], + "parent": null + }, + { + "type": "class", + "name": "ProgressRequest", + "methods": [], + "parent": null + }, + { + "type": "class", + "name": "ProgressResponse", + "methods": [], + "parent": null + }, + { + "type": "class", + "name": "InterrogateRequest", + "methods": [], + "parent": null + }, + { + "type": "class", + "name": "InterrogateResponse", + "methods": [], + "parent": null + }, + { + "type": "class", + "name": "TrainResponse", + "methods": [], + "parent": null + }, + { + "type": "class", + "name": "CreateResponse", + "methods": [], + "parent": null + }, + { + "type": "class", + "name": "PreprocessResponse", + "methods": [], + "parent": null + }, + { + "type": "class", + "name": "SamplerItem", + "methods": [], + "parent": null + }, + { + "type": "class", + "name": "UpscalerItem", + "methods": [], + "parent": null + }, + { + "type": "class", + "name": "LatentUpscalerModeItem", + "methods": [], + "parent": null + }, + { + "type": "class", + "name": "SDModelItem", + "methods": [], + "parent": null + }, + { + "type": "class", + "name": "SDVaeItem", + "methods": [], + "parent": null + }, + { + "type": "class", + "name": "HypernetworkItem", + "methods": [], + "parent": null + }, + { + "type": "class", + "name": "FaceRestorerItem", + "methods": [], + "parent": null + }, + { + "type": "class", + "name": "RealesrganItem", + "methods": [], + "parent": null + }, + { + "type": "class", + "name": "PromptStyleItem", + "methods": [], + "parent": null + }, + { + "type": "class", + "name": "EmbeddingItem", + "methods": [], + "parent": null + }, + { + "type": "class", + "name": "EmbeddingsResponse", + "methods": [], + "parent": null + }, + { + "type": "class", + "name": "MemoryResponse", + "methods": [], + "parent": null + }, + { + "type": "class", + "name": "ScriptsList", + "methods": [], + "parent": null + }, + { + "type": "class", + "name": "ScriptArg", + "methods": [], + "parent": null + }, + { + "type": "class", + "name": "ScriptInfo", + "methods": [], + "parent": null + } + ], + "modules/cache.py": [ + { + "type": "function", + "name": "dump_cache", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "cache", + "args": [ + { + "name": "subsection", + "type": null + } + ], + "return_type": "s", + "parent": null + }, + { + "type": "function", + "name": "cached_data_for_file", + "args": [ + { + "name": "subsection", + "type": null + }, + { + "name": "title", + "type": null + }, + { + "name": "filename", + "type": null + }, + { + "name": "func", + "type": null + } + ], + "return_type": "entry['value']", + "parent": null + } + ], + "modules/call_queue.py": [ + { + "type": "function", + "name": "wrap_queued_call", + "args": [ + { + "name": "func", + "type": null + } + ], + "return_type": "f", + "parent": null + }, + { + "type": "function", + "name": "wrap_gradio_gpu_call", + "args": [ + { + "name": "func", + "type": null + }, + { + "name": "extra_outputs", + "type": null + } + ], + "return_type": "wrap_gradio_call(f, extra_outputs=extra_outputs, add_stats=True)", + "parent": null + }, + { + "type": "function", + "name": "wrap_gradio_call", + "args": [ + { + "name": "func", + "type": null + }, + { + "name": "extra_outputs", + "type": null + }, + { + "name": "add_stats", + "type": null + } + ], + "return_type": "f", + "parent": null + } + ], + "modules/cmd_args.py": [], + "modules/codeformer/codeformer_arch.py": [ + { + "type": "function", + "name": "calc_mean_std", + "args": [ + { + "name": "feat", + "type": null + }, + { + "name": "eps", + "type": null + } + ], + "return_type": "(feat_mean, feat_std)", + "parent": null + }, + { + "type": "function", + "name": "adaptive_instance_normalization", + "args": [ + { + "name": "content_feat", + "type": null + }, + { + "name": "style_feat", + "type": null + } + ], + "return_type": "(normalized_feat * style_std.expand(size) + style_mean.expand(size))", + "parent": null + }, + { + "type": "class", + "name": "PositionEmbeddingSine", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "num_pos_feats", + "type": null + }, + { + "name": "temperature", + "type": null + }, + { + "name": "normalize", + "type": null + }, + { + "name": "scale", + "type": null + } + ], + "return_type": null, + "parent": "PositionEmbeddingSine" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "mask", + "type": null + } + ], + "return_type": "pos", + "parent": "PositionEmbeddingSine" + } + ], + "parent": null + }, + { + "type": "function", + "name": "_get_activation_fn", + "args": [ + { + "name": "activation", + "type": null + } + ], + "return_type": "F.relu", + "parent": null + }, + { + "type": "class", + "name": "TransformerSALayer", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "embed_dim", + "type": null + }, + { + "name": "nhead", + "type": null + }, + { + "name": "dim_mlp", + "type": null + }, + { + "name": "dropout", + "type": null + }, + { + "name": "activation", + "type": null + } + ], + "return_type": null, + "parent": "TransformerSALayer" + }, + { + "type": "function", + "name": "with_pos_embed", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "tensor", + "type": null + }, + { + "name": "pos", + "type": "Optional[Tensor]" + } + ], + "return_type": "(tensor if pos is None else tensor + pos)", + "parent": "TransformerSALayer" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "tgt", + "type": null + }, + { + "name": "tgt_mask", + "type": "Optional[Tensor]" + }, + { + "name": "tgt_key_padding_mask", + "type": "Optional[Tensor]" + }, + { + "name": "query_pos", + "type": "Optional[Tensor]" + } + ], + "return_type": "tgt", + "parent": "TransformerSALayer" + } + ], + "parent": null + }, + { + "type": "class", + "name": "Fuse_sft_block", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "in_ch", + "type": null + }, + { + "name": "out_ch", + "type": null + } + ], + "return_type": null, + "parent": "Fuse_sft_block" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "enc_feat", + "type": null + }, + { + "name": "dec_feat", + "type": null + }, + { + "name": "w", + "type": null + } + ], + "return_type": "out", + "parent": "Fuse_sft_block" + } + ], + "parent": null + }, + { + "type": "class", + "name": "CodeFormer", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "dim_embd", + "type": null + }, + { + "name": "n_head", + "type": null + }, + { + "name": "n_layers", + "type": null + }, + { + "name": "codebook_size", + "type": null + }, + { + "name": "latent_size", + "type": null + }, + { + "name": "connect_list", + "type": null + }, + { + "name": "fix_modules", + "type": null + } + ], + "return_type": null, + "parent": "CodeFormer" + }, + { + "type": "function", + "name": "_init_weights", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "module", + "type": null + } + ], + "return_type": null, + "parent": "CodeFormer" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "w", + "type": null + }, + { + "name": "detach_16", + "type": null + }, + { + "name": "code_only", + "type": null + }, + { + "name": "adain", + "type": null + } + ], + "return_type": "(out, logits, lq_feat)", + "parent": "CodeFormer" + } + ], + "parent": null + } + ], + "modules/codeformer/vqgan_arch.py": [ + { + "type": "function", + "name": "normalize", + "args": [ + { + "name": "in_channels", + "type": null + } + ], + "return_type": "torch.nn.GroupNorm(num_groups=32, num_channels=in_channels, eps=1e-06,\n affine=True)", + "parent": null + }, + { + "type": "function", + "name": "swish", + "args": [ + { + "name": "x", + "type": null + } + ], + "return_type": "(x * torch.sigmoid(x))", + "parent": null + }, + { + "type": "class", + "name": "VectorQuantizer", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "codebook_size", + "type": null + }, + { + "name": "emb_dim", + "type": null + }, + { + "name": "beta", + "type": null + } + ], + "return_type": null, + "parent": "VectorQuantizer" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "z", + "type": null + } + ], + "return_type": "(z_q, loss, {'perplexity': perplexity, 'min_encodings': min_encodings,\n 'min_encoding_indices': min_encoding_indices, 'min_encoding_scores':\n min_encoding_scores, 'mean_distance': mean_distance})", + "parent": "VectorQuantizer" + }, + { + "type": "function", + "name": "get_codebook_feat", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "indices", + "type": null + }, + { + "name": "shape", + "type": null + } + ], + "return_type": "z_q", + "parent": "VectorQuantizer" + } + ], + "parent": null + }, + { + "type": "class", + "name": "GumbelQuantizer", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "codebook_size", + "type": null + }, + { + "name": "emb_dim", + "type": null + }, + { + "name": "num_hiddens", + "type": null + }, + { + "name": "straight_through", + "type": null + }, + { + "name": "kl_weight", + "type": null + }, + { + "name": "temp_init", + "type": null + } + ], + "return_type": null, + "parent": "GumbelQuantizer" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "z", + "type": null + } + ], + "return_type": "(z_q, diff, {'min_encoding_indices': min_encoding_indices})", + "parent": "GumbelQuantizer" + } + ], + "parent": null + }, + { + "type": "class", + "name": "Downsample", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "in_channels", + "type": null + } + ], + "return_type": null, + "parent": "Downsample" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "x", + "parent": "Downsample" + } + ], + "parent": null + }, + { + "type": "class", + "name": "Upsample", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "in_channels", + "type": null + } + ], + "return_type": null, + "parent": "Upsample" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "x", + "parent": "Upsample" + } + ], + "parent": null + }, + { + "type": "class", + "name": "ResBlock", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "in_channels", + "type": null + }, + { + "name": "out_channels", + "type": null + } + ], + "return_type": null, + "parent": "ResBlock" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x_in", + "type": null + } + ], + "return_type": "(x + x_in)", + "parent": "ResBlock" + } + ], + "parent": null + }, + { + "type": "class", + "name": "AttnBlock", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "in_channels", + "type": null + } + ], + "return_type": null, + "parent": "AttnBlock" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "(x + h_)", + "parent": "AttnBlock" + } + ], + "parent": null + }, + { + "type": "class", + "name": "Encoder", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "in_channels", + "type": null + }, + { + "name": "nf", + "type": null + }, + { + "name": "emb_dim", + "type": null + }, + { + "name": "ch_mult", + "type": null + }, + { + "name": "num_res_blocks", + "type": null + }, + { + "name": "resolution", + "type": null + }, + { + "name": "attn_resolutions", + "type": null + } + ], + "return_type": null, + "parent": "Encoder" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "x", + "parent": "Encoder" + } + ], + "parent": null + }, + { + "type": "class", + "name": "Generator", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "nf", + "type": null + }, + { + "name": "emb_dim", + "type": null + }, + { + "name": "ch_mult", + "type": null + }, + { + "name": "res_blocks", + "type": null + }, + { + "name": "img_size", + "type": null + }, + { + "name": "attn_resolutions", + "type": null + } + ], + "return_type": null, + "parent": "Generator" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "x", + "parent": "Generator" + } + ], + "parent": null + }, + { + "type": "class", + "name": "VQAutoEncoder", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "img_size", + "type": null + }, + { + "name": "nf", + "type": null + }, + { + "name": "ch_mult", + "type": null + }, + { + "name": "quantizer", + "type": null + }, + { + "name": "res_blocks", + "type": null + }, + { + "name": "attn_resolutions", + "type": null + }, + { + "name": "codebook_size", + "type": null + }, + { + "name": "emb_dim", + "type": null + }, + { + "name": "beta", + "type": null + }, + { + "name": "gumbel_straight_through", + "type": null + }, + { + "name": "gumbel_kl_weight", + "type": null + }, + { + "name": "model_path", + "type": null + } + ], + "return_type": null, + "parent": "VQAutoEncoder" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "(x, codebook_loss, quant_stats)", + "parent": "VQAutoEncoder" + } + ], + "parent": null + }, + { + "type": "class", + "name": "VQGANDiscriminator", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "nc", + "type": null + }, + { + "name": "ndf", + "type": null + }, + { + "name": "n_layers", + "type": null + }, + { + "name": "model_path", + "type": null + } + ], + "return_type": null, + "parent": "VQGANDiscriminator" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "self.main(x)", + "parent": "VQGANDiscriminator" + } + ], + "parent": null + } + ], + "modules/codeformer_model.py": [ + { + "type": "function", + "name": "setup_model", + "args": [ + { + "name": "dirname", + "type": null + } + ], + "return_type": "\"\"\"CodeFormer\"\"\"", + "parent": null + } + ], + "modules/config_states.py": [ + { + "type": "function", + "name": "list_config_states", + "args": [], + "return_type": "all_config_states", + "parent": null + }, + { + "type": "function", + "name": "get_webui_config", + "args": [], + "return_type": "{'remote': webui_remote, 'commit_hash': webui_commit_hash, 'commit_date':\n webui_commit_date, 'branch': webui_branch}", + "parent": null + }, + { + "type": "function", + "name": "get_extension_config", + "args": [], + "return_type": "ext_config", + "parent": null + }, + { + "type": "function", + "name": "get_config", + "args": [], + "return_type": "{'created_at': creation_time, 'webui': webui_config, 'extensions': ext_config}", + "parent": null + }, + { + "type": "function", + "name": "restore_webui_config", + "args": [ + { + "name": "config", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "restore_extension_config", + "args": [ + { + "name": "config", + "type": null + } + ], + "return_type": null, + "parent": null + } + ], + "modules/deepbooru.py": [ + { + "type": "class", + "name": "DeepDanbooru", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "DeepDanbooru" + }, + { + "type": "function", + "name": "load", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "DeepDanbooru" + }, + { + "type": "function", + "name": "start", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "DeepDanbooru" + }, + { + "type": "function", + "name": "stop", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "DeepDanbooru" + }, + { + "type": "function", + "name": "tag", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "pil_image", + "type": null + } + ], + "return_type": "res", + "parent": "DeepDanbooru" + }, + { + "type": "function", + "name": "tag_multi", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "pil_image", + "type": null + }, + { + "name": "force_disable_ranks", + "type": null + } + ], + "return_type": "\"\"\", \"\"\".join(res)", + "parent": "DeepDanbooru" + } + ], + "parent": null + } + ], + "modules/deepbooru_model.py": [ + { + "type": "class", + "name": "DeepDanbooruModel", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "DeepDanbooruModel" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "t_771", + "parent": "DeepDanbooruModel" + }, + { + "type": "function", + "name": "load_state_dict", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "state_dict", + "type": null + } + ], + "return_type": null, + "parent": "DeepDanbooruModel" + } + ], + "parent": null + } + ], + "modules/devices.py": [ + { + "type": "function", + "name": "has_mps", + "args": [], + "return_type": "(False)", + "parent": null + }, + { + "type": "function", + "name": "get_cuda_device_string", + "args": [], + "return_type": "\"\"\"cuda\"\"\"", + "parent": null + }, + { + "type": "function", + "name": "get_hpu_device_string", + "args": [], + "return_type": "\"\"\"hpu\"\"\"", + "parent": null + }, + { + "type": "function", + "name": "get_optimal_device_name", + "args": [], + "return_type": "\"\"\"cpu\"\"\"", + "parent": null + }, + { + "type": "function", + "name": "get_optimal_device", + "args": [], + "return_type": "torch.device(get_optimal_device_name())", + "parent": null + }, + { + "type": "function", + "name": "get_device_for", + "args": [ + { + "name": "task", + "type": null + } + ], + "return_type": "get_optimal_device()", + "parent": null + }, + { + "type": "function", + "name": "torch_gc", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "enable_tf32", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "cond_cast_unet", + "args": [ + { + "name": "input", + "type": null + } + ], + "return_type": "(input.to(dtype_unet) if unet_needs_upcast else input)", + "parent": null + }, + { + "type": "function", + "name": "cond_cast_float", + "args": [ + { + "name": "input", + "type": null + } + ], + "return_type": "(input.float() if unet_needs_upcast else input)", + "parent": null + }, + { + "type": "function", + "name": "autocast", + "args": [ + { + "name": "disable", + "type": null + } + ], + "return_type": "torch.autocast('cuda')", + "parent": null + }, + { + "type": "function", + "name": "without_autocast", + "args": [ + { + "name": "disable", + "type": null + } + ], + "return_type": "(torch.autocast('cuda', enabled=False) if torch.is_autocast_enabled() and \n not disable else contextlib.nullcontext())", + "parent": null + }, + { + "type": "class", + "name": "NansException", + "methods": [], + "parent": null + }, + { + "type": "function", + "name": "test_for_nans", + "args": [ + { + "name": "x", + "type": null + }, + { + "name": "where", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "first_time_calculation", + "args": [], + "return_type": null, + "parent": null + } + ], + "modules/errors.py": [ + { + "type": "function", + "name": "record_exception", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "report", + "args": [ + { + "name": "message", + "type": "str" + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "print_error_explanation", + "args": [ + { + "name": "message", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "display", + "args": [ + { + "name": "e", + "type": "Exception" + }, + { + "name": "task", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "display_once", + "args": [ + { + "name": "e", + "type": "Exception" + }, + { + "name": "task", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "run", + "args": [ + { + "name": "code", + "type": null + }, + { + "name": "task", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "check_versions", + "args": [], + "return_type": null, + "parent": null + } + ], + "modules/esrgan_model.py": [ + { + "type": "function", + "name": "mod2normal", + "args": [ + { + "name": "state_dict", + "type": null + } + ], + "return_type": "state_dict", + "parent": null + }, + { + "type": "function", + "name": "resrgan2normal", + "args": [ + { + "name": "state_dict", + "type": null + }, + { + "name": "nb", + "type": null + } + ], + "return_type": "state_dict", + "parent": null + }, + { + "type": "function", + "name": "infer_params", + "args": [ + { + "name": "state_dict", + "type": null + } + ], + "return_type": "(in_nc, out_nc, nf, nb, plus, scale)", + "parent": null + }, + { + "type": "class", + "name": "UpscalerESRGAN", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "dirname", + "type": null + } + ], + "return_type": null, + "parent": "UpscalerESRGAN" + }, + { + "type": "function", + "name": "do_upscale", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "img", + "type": null + }, + { + "name": "selected_model", + "type": null + } + ], + "return_type": "img", + "parent": "UpscalerESRGAN" + }, + { + "type": "function", + "name": "load_model", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "path", + "type": "str" + } + ], + "return_type": "model", + "parent": "UpscalerESRGAN" + } + ], + "parent": null + }, + { + "type": "function", + "name": "upscale_without_tiling", + "args": [ + { + "name": "model", + "type": null + }, + { + "name": "img", + "type": null + } + ], + "return_type": "Image.fromarray(output, 'RGB')", + "parent": null + }, + { + "type": "function", + "name": "esrgan_upscale", + "args": [ + { + "name": "model", + "type": null + }, + { + "name": "img", + "type": null + } + ], + "return_type": "output", + "parent": null + } + ], + "modules/esrgan_model_arch.py": [ + { + "type": "class", + "name": "RRDBNet", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "in_nc", + "type": null + }, + { + "name": "out_nc", + "type": null + }, + { + "name": "nf", + "type": null + }, + { + "name": "nb", + "type": null + }, + { + "name": "nr", + "type": null + }, + { + "name": "gc", + "type": null + }, + { + "name": "upscale", + "type": null + }, + { + "name": "norm_type", + "type": null + }, + { + "name": "act_type", + "type": null + }, + { + "name": "mode", + "type": null + }, + { + "name": "upsample_mode", + "type": null + }, + { + "name": "convtype", + "type": null + }, + { + "name": "finalact", + "type": null + }, + { + "name": "gaussian_noise", + "type": null + }, + { + "name": "plus", + "type": null + } + ], + "return_type": null, + "parent": "RRDBNet" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "outm", + "type": null + } + ], + "return_type": "self.model(feat)", + "parent": "RRDBNet" + } + ], + "parent": null + }, + { + "type": "class", + "name": "RRDB", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "nf", + "type": null + }, + { + "name": "nr", + "type": null + }, + { + "name": "kernel_size", + "type": null + }, + { + "name": "gc", + "type": null + }, + { + "name": "stride", + "type": null + }, + { + "name": "bias", + "type": null + }, + { + "name": "pad_type", + "type": null + }, + { + "name": "norm_type", + "type": null + }, + { + "name": "act_type", + "type": null + }, + { + "name": "mode", + "type": null + }, + { + "name": "convtype", + "type": null + }, + { + "name": "spectral_norm", + "type": null + }, + { + "name": "gaussian_noise", + "type": null + }, + { + "name": "plus", + "type": null + } + ], + "return_type": null, + "parent": "RRDB" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "(out * 0.2 + x)", + "parent": "RRDB" + } + ], + "parent": null + }, + { + "type": "class", + "name": "ResidualDenseBlock_5C", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "nf", + "type": null + }, + { + "name": "kernel_size", + "type": null + }, + { + "name": "gc", + "type": null + }, + { + "name": "stride", + "type": null + }, + { + "name": "bias", + "type": null + }, + { + "name": "pad_type", + "type": null + }, + { + "name": "norm_type", + "type": null + }, + { + "name": "act_type", + "type": null + }, + { + "name": "mode", + "type": null + }, + { + "name": "convtype", + "type": null + }, + { + "name": "spectral_norm", + "type": null + }, + { + "name": "gaussian_noise", + "type": null + }, + { + "name": "plus", + "type": null + } + ], + "return_type": null, + "parent": "ResidualDenseBlock_5C" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "self.noise(x5.mul(0.2) + x)", + "parent": "ResidualDenseBlock_5C" + } + ], + "parent": null + }, + { + "type": "class", + "name": "GaussianNoise", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "sigma", + "type": null + }, + { + "name": "is_relative_detach", + "type": null + } + ], + "return_type": null, + "parent": "GaussianNoise" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "x", + "parent": "GaussianNoise" + } + ], + "parent": null + }, + { + "type": "function", + "name": "conv1x1", + "args": [ + { + "name": "in_planes", + "type": null + }, + { + "name": "out_planes", + "type": null + }, + { + "name": "stride", + "type": null + } + ], + "return_type": "nn.Conv2d(in_planes, out_planes, kernel_size=1, stride=stride, bias=False)", + "parent": null + }, + { + "type": "class", + "name": "SRVGGNetCompact", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "num_in_ch", + "type": null + }, + { + "name": "num_out_ch", + "type": null + }, + { + "name": "num_feat", + "type": null + }, + { + "name": "num_conv", + "type": null + }, + { + "name": "upscale", + "type": null + }, + { + "name": "act_type", + "type": null + } + ], + "return_type": null, + "parent": "SRVGGNetCompact" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "out", + "parent": "SRVGGNetCompact" + } + ], + "parent": null + }, + { + "type": "class", + "name": "Upsample", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "size", + "type": null + }, + { + "name": "scale_factor", + "type": null + }, + { + "name": "mode", + "type": null + }, + { + "name": "align_corners", + "type": null + } + ], + "return_type": null, + "parent": "Upsample" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "nn.functional.interpolate(x, size=self.size, scale_factor=self.scale_factor,\n mode=self.mode, align_corners=self.align_corners)", + "parent": "Upsample" + }, + { + "type": "function", + "name": "extra_repr", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "info", + "parent": "Upsample" + } + ], + "parent": null + }, + { + "type": "function", + "name": "pixel_unshuffle", + "args": [ + { + "name": "x", + "type": null + }, + { + "name": "scale", + "type": null + } + ], + "return_type": "x_view.permute(0, 1, 3, 5, 2, 4).reshape(b, out_channel, h, w)", + "parent": null + }, + { + "type": "function", + "name": "pixelshuffle_block", + "args": [ + { + "name": "in_nc", + "type": null + }, + { + "name": "out_nc", + "type": null + }, + { + "name": "upscale_factor", + "type": null + }, + { + "name": "kernel_size", + "type": null + }, + { + "name": "stride", + "type": null + }, + { + "name": "bias", + "type": null + }, + { + "name": "pad_type", + "type": null + }, + { + "name": "norm_type", + "type": null + }, + { + "name": "act_type", + "type": null + }, + { + "name": "convtype", + "type": null + } + ], + "return_type": "sequential(conv, pixel_shuffle, n, a)", + "parent": null + }, + { + "type": "function", + "name": "upconv_block", + "args": [ + { + "name": "in_nc", + "type": null + }, + { + "name": "out_nc", + "type": null + }, + { + "name": "upscale_factor", + "type": null + }, + { + "name": "kernel_size", + "type": null + }, + { + "name": "stride", + "type": null + }, + { + "name": "bias", + "type": null + }, + { + "name": "pad_type", + "type": null + }, + { + "name": "norm_type", + "type": null + }, + { + "name": "act_type", + "type": null + }, + { + "name": "mode", + "type": null + }, + { + "name": "convtype", + "type": null + } + ], + "return_type": "sequential(upsample, conv)", + "parent": null + }, + { + "type": "function", + "name": "make_layer", + "args": [ + { + "name": "basic_block", + "type": null + }, + { + "name": "num_basic_block", + "type": null + } + ], + "return_type": "nn.Sequential(*layers)", + "parent": null + }, + { + "type": "function", + "name": "act", + "args": [ + { + "name": "act_type", + "type": null + }, + { + "name": "inplace", + "type": null + }, + { + "name": "neg_slope", + "type": null + }, + { + "name": "n_prelu", + "type": null + }, + { + "name": "beta", + "type": null + } + ], + "return_type": "layer", + "parent": null + }, + { + "type": "class", + "name": "Identity", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "Identity" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "x", + "parent": "Identity" + } + ], + "parent": null + }, + { + "type": "function", + "name": "norm", + "args": [ + { + "name": "norm_type", + "type": null + }, + { + "name": "nc", + "type": null + } + ], + "return_type": "layer", + "parent": null + }, + { + "type": "function", + "name": "pad", + "args": [ + { + "name": "pad_type", + "type": null + }, + { + "name": "padding", + "type": null + } + ], + "return_type": "layer", + "parent": null + }, + { + "type": "function", + "name": "get_valid_padding", + "args": [ + { + "name": "kernel_size", + "type": null + }, + { + "name": "dilation", + "type": null + } + ], + "return_type": "padding", + "parent": null + }, + { + "type": "class", + "name": "ShortcutBlock", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "submodule", + "type": null + } + ], + "return_type": null, + "parent": "ShortcutBlock" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "output", + "parent": "ShortcutBlock" + }, + { + "type": "function", + "name": "__repr__", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "('Identity + \\n|' + self.sub.__repr__().replace('\\n', '\\n|'))", + "parent": "ShortcutBlock" + } + ], + "parent": null + }, + { + "type": "function", + "name": "sequential", + "args": [], + "return_type": "nn.Sequential(*modules)", + "parent": null + }, + { + "type": "function", + "name": "conv_block", + "args": [ + { + "name": "in_nc", + "type": null + }, + { + "name": "out_nc", + "type": null + }, + { + "name": "kernel_size", + "type": null + }, + { + "name": "stride", + "type": null + }, + { + "name": "dilation", + "type": null + }, + { + "name": "groups", + "type": null + }, + { + "name": "bias", + "type": null + }, + { + "name": "pad_type", + "type": null + }, + { + "name": "norm_type", + "type": null + }, + { + "name": "act_type", + "type": null + }, + { + "name": "mode", + "type": null + }, + { + "name": "convtype", + "type": null + }, + { + "name": "spectral_norm", + "type": null + } + ], + "return_type": "sequential(p, c, n, a)", + "parent": null + } + ], + "modules/extensions.py": [ + { + "type": "function", + "name": "active", + "args": [], + "return_type": "[]", + "parent": null + }, + { + "type": "class", + "name": "Extension", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "name", + "type": null + }, + { + "name": "path", + "type": null + }, + { + "name": "enabled", + "type": null + }, + { + "name": "is_builtin", + "type": null + } + ], + "return_type": null, + "parent": "Extension" + }, + { + "type": "function", + "name": "to_dict", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "{x: getattr(self, x) for x in self.cached_fields}", + "parent": "Extension" + }, + { + "type": "function", + "name": "from_dict", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "d", + "type": null + } + ], + "return_type": null, + "parent": "Extension" + }, + { + "type": "function", + "name": "read_info_from_repo", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "self.to_dict()", + "parent": "Extension" + }, + { + "type": "function", + "name": "do_read_info_from_repo", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "Extension" + }, + { + "type": "function", + "name": "list_files", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "subdir", + "type": null + }, + { + "name": "extension", + "type": null + } + ], + "return_type": "res", + "parent": "Extension" + }, + { + "type": "function", + "name": "check_updates", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "Extension" + }, + { + "type": "function", + "name": "fetch_and_reset_hard", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "commit", + "type": null + } + ], + "return_type": null, + "parent": "Extension" + } + ], + "parent": null + }, + { + "type": "function", + "name": "list_extensions", + "args": [], + "return_type": null, + "parent": null + } + ], + "modules/extra_networks.py": [ + { + "type": "function", + "name": "initialize", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "register_extra_network", + "args": [ + { + "name": "extra_network", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "register_extra_network_alias", + "args": [ + { + "name": "extra_network", + "type": null + }, + { + "name": "alias", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "register_default_extra_networks", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "class", + "name": "ExtraNetworkParams", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "items", + "type": null + } + ], + "return_type": null, + "parent": "ExtraNetworkParams" + }, + { + "type": "function", + "name": "__eq__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "other", + "type": null + } + ], + "return_type": "(self.items == other.items)", + "parent": "ExtraNetworkParams" + } + ], + "parent": null + }, + { + "type": "class", + "name": "ExtraNetwork", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "name", + "type": null + } + ], + "return_type": null, + "parent": "ExtraNetwork" + }, + { + "type": "function", + "name": "activate", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": null + }, + { + "name": "params_list", + "type": null + } + ], + "return_type": null, + "parent": "ExtraNetwork" + }, + { + "type": "function", + "name": "deactivate", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": null + } + ], + "return_type": null, + "parent": "ExtraNetwork" + } + ], + "parent": null + }, + { + "type": "function", + "name": "lookup_extra_networks", + "args": [ + { + "name": "extra_network_data", + "type": null + } + ], + "return_type": "res", + "parent": null + }, + { + "type": "function", + "name": "activate", + "args": [ + { + "name": "p", + "type": null + }, + { + "name": "extra_network_data", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "deactivate", + "args": [ + { + "name": "p", + "type": null + }, + { + "name": "extra_network_data", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "parse_prompt", + "args": [ + { + "name": "prompt", + "type": null + } + ], + "return_type": "(prompt, res)", + "parent": null + }, + { + "type": "function", + "name": "parse_prompts", + "args": [ + { + "name": "prompts", + "type": null + } + ], + "return_type": "(res, extra_data)", + "parent": null + }, + { + "type": "function", + "name": "get_user_metadata", + "args": [ + { + "name": "filename", + "type": null + } + ], + "return_type": "metadata", + "parent": null + } + ], + "modules/extra_networks_hypernet.py": [ + { + "type": "class", + "name": "ExtraNetworkHypernet", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "ExtraNetworkHypernet" + }, + { + "type": "function", + "name": "activate", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": null + }, + { + "name": "params_list", + "type": null + } + ], + "return_type": null, + "parent": "ExtraNetworkHypernet" + }, + { + "type": "function", + "name": "deactivate", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": null + } + ], + "return_type": null, + "parent": "ExtraNetworkHypernet" + } + ], + "parent": null + } + ], + "modules/extras.py": [ + { + "type": "function", + "name": "run_pnginfo", + "args": [ + { + "name": "image", + "type": null + } + ], + "return_type": "('', geninfo, info)", + "parent": null + }, + { + "type": "function", + "name": "create_config", + "args": [ + { + "name": "ckpt_result", + "type": null + }, + { + "name": "config_source", + "type": null + }, + { + "name": "a", + "type": null + }, + { + "name": "b", + "type": null + }, + { + "name": "c", + "type": null + } + ], + "return_type": "(res if res != shared.sd_default_config else None)", + "parent": null + }, + { + "type": "function", + "name": "to_half", + "args": [ + { + "name": "tensor", + "type": null + }, + { + "name": "enable", + "type": null + } + ], + "return_type": "tensor", + "parent": null + }, + { + "type": "function", + "name": "read_metadata", + "args": [ + { + "name": "primary_model_name", + "type": null + }, + { + "name": "secondary_model_name", + "type": null + }, + { + "name": "tertiary_model_name", + "type": null + } + ], + "return_type": "json.dumps(metadata, indent=4, ensure_ascii=False)", + "parent": null + }, + { + "type": "function", + "name": "run_modelmerger", + "args": [ + { + "name": "id_task", + "type": null + }, + { + "name": "primary_model_name", + "type": null + }, + { + "name": "secondary_model_name", + "type": null + }, + { + "name": "tertiary_model_name", + "type": null + }, + { + "name": "interp_method", + "type": null + }, + { + "name": "multiplier", + "type": null + }, + { + "name": "save_as_half", + "type": null + }, + { + "name": "custom_name", + "type": null + }, + { + "name": "checkpoint_format", + "type": null + }, + { + "name": "config_source", + "type": null + }, + { + "name": "bake_in_vae", + "type": null + }, + { + "name": "discard_weights", + "type": null + }, + { + "name": "save_metadata", + "type": null + }, + { + "name": "add_merge_recipe", + "type": null + }, + { + "name": "copy_metadata_fields", + "type": null + }, + { + "name": "metadata_json", + "type": null + } + ], + "return_type": "[*[gr.Dropdown.update(choices=sd_models.checkpoint_tiles()) for _ in range(\n 4)], 'Checkpoint saved to ' + output_modelname]", + "parent": null + } + ], + "modules/face_restoration.py": [ + { + "type": "class", + "name": "FaceRestoration", + "methods": [ + { + "type": "function", + "name": "name", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "\"\"\"None\"\"\"", + "parent": "FaceRestoration" + }, + { + "type": "function", + "name": "restore", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "np_image", + "type": null + } + ], + "return_type": "np_image", + "parent": "FaceRestoration" + } + ], + "parent": null + }, + { + "type": "function", + "name": "restore_faces", + "args": [ + { + "name": "np_image", + "type": null + } + ], + "return_type": "face_restorer.restore(np_image)", + "parent": null + } + ], + "modules/fifo_lock.py": [ + { + "type": "class", + "name": "FIFOLock", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "FIFOLock" + }, + { + "type": "function", + "name": "acquire", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "blocking", + "type": null + } + ], + "return_type": "self._lock.acquire()", + "parent": "FIFOLock" + }, + { + "type": "function", + "name": "release", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "FIFOLock" + }, + { + "type": "function", + "name": "__exit__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "t", + "type": null + }, + { + "name": "v", + "type": null + }, + { + "name": "tb", + "type": null + } + ], + "return_type": null, + "parent": "FIFOLock" + } + ], + "parent": null + } + ], + "modules/generation_parameters_copypaste.py": [ + { + "type": "class", + "name": "ParamBinding", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "paste_button", + "type": null + }, + { + "name": "tabname", + "type": null + }, + { + "name": "source_text_component", + "type": null + }, + { + "name": "source_image_component", + "type": null + }, + { + "name": "source_tabname", + "type": null + }, + { + "name": "override_settings_component", + "type": null + }, + { + "name": "paste_field_names", + "type": null + } + ], + "return_type": null, + "parent": "ParamBinding" + } + ], + "parent": null + }, + { + "type": "function", + "name": "reset", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "quote", + "args": [ + { + "name": "text", + "type": null + } + ], + "return_type": "json.dumps(text, ensure_ascii=False)", + "parent": null + }, + { + "type": "function", + "name": "unquote", + "args": [ + { + "name": "text", + "type": null + } + ], + "return_type": "text", + "parent": null + }, + { + "type": "function", + "name": "image_from_url_text", + "args": [ + { + "name": "filedata", + "type": null + } + ], + "return_type": "image", + "parent": null + }, + { + "type": "function", + "name": "add_paste_fields", + "args": [ + { + "name": "tabname", + "type": null + }, + { + "name": "init_img", + "type": null + }, + { + "name": "fields", + "type": null + }, + { + "name": "override_settings_component", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "create_buttons", + "args": [ + { + "name": "tabs_list", + "type": null + } + ], + "return_type": "buttons", + "parent": null + }, + { + "type": "function", + "name": "bind_buttons", + "args": [ + { + "name": "buttons", + "type": null + }, + { + "name": "send_image", + "type": null + }, + { + "name": "send_generate_info", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "register_paste_params_button", + "args": [ + { + "name": "binding", + "type": "ParamBinding" + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "connect_paste_params_buttons", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "send_image_and_dimensions", + "args": [ + { + "name": "x", + "type": null + } + ], + "return_type": "(img, w, h)", + "parent": null + }, + { + "type": "function", + "name": "restore_old_hires_fix_params", + "args": [ + { + "name": "res", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "parse_generation_parameters", + "args": [ + { + "name": "x", + "type": "str" + } + ], + "return_type": "res", + "parent": null + }, + { + "type": "function", + "name": "create_override_settings_dict", + "args": [ + { + "name": "text_pairs", + "type": null + } + ], + "return_type": "res", + "parent": null + }, + { + "type": "function", + "name": "connect_paste", + "args": [ + { + "name": "button", + "type": null + }, + { + "name": "paste_fields", + "type": null + }, + { + "name": "input_comp", + "type": null + }, + { + "name": "override_settings_component", + "type": null + }, + { + "name": "tabname", + "type": null + } + ], + "return_type": "res", + "parent": null + } + ], + "modules/gfpgan_model.py": [ + { + "type": "function", + "name": "gfpgann", + "args": [], + "return_type": "model", + "parent": null + }, + { + "type": "function", + "name": "send_model_to", + "args": [ + { + "name": "model", + "type": null + }, + { + "name": "device", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "gfpgan_fix_faces", + "args": [ + { + "name": "np_image", + "type": null + } + ], + "return_type": "np_image", + "parent": null + }, + { + "type": "function", + "name": "setup_model", + "args": [ + { + "name": "dirname", + "type": null + } + ], + "return_type": "load_file_from_url_orig(**dict(kwargs, model_dir=model_path))", + "parent": null + } + ], + "modules/gitpython_hack.py": [ + { + "type": "class", + "name": "Git", + "methods": [ + { + "type": "function", + "name": "_get_persistent_cmd", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "attr_name", + "type": null + }, + { + "name": "cmd_name", + "type": null + } + ], + "return_type": null, + "parent": "Git" + }, + { + "type": "function", + "name": "get_object_header", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "ref", + "type": "(str | bytes)" + } + ], + "return_type": "self._parse_object_header(ret)", + "parent": "Git" + }, + { + "type": "function", + "name": "stream_object_data", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "ref", + "type": "str" + } + ], + "return_type": "(hexsha, typename, size, self.CatFileContentStream(size, bio))", + "parent": "Git" + } + ], + "parent": null + }, + { + "type": "class", + "name": "Repo", + "methods": [], + "parent": null + } + ], + "modules/gradio_extensons.py": [ + { + "type": "function", + "name": "add_classes_to_gradio_component", + "args": [ + { + "name": "comp", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "IOComponent_init", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "res", + "parent": null + }, + { + "type": "function", + "name": "Block_get_config", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "config", + "parent": null + }, + { + "type": "function", + "name": "BlockContext_init", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "res", + "parent": null + }, + { + "type": "function", + "name": "Blocks_get_config_file", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "config", + "parent": null + } + ], + "modules/habana.py": [ + { + "type": "class", + "name": "HPUGenerator", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "HPUGenerator" + }, + { + "type": "function", + "name": "get_state", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "htrandom.get_rng_state()", + "parent": "HPUGenerator" + }, + { + "type": "function", + "name": "set_state", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "state", + "type": null + } + ], + "return_type": null, + "parent": "HPUGenerator" + }, + { + "type": "function", + "name": "manual_seed", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "seed", + "type": null + } + ], + "return_type": "self", + "parent": "HPUGenerator" + }, + { + "type": "function", + "name": "seed", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "HPUGenerator" + }, + { + "type": "function", + "name": "initial_seed", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "self.initial_seed_value", + "parent": "HPUGenerator" + } + ], + "parent": null + } + ], + "modules/hashes.py": [ + { + "type": "function", + "name": "calculate_sha256", + "args": [ + { + "name": "filename", + "type": null + } + ], + "return_type": "hash_sha256.hexdigest()", + "parent": null + }, + { + "type": "function", + "name": "sha256_from_cache", + "args": [ + { + "name": "filename", + "type": null + }, + { + "name": "title", + "type": null + }, + { + "name": "use_addnet_hash", + "type": null + } + ], + "return_type": "cached_sha256", + "parent": null + }, + { + "type": "function", + "name": "sha256", + "args": [ + { + "name": "filename", + "type": null + }, + { + "name": "title", + "type": null + }, + { + "name": "use_addnet_hash", + "type": null + } + ], + "return_type": "sha256_value", + "parent": null + }, + { + "type": "function", + "name": "addnet_hash_safetensors", + "args": [ + { + "name": "b", + "type": null + } + ], + "return_type": "hash_sha256.hexdigest()", + "parent": null + } + ], + "modules/hypernetworks/hypernetwork.py": [ + { + "type": "class", + "name": "HypernetworkModule", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "dim", + "type": null + }, + { + "name": "state_dict", + "type": null + }, + { + "name": "layer_structure", + "type": null + }, + { + "name": "activation_func", + "type": null + }, + { + "name": "weight_init", + "type": null + }, + { + "name": "add_layer_norm", + "type": null + }, + { + "name": "activate_output", + "type": null + }, + { + "name": "dropout_structure", + "type": null + } + ], + "return_type": null, + "parent": "HypernetworkModule" + }, + { + "type": "function", + "name": "fix_old_state_dict", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "state_dict", + "type": null + } + ], + "return_type": null, + "parent": "HypernetworkModule" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "(x + self.linear(x) * (self.multiplier if not self.training else 1))", + "parent": "HypernetworkModule" + }, + { + "type": "function", + "name": "trainables", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "layer_structure", + "parent": "HypernetworkModule" + } + ], + "parent": null + }, + { + "type": "function", + "name": "parse_dropout_structure", + "args": [ + { + "name": "layer_structure", + "type": null + }, + { + "name": "use_dropout", + "type": null + }, + { + "name": "last_layer_dropout", + "type": null + } + ], + "return_type": "dropout_values", + "parent": null + }, + { + "type": "class", + "name": "Hypernetwork", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "name", + "type": null + }, + { + "name": "enable_sizes", + "type": null + }, + { + "name": "layer_structure", + "type": null + }, + { + "name": "activation_func", + "type": null + }, + { + "name": "weight_init", + "type": null + }, + { + "name": "add_layer_norm", + "type": null + }, + { + "name": "use_dropout", + "type": null + }, + { + "name": "activate_output", + "type": null + } + ], + "return_type": null, + "parent": "Hypernetwork" + }, + { + "type": "function", + "name": "weights", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "res", + "parent": "Hypernetwork" + }, + { + "type": "function", + "name": "train", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "mode", + "type": null + } + ], + "return_type": null, + "parent": "Hypernetwork" + }, + { + "type": "function", + "name": "to", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "device", + "type": null + } + ], + "return_type": "self", + "parent": "Hypernetwork" + }, + { + "type": "function", + "name": "set_multiplier", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "multiplier", + "type": null + } + ], + "return_type": "self", + "parent": "Hypernetwork" + }, + { + "type": "function", + "name": "eval", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "Hypernetwork" + }, + { + "type": "function", + "name": "save", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "filename", + "type": null + } + ], + "return_type": null, + "parent": "Hypernetwork" + }, + { + "type": "function", + "name": "load", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "filename", + "type": null + } + ], + "return_type": null, + "parent": "Hypernetwork" + }, + { + "type": "function", + "name": "shorthash", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "(sha256[0:10] if sha256 else None)", + "parent": "Hypernetwork" + } + ], + "parent": null + }, + { + "type": "function", + "name": "list_hypernetworks", + "args": [ + { + "name": "path", + "type": null + } + ], + "return_type": "res", + "parent": null + }, + { + "type": "function", + "name": "load_hypernetwork", + "args": [ + { + "name": "name", + "type": null + } + ], + "return_type": "None", + "parent": null + }, + { + "type": "function", + "name": "load_hypernetworks", + "args": [ + { + "name": "names", + "type": null + }, + { + "name": "multipliers", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "apply_single_hypernetwork", + "args": [ + { + "name": "hypernetwork", + "type": null + }, + { + "name": "context_k", + "type": null + }, + { + "name": "context_v", + "type": null + }, + { + "name": "layer", + "type": null + } + ], + "return_type": "(context_k, context_v)", + "parent": null + }, + { + "type": "function", + "name": "apply_hypernetworks", + "args": [ + { + "name": "hypernetworks", + "type": null + }, + { + "name": "context", + "type": null + }, + { + "name": "layer", + "type": null + } + ], + "return_type": "(context_k, context_v)", + "parent": null + }, + { + "type": "function", + "name": "attention_CrossAttention_forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "context", + "type": null + }, + { + "name": "mask", + "type": null + } + ], + "return_type": "self.to_out(out)", + "parent": null + }, + { + "type": "function", + "name": "stack_conds", + "args": [ + { + "name": "conds", + "type": null + } + ], + "return_type": "torch.stack(conds)", + "parent": null + }, + { + "type": "function", + "name": "statistics", + "args": [ + { + "name": "data", + "type": null + } + ], + "return_type": "(total_information, recent_information)", + "parent": null + }, + { + "type": "function", + "name": "create_hypernetwork", + "args": [ + { + "name": "name", + "type": null + }, + { + "name": "enable_sizes", + "type": null + }, + { + "name": "overwrite_old", + "type": null + }, + { + "name": "layer_structure", + "type": null + }, + { + "name": "activation_func", + "type": null + }, + { + "name": "weight_init", + "type": null + }, + { + "name": "add_layer_norm", + "type": null + }, + { + "name": "use_dropout", + "type": null + }, + { + "name": "dropout_structure", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "train_hypernetwork", + "args": [ + { + "name": "id_task", + "type": null + }, + { + "name": "hypernetwork_name", + "type": null + }, + { + "name": "learn_rate", + "type": null + }, + { + "name": "batch_size", + "type": null + }, + { + "name": "gradient_step", + "type": null + }, + { + "name": "data_root", + "type": null + }, + { + "name": "log_directory", + "type": null + }, + { + "name": "training_width", + "type": null + }, + { + "name": "training_height", + "type": null + }, + { + "name": "varsize", + "type": null + }, + { + "name": "steps", + "type": null + }, + { + "name": "clip_grad_mode", + "type": null + }, + { + "name": "clip_grad_value", + "type": null + }, + { + "name": "shuffle_tags", + "type": null + }, + { + "name": "tag_drop_out", + "type": null + }, + { + "name": "latent_sampling_method", + "type": null + }, + { + "name": "use_weight", + "type": null + }, + { + "name": "create_image_every", + "type": null + }, + { + "name": "save_hypernetwork_every", + "type": null + }, + { + "name": "template_filename", + "type": null + }, + { + "name": "preview_from_txt2img", + "type": null + }, + { + "name": "preview_prompt", + "type": null + }, + { + "name": "preview_negative_prompt", + "type": null + }, + { + "name": "preview_steps", + "type": null + }, + { + "name": "preview_sampler_index", + "type": null + }, + { + "name": "preview_cfg_scale", + "type": null + }, + { + "name": "preview_seed", + "type": null + }, + { + "name": "preview_width", + "type": null + }, + { + "name": "preview_height", + "type": null + } + ], + "return_type": "(hypernetwork, filename)", + "parent": null + }, + { + "type": "function", + "name": "save_hypernetwork", + "args": [ + { + "name": "hypernetwork", + "type": null + }, + { + "name": "checkpoint", + "type": null + }, + { + "name": "hypernetwork_name", + "type": null + }, + { + "name": "filename", + "type": null + } + ], + "return_type": null, + "parent": null + } + ], + "modules/hypernetworks/ui.py": [ + { + "type": "function", + "name": "create_hypernetwork", + "args": [ + { + "name": "name", + "type": null + }, + { + "name": "enable_sizes", + "type": null + }, + { + "name": "overwrite_old", + "type": null + }, + { + "name": "layer_structure", + "type": null + }, + { + "name": "activation_func", + "type": null + }, + { + "name": "weight_init", + "type": null + }, + { + "name": "add_layer_norm", + "type": null + }, + { + "name": "use_dropout", + "type": null + }, + { + "name": "dropout_structure", + "type": null + } + ], + "return_type": "(gr.Dropdown.update(choices=sorted(shared.hypernetworks)),\n f'Created: {filename}', '')", + "parent": null + }, + { + "type": "function", + "name": "train_hypernetwork", + "args": [], + "return_type": "(res, '')", + "parent": null + } + ], + "modules/images.py": [ + { + "type": "function", + "name": "get_font", + "args": [ + { + "name": "fontsize", + "type": "int" + } + ], + "return_type": "ImageFont.truetype(opts.font or roboto_ttf_file, fontsize)", + "parent": null + }, + { + "type": "function", + "name": "image_grid", + "args": [ + { + "name": "imgs", + "type": null + }, + { + "name": "batch_size", + "type": null + }, + { + "name": "rows", + "type": null + } + ], + "return_type": "grid", + "parent": null + }, + { + "type": "function", + "name": "split_grid", + "args": [ + { + "name": "image", + "type": null + }, + { + "name": "tile_w", + "type": null + }, + { + "name": "tile_h", + "type": null + }, + { + "name": "overlap", + "type": null + } + ], + "return_type": "grid", + "parent": null + }, + { + "type": "function", + "name": "combine_grid", + "args": [ + { + "name": "grid", + "type": null + } + ], + "return_type": "combined_image", + "parent": null + }, + { + "type": "class", + "name": "GridAnnotation", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "text", + "type": null + }, + { + "name": "is_active", + "type": null + } + ], + "return_type": null, + "parent": "GridAnnotation" + } + ], + "parent": null + }, + { + "type": "function", + "name": "draw_grid_annotations", + "args": [ + { + "name": "im", + "type": null + }, + { + "name": "width", + "type": null + }, + { + "name": "height", + "type": null + }, + { + "name": "hor_texts", + "type": null + }, + { + "name": "ver_texts", + "type": null + }, + { + "name": "margin", + "type": null + } + ], + "return_type": "result", + "parent": null + }, + { + "type": "function", + "name": "draw_prompt_matrix", + "args": [ + { + "name": "im", + "type": null + }, + { + "name": "width", + "type": null + }, + { + "name": "height", + "type": null + }, + { + "name": "all_prompts", + "type": null + }, + { + "name": "margin", + "type": null + } + ], + "return_type": "draw_grid_annotations(im, width, height, hor_texts, ver_texts, margin)", + "parent": null + }, + { + "type": "function", + "name": "resize_image", + "args": [ + { + "name": "resize_mode", + "type": null + }, + { + "name": "im", + "type": null + }, + { + "name": "width", + "type": null + }, + { + "name": "height", + "type": null + }, + { + "name": "upscaler_name", + "type": null + } + ], + "return_type": "res", + "parent": null + }, + { + "type": "function", + "name": "sanitize_filename_part", + "args": [ + { + "name": "text", + "type": null + }, + { + "name": "replace_spaces", + "type": null + } + ], + "return_type": "text", + "parent": null + }, + { + "type": "class", + "name": "FilenameGenerator", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": null + }, + { + "name": "seed", + "type": null + }, + { + "name": "prompt", + "type": null + }, + { + "name": "image", + "type": null + }, + { + "name": "zip", + "type": null + } + ], + "return_type": null, + "parent": "FilenameGenerator" + }, + { + "type": "function", + "name": "get_vae_filename", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "\"\"\"NoneType\"\"\"", + "parent": "FilenameGenerator" + }, + { + "type": "function", + "name": "hasprompt", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "sanitize_filename_part(outres)", + "parent": "FilenameGenerator" + }, + { + "type": "function", + "name": "prompt_no_style", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "sanitize_filename_part(prompt_no_style, replace_spaces=False)", + "parent": "FilenameGenerator" + }, + { + "type": "function", + "name": "prompt_words", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "sanitize_filename_part(' '.join(words[0:opts.directories_max_prompt_words]),\n replace_spaces=False)", + "parent": "FilenameGenerator" + }, + { + "type": "function", + "name": "datetime", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "sanitize_filename_part(formatted_time, replace_spaces=False)", + "parent": "FilenameGenerator" + }, + { + "type": "function", + "name": "image_hash", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "hashlib.sha256(self.image.tobytes()).hexdigest()[0:length]", + "parent": "FilenameGenerator" + }, + { + "type": "function", + "name": "string_hash", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "text", + "type": null + } + ], + "return_type": "hashlib.sha256(text.encode()).hexdigest()[0:length]", + "parent": "FilenameGenerator" + }, + { + "type": "function", + "name": "apply", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "res", + "parent": "FilenameGenerator" + } + ], + "parent": null + }, + { + "type": "function", + "name": "get_next_sequence_number", + "args": [ + { + "name": "path", + "type": null + }, + { + "name": "basename", + "type": null + } + ], + "return_type": "(result + 1)", + "parent": null + }, + { + "type": "function", + "name": "save_image_with_geninfo", + "args": [ + { + "name": "image", + "type": null + }, + { + "name": "geninfo", + "type": null + }, + { + "name": "filename", + "type": null + }, + { + "name": "extension", + "type": null + }, + { + "name": "existing_pnginfo", + "type": null + }, + { + "name": "pnginfo_section_name", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "save_image", + "args": [ + { + "name": "image", + "type": null + }, + { + "name": "path", + "type": null + }, + { + "name": "basename", + "type": null + }, + { + "name": "seed", + "type": null + }, + { + "name": "prompt", + "type": null + }, + { + "name": "extension", + "type": null + }, + { + "name": "info", + "type": null + }, + { + "name": "short_filename", + "type": null + }, + { + "name": "no_prompt", + "type": null + }, + { + "name": "grid", + "type": null + }, + { + "name": "pnginfo_section_name", + "type": null + }, + { + "name": "p", + "type": null + }, + { + "name": "existing_info", + "type": null + }, + { + "name": "forced_filename", + "type": null + }, + { + "name": "suffix", + "type": null + }, + { + "name": "save_to_dirs", + "type": null + } + ], + "return_type": "(fullfn, txt_fullfn)", + "parent": null + }, + { + "type": "function", + "name": "read_info_from_image", + "args": [ + { + "name": "image", + "type": "Image.Image" + } + ], + "return_type": "(geninfo, items)", + "parent": null + }, + { + "type": "function", + "name": "image_data", + "args": [ + { + "name": "data", + "type": null + } + ], + "return_type": "(gr.update(), None)", + "parent": null + }, + { + "type": "function", + "name": "flatten", + "args": [ + { + "name": "img", + "type": null + }, + { + "name": "bgcolor", + "type": null + } + ], + "return_type": "img.convert('RGB')", + "parent": null + } + ], + "modules/img2img.py": [ + { + "type": "function", + "name": "process_batch", + "args": [ + { + "name": "p", + "type": null + }, + { + "name": "input_dir", + "type": null + }, + { + "name": "output_dir", + "type": null + }, + { + "name": "inpaint_mask_dir", + "type": null + }, + { + "name": "args", + "type": null + }, + { + "name": "to_scale", + "type": null + }, + { + "name": "scale_by", + "type": null + }, + { + "name": "use_png_info", + "type": null + }, + { + "name": "png_info_props", + "type": null + }, + { + "name": "png_info_dir", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "img2img", + "args": [ + { + "name": "id_task", + "type": "str" + }, + { + "name": "mode", + "type": "int" + }, + { + "name": "prompt", + "type": "str" + }, + { + "name": "negative_prompt", + "type": "str" + }, + { + "name": "prompt_styles", + "type": null + }, + { + "name": "init_img", + "type": null + }, + { + "name": "sketch", + "type": null + }, + { + "name": "init_img_with_mask", + "type": null + }, + { + "name": "inpaint_color_sketch", + "type": null + }, + { + "name": "inpaint_color_sketch_orig", + "type": null + }, + { + "name": "init_img_inpaint", + "type": null + }, + { + "name": "init_mask_inpaint", + "type": null + }, + { + "name": "steps", + "type": "int" + }, + { + "name": "sampler_name", + "type": "str" + }, + { + "name": "mask_blur", + "type": "int" + }, + { + "name": "mask_alpha", + "type": "float" + }, + { + "name": "inpainting_fill", + "type": "int" + }, + { + "name": "n_iter", + "type": "int" + }, + { + "name": "batch_size", + "type": "int" + }, + { + "name": "cfg_scale", + "type": "float" + }, + { + "name": "image_cfg_scale", + "type": "float" + }, + { + "name": "denoising_strength", + "type": "float" + }, + { + "name": "selected_scale_tab", + "type": "int" + }, + { + "name": "height", + "type": "int" + }, + { + "name": "width", + "type": "int" + }, + { + "name": "scale_by", + "type": "float" + }, + { + "name": "resize_mode", + "type": "int" + }, + { + "name": "inpaint_full_res", + "type": "bool" + }, + { + "name": "inpaint_full_res_padding", + "type": "int" + }, + { + "name": "inpainting_mask_invert", + "type": "int" + }, + { + "name": "img2img_batch_input_dir", + "type": "str" + }, + { + "name": "img2img_batch_output_dir", + "type": "str" + }, + { + "name": "img2img_batch_inpaint_mask_dir", + "type": "str" + }, + { + "name": "override_settings_texts", + "type": null + }, + { + "name": "img2img_batch_use_png_info", + "type": "bool" + }, + { + "name": "img2img_batch_png_info_props", + "type": "list" + }, + { + "name": "img2img_batch_png_info_dir", + "type": "str" + }, + { + "name": "request", + "type": "gr.Request" + } + ], + "return_type": "(processed.images, generation_info_js, plaintext_to_html(processed.info),\n plaintext_to_html(processed.comments, classname='comments'))", + "parent": null + } + ], + "modules/import_hook.py": [], + "modules/initialize.py": [ + { + "type": "function", + "name": "imports", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "check_versions", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "initialize", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "initialize_rest", + "args": [], + "return_type": null, + "parent": null + } + ], + "modules/initialize_util.py": [ + { + "type": "function", + "name": "gradio_server_name", + "args": [], + "return_type": "cmd_opts.server_name", + "parent": null + }, + { + "type": "function", + "name": "fix_torch_version", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "fix_asyncio_event_loop_policy", + "args": [], + "return_type": "super().get_event_loop()", + "parent": null + }, + { + "type": "function", + "name": "restore_config_state_file", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "validate_tls_options", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "get_gradio_auth_creds", + "args": [], + "return_type": "tuple(s.split(':', 1))", + "parent": null + }, + { + "type": "function", + "name": "dumpstacks", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "configure_sigint_handler", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "configure_opts_onchange", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "setup_middleware", + "args": [ + { + "name": "app", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "configure_cors_middleware", + "args": [ + { + "name": "app", + "type": null + } + ], + "return_type": null, + "parent": null + } + ], + "modules/interrogate.py": [ + { + "type": "function", + "name": "category_types", + "args": [], + "return_type": "[f.stem for f in Path(shared.interrogator.content_dir).glob('*.txt')]", + "parent": null + }, + { + "type": "function", + "name": "download_default_clip_interrogate_categories", + "args": [ + { + "name": "content_dir", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "class", + "name": "InterrogateModels", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "content_dir", + "type": null + } + ], + "return_type": null, + "parent": "InterrogateModels" + }, + { + "type": "function", + "name": "categories", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "self.loaded_categories", + "parent": "InterrogateModels" + }, + { + "type": "function", + "name": "create_fake_fairscale", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "InterrogateModels" + }, + { + "type": "function", + "name": "load_blip_model", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "blip_model", + "parent": "InterrogateModels" + }, + { + "type": "function", + "name": "load_clip_model", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "(model, preprocess)", + "parent": "InterrogateModels" + }, + { + "type": "function", + "name": "load", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "InterrogateModels" + }, + { + "type": "function", + "name": "send_clip_to_ram", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "InterrogateModels" + }, + { + "type": "function", + "name": "send_blip_to_ram", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "InterrogateModels" + }, + { + "type": "function", + "name": "unload", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "InterrogateModels" + }, + { + "type": "function", + "name": "rank", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "image_features", + "type": null + }, + { + "name": "text_array", + "type": null + }, + { + "name": "top_count", + "type": null + } + ], + "return_type": "[(text_array[top_labels[0][i].numpy()], top_probs[0][i].numpy() * 100) for\n i in range(top_count)]", + "parent": "InterrogateModels" + }, + { + "type": "function", + "name": "generate_caption", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "pil_image", + "type": null + } + ], + "return_type": "caption[0]", + "parent": "InterrogateModels" + }, + { + "type": "function", + "name": "interrogate", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "pil_image", + "type": null + } + ], + "return_type": "res", + "parent": "InterrogateModels" + } + ], + "parent": null + } + ], + "modules/launch_utils.py": [ + { + "type": "function", + "name": "check_python_version", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "commit_hash", + "args": [], + "return_type": "subprocess.check_output([git, 'rev-parse', 'HEAD'], shell=False, encoding=\n 'utf8').strip()", + "parent": null + }, + { + "type": "function", + "name": "git_tag", + "args": [], + "return_type": "subprocess.check_output([git, 'describe', '--tags'], shell=False, encoding=\n 'utf8').strip()", + "parent": null + }, + { + "type": "function", + "name": "run", + "args": [ + { + "name": "command", + "type": null + }, + { + "name": "desc", + "type": null + }, + { + "name": "errdesc", + "type": null + }, + { + "name": "custom_env", + "type": null + }, + { + "name": "live", + "type": "bool" + } + ], + "return_type": "(result.stdout or '')", + "parent": null + }, + { + "type": "function", + "name": "is_installed", + "args": [ + { + "name": "package", + "type": null + } + ], + "return_type": "(spec is not None)", + "parent": null + }, + { + "type": "function", + "name": "repo_dir", + "args": [ + { + "name": "name", + "type": null + } + ], + "return_type": "os.path.join(script_path, dir_repos, name)", + "parent": null + }, + { + "type": "function", + "name": "run_pip", + "args": [ + { + "name": "command", + "type": null + }, + { + "name": "desc", + "type": null + }, + { + "name": "live", + "type": null + } + ], + "return_type": "run(f'\"{python}\" -m pip {command} --prefer-binary{index_url_line}', desc=\n f'Installing {desc}', errdesc=f\"Couldn't install {desc}\", live=live)", + "parent": null + }, + { + "type": "function", + "name": "check_run_python", + "args": [ + { + "name": "code", + "type": "str" + } + ], + "return_type": "(result.returncode == 0)", + "parent": null + }, + { + "type": "function", + "name": "git_fix_workspace", + "args": [ + { + "name": "dir", + "type": null + }, + { + "name": "name", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "run_git", + "args": [ + { + "name": "dir", + "type": null + }, + { + "name": "name", + "type": null + }, + { + "name": "command", + "type": null + }, + { + "name": "desc", + "type": null + }, + { + "name": "errdesc", + "type": null + }, + { + "name": "custom_env", + "type": null + }, + { + "name": "live", + "type": "bool" + }, + { + "name": "autofix", + "type": null + } + ], + "return_type": "run(f'\"{git}\" -C \"{dir}\" {command}', desc=desc, errdesc=errdesc, custom_env\n =custom_env, live=live)", + "parent": null + }, + { + "type": "function", + "name": "git_clone", + "args": [ + { + "name": "url", + "type": null + }, + { + "name": "dir", + "type": null + }, + { + "name": "name", + "type": null + }, + { + "name": "commithash", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "git_pull_recursive", + "args": [ + { + "name": "dir", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "version_check", + "args": [ + { + "name": "commit", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "run_extension_installer", + "args": [ + { + "name": "extension_dir", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "list_extensions", + "args": [ + { + "name": "settings_file", + "type": null + } + ], + "return_type": "[x for x in os.listdir(extensions_dir) if x not in disabled_extensions]", + "parent": null + }, + { + "type": "function", + "name": "run_extensions_installers", + "args": [ + { + "name": "settings_file", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "requirements_met", + "args": [ + { + "name": "requirements_file", + "type": null + } + ], + "return_type": "(True)", + "parent": null + }, + { + "type": "function", + "name": "prepare_environment", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "configure_for_tests", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "start", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "dump_sysinfo", + "args": [], + "return_type": "filename", + "parent": null + } + ], + "modules/localization.py": [ + { + "type": "function", + "name": "list_localizations", + "args": [ + { + "name": "dirname", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "localization_js", + "args": [ + { + "name": "current_localization_name", + "type": "str" + } + ], + "return_type": "f\"\"\"window.localization = {json.dumps(data)}\"\"\"", + "parent": null + } + ], + "modules/logging_config.py": [ + { + "type": "function", + "name": "setup_logging", + "args": [ + { + "name": "loglevel", + "type": null + } + ], + "return_type": null, + "parent": null + } + ], + "modules/lowvram.py": [ + { + "type": "function", + "name": "send_everything_to_cpu", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "is_needed", + "args": [ + { + "name": "sd_model", + "type": null + } + ], + "return_type": "(shared.cmd_opts.lowvram or shared.cmd_opts.medvram or shared.cmd_opts.\n medvram_sdxl and hasattr(sd_model, 'conditioner'))", + "parent": null + }, + { + "type": "function", + "name": "apply", + "args": [ + { + "name": "sd_model", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "setup_for_low_vram", + "args": [ + { + "name": "sd_model", + "type": null + }, + { + "name": "use_medvram", + "type": null + } + ], + "return_type": "first_stage_model_encode(x)", + "parent": null + }, + { + "type": "function", + "name": "is_enabled", + "args": [ + { + "name": "sd_model", + "type": null + } + ], + "return_type": "sd_model.lowvram", + "parent": null + } + ], + "modules/mac_specific.py": [ + { + "type": "function", + "name": "check_for_mps", + "args": [], + "return_type": "(torch.backends.mps.is_available() and torch.backends.mps.is_built())", + "parent": null + }, + { + "type": "function", + "name": "torch_mps_gc", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "cumsum_fix", + "args": [ + { + "name": "input", + "type": null + }, + { + "name": "cumsum_func", + "type": null + } + ], + "return_type": "cumsum_func(input, *args, **kwargs)", + "parent": null + } + ], + "modules/masking.py": [ + { + "type": "function", + "name": "get_crop_region", + "args": [ + { + "name": "mask", + "type": null + }, + { + "name": "pad", + "type": null + } + ], + "return_type": "(int(max(crop_left - pad, 0)), int(max(crop_top - pad, 0)), int(min(w -\n crop_right + pad, w)), int(min(h - crop_bottom + pad, h)))", + "parent": null + }, + { + "type": "function", + "name": "expand_crop_region", + "args": [ + { + "name": "crop_region", + "type": null + }, + { + "name": "processing_width", + "type": null + }, + { + "name": "processing_height", + "type": null + }, + { + "name": "image_width", + "type": null + }, + { + "name": "image_height", + "type": null + } + ], + "return_type": "(x1, y1, x2, y2)", + "parent": null + }, + { + "type": "function", + "name": "fill", + "args": [ + { + "name": "image", + "type": null + }, + { + "name": "mask", + "type": null + } + ], + "return_type": "image_mod.convert('RGB')", + "parent": null + } + ], + "modules/memmon.py": [ + { + "type": "class", + "name": "MemUsageMonitor", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "name", + "type": null + }, + { + "name": "device", + "type": null + }, + { + "name": "opts", + "type": null + } + ], + "return_type": null, + "parent": "MemUsageMonitor" + }, + { + "type": "function", + "name": "cuda_mem_get_info", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "torch.cuda.mem_get_info(index)", + "parent": "MemUsageMonitor" + }, + { + "type": "function", + "name": "run", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "MemUsageMonitor" + }, + { + "type": "function", + "name": "dump_debug", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "MemUsageMonitor" + }, + { + "type": "function", + "name": "monitor", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "MemUsageMonitor" + }, + { + "type": "function", + "name": "read", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "self.data", + "parent": "MemUsageMonitor" + }, + { + "type": "function", + "name": "stop", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "self.read()", + "parent": "MemUsageMonitor" + } + ], + "parent": null + } + ], + "modules/modelloader.py": [ + { + "type": "function", + "name": "load_file_from_url", + "args": [ + { + "name": "url", + "type": "str" + } + ], + "return_type": "cached_file", + "parent": null + }, + { + "type": "function", + "name": "load_models", + "args": [ + { + "name": "model_path", + "type": "str" + }, + { + "name": "model_url", + "type": "str" + }, + { + "name": "command_path", + "type": "str" + }, + { + "name": "ext_filter", + "type": null + }, + { + "name": "download_name", + "type": null + }, + { + "name": "ext_blacklist", + "type": null + } + ], + "return_type": "output", + "parent": null + }, + { + "type": "function", + "name": "friendly_name", + "args": [ + { + "name": "file", + "type": "str" + } + ], + "return_type": "model_name", + "parent": null + }, + { + "type": "function", + "name": "cleanup_models", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "move_files", + "args": [ + { + "name": "src_path", + "type": "str" + }, + { + "name": "dest_path", + "type": "str" + }, + { + "name": "ext_filter", + "type": "str" + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "load_upscalers", + "args": [], + "return_type": null, + "parent": null + } + ], + "modules/models/diffusion/ddpm_edit.py": [ + { + "type": "function", + "name": "disabled_train", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "mode", + "type": null + } + ], + "return_type": "self", + "parent": null + }, + { + "type": "function", + "name": "uniform_on_device", + "args": [ + { + "name": "r1", + "type": null + }, + { + "name": "r2", + "type": null + }, + { + "name": "shape", + "type": null + }, + { + "name": "device", + "type": null + } + ], + "return_type": "((r1 - r2) * torch.rand(*shape, device=device) + r2)", + "parent": null + }, + { + "type": "class", + "name": "DDPM", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "unet_config", + "type": null + }, + { + "name": "timesteps", + "type": null + }, + { + "name": "beta_schedule", + "type": null + }, + { + "name": "loss_type", + "type": null + }, + { + "name": "ckpt_path", + "type": null + }, + { + "name": "ignore_keys", + "type": null + }, + { + "name": "load_only_unet", + "type": null + }, + { + "name": "monitor", + "type": null + }, + { + "name": "use_ema", + "type": null + }, + { + "name": "first_stage_key", + "type": null + }, + { + "name": "image_size", + "type": null + }, + { + "name": "channels", + "type": null + }, + { + "name": "log_every_t", + "type": null + }, + { + "name": "clip_denoised", + "type": null + }, + { + "name": "linear_start", + "type": null + }, + { + "name": "linear_end", + "type": null + }, + { + "name": "cosine_s", + "type": null + }, + { + "name": "given_betas", + "type": null + }, + { + "name": "original_elbo_weight", + "type": null + }, + { + "name": "v_posterior", + "type": null + }, + { + "name": "l_simple_weight", + "type": null + }, + { + "name": "conditioning_key", + "type": null + }, + { + "name": "parameterization", + "type": null + }, + { + "name": "scheduler_config", + "type": null + }, + { + "name": "use_positional_encodings", + "type": null + }, + { + "name": "learn_logvar", + "type": null + }, + { + "name": "logvar_init", + "type": null + }, + { + "name": "load_ema", + "type": null + } + ], + "return_type": null, + "parent": "DDPM" + }, + { + "type": "function", + "name": "register_schedule", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "given_betas", + "type": null + }, + { + "name": "beta_schedule", + "type": null + }, + { + "name": "timesteps", + "type": null + }, + { + "name": "linear_start", + "type": null + }, + { + "name": "linear_end", + "type": null + }, + { + "name": "cosine_s", + "type": null + } + ], + "return_type": null, + "parent": "DDPM" + }, + { + "type": "function", + "name": "ema_scope", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "context", + "type": null + } + ], + "return_type": null, + "parent": "DDPM" + }, + { + "type": "function", + "name": "init_from_ckpt", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "path", + "type": null + }, + { + "name": "ignore_keys", + "type": null + }, + { + "name": "only_model", + "type": null + } + ], + "return_type": null, + "parent": "DDPM" + }, + { + "type": "function", + "name": "q_mean_variance", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x_start", + "type": null + }, + { + "name": "t", + "type": null + } + ], + "return_type": "(mean, variance, log_variance)", + "parent": "DDPM" + }, + { + "type": "function", + "name": "predict_start_from_noise", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x_t", + "type": null + }, + { + "name": "t", + "type": null + }, + { + "name": "noise", + "type": null + } + ], + "return_type": "(extract_into_tensor(self.sqrt_recip_alphas_cumprod, t, x_t.shape) * x_t - \n extract_into_tensor(self.sqrt_recipm1_alphas_cumprod, t, x_t.shape) * noise\n )", + "parent": "DDPM" + }, + { + "type": "function", + "name": "q_posterior", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x_start", + "type": null + }, + { + "name": "x_t", + "type": null + }, + { + "name": "t", + "type": null + } + ], + "return_type": "(posterior_mean, posterior_variance, posterior_log_variance_clipped)", + "parent": "DDPM" + }, + { + "type": "function", + "name": "p_mean_variance", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "t", + "type": null + }, + { + "name": "clip_denoised", + "type": "bool" + } + ], + "return_type": "(model_mean, posterior_variance, posterior_log_variance)", + "parent": "DDPM" + }, + { + "type": "function", + "name": "p_sample", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "t", + "type": null + }, + { + "name": "clip_denoised", + "type": null + }, + { + "name": "repeat_noise", + "type": null + } + ], + "return_type": "(model_mean + nonzero_mask * (0.5 * model_log_variance).exp() * noise)", + "parent": "DDPM" + }, + { + "type": "function", + "name": "p_sample_loop", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "shape", + "type": null + }, + { + "name": "return_intermediates", + "type": null + } + ], + "return_type": "img", + "parent": "DDPM" + }, + { + "type": "function", + "name": "sample", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "batch_size", + "type": null + }, + { + "name": "return_intermediates", + "type": null + } + ], + "return_type": "self.p_sample_loop((batch_size, channels, image_size, image_size),\n return_intermediates=return_intermediates)", + "parent": "DDPM" + }, + { + "type": "function", + "name": "q_sample", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x_start", + "type": null + }, + { + "name": "t", + "type": null + }, + { + "name": "noise", + "type": null + } + ], + "return_type": "(extract_into_tensor(self.sqrt_alphas_cumprod, t, x_start.shape) * x_start +\n extract_into_tensor(self.sqrt_one_minus_alphas_cumprod, t, x_start.\n shape) * noise)", + "parent": "DDPM" + }, + { + "type": "function", + "name": "get_loss", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "pred", + "type": null + }, + { + "name": "target", + "type": null + }, + { + "name": "mean", + "type": null + } + ], + "return_type": "loss", + "parent": "DDPM" + }, + { + "type": "function", + "name": "p_losses", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x_start", + "type": null + }, + { + "name": "t", + "type": null + }, + { + "name": "noise", + "type": null + } + ], + "return_type": "(loss, loss_dict)", + "parent": "DDPM" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "self.p_losses(x, t, *args, **kwargs)", + "parent": "DDPM" + }, + { + "type": "function", + "name": "get_input", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "batch", + "type": null + }, + { + "name": "k", + "type": null + } + ], + "return_type": "batch[k]", + "parent": "DDPM" + }, + { + "type": "function", + "name": "shared_step", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "batch", + "type": null + } + ], + "return_type": "(loss, loss_dict)", + "parent": "DDPM" + }, + { + "type": "function", + "name": "training_step", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "batch", + "type": null + }, + { + "name": "batch_idx", + "type": null + } + ], + "return_type": "loss", + "parent": "DDPM" + }, + { + "type": "function", + "name": "validation_step", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "batch", + "type": null + }, + { + "name": "batch_idx", + "type": null + } + ], + "return_type": null, + "parent": "DDPM" + }, + { + "type": "function", + "name": "on_train_batch_end", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "DDPM" + }, + { + "type": "function", + "name": "_get_rows_from_list", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "samples", + "type": null + } + ], + "return_type": "denoise_grid", + "parent": "DDPM" + }, + { + "type": "function", + "name": "log_images", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "batch", + "type": null + }, + { + "name": "N", + "type": null + }, + { + "name": "n_row", + "type": null + }, + { + "name": "sample", + "type": null + }, + { + "name": "return_keys", + "type": null + } + ], + "return_type": "log", + "parent": "DDPM" + }, + { + "type": "function", + "name": "configure_optimizers", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "opt", + "parent": "DDPM" + } + ], + "parent": null + }, + { + "type": "class", + "name": "LatentDiffusion", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "first_stage_config", + "type": null + }, + { + "name": "cond_stage_config", + "type": null + }, + { + "name": "num_timesteps_cond", + "type": null + }, + { + "name": "cond_stage_key", + "type": null + }, + { + "name": "cond_stage_trainable", + "type": null + }, + { + "name": "concat_mode", + "type": null + }, + { + "name": "cond_stage_forward", + "type": null + }, + { + "name": "conditioning_key", + "type": null + }, + { + "name": "scale_factor", + "type": null + }, + { + "name": "scale_by_std", + "type": null + }, + { + "name": "load_ema", + "type": null + } + ], + "return_type": null, + "parent": "LatentDiffusion" + }, + { + "type": "function", + "name": "make_cond_schedule", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "LatentDiffusion" + }, + { + "type": "function", + "name": "on_train_batch_start", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "batch", + "type": null + }, + { + "name": "batch_idx", + "type": null + }, + { + "name": "dataloader_idx", + "type": null + } + ], + "return_type": null, + "parent": "LatentDiffusion" + }, + { + "type": "function", + "name": "register_schedule", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "given_betas", + "type": null + }, + { + "name": "beta_schedule", + "type": null + }, + { + "name": "timesteps", + "type": null + }, + { + "name": "linear_start", + "type": null + }, + { + "name": "linear_end", + "type": null + }, + { + "name": "cosine_s", + "type": null + } + ], + "return_type": null, + "parent": "LatentDiffusion" + }, + { + "type": "function", + "name": "instantiate_first_stage", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "config", + "type": null + } + ], + "return_type": null, + "parent": "LatentDiffusion" + }, + { + "type": "function", + "name": "instantiate_cond_stage", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "config", + "type": null + } + ], + "return_type": null, + "parent": "LatentDiffusion" + }, + { + "type": "function", + "name": "_get_denoise_row_from_list", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "samples", + "type": null + }, + { + "name": "desc", + "type": null + }, + { + "name": "force_no_decoder_quantization", + "type": null + } + ], + "return_type": "denoise_grid", + "parent": "LatentDiffusion" + }, + { + "type": "function", + "name": "get_first_stage_encoding", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "encoder_posterior", + "type": null + } + ], + "return_type": "(self.scale_factor * z)", + "parent": "LatentDiffusion" + }, + { + "type": "function", + "name": "get_learned_conditioning", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "c", + "type": null + } + ], + "return_type": "c", + "parent": "LatentDiffusion" + }, + { + "type": "function", + "name": "meshgrid", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "h", + "type": null + }, + { + "name": "w", + "type": null + } + ], + "return_type": "arr", + "parent": "LatentDiffusion" + }, + { + "type": "function", + "name": "delta_border", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "h", + "type": null + }, + { + "name": "w", + "type": null + } + ], + "return_type": "edge_dist", + "parent": "LatentDiffusion" + }, + { + "type": "function", + "name": "get_weighting", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "h", + "type": null + }, + { + "name": "w", + "type": null + }, + { + "name": "Ly", + "type": null + }, + { + "name": "Lx", + "type": null + }, + { + "name": "device", + "type": null + } + ], + "return_type": "weighting", + "parent": "LatentDiffusion" + }, + { + "type": "function", + "name": "get_fold_unfold", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "kernel_size", + "type": null + }, + { + "name": "stride", + "type": null + }, + { + "name": "uf", + "type": null + }, + { + "name": "df", + "type": null + } + ], + "return_type": "(fold, unfold, normalization, weighting)", + "parent": "LatentDiffusion" + }, + { + "type": "function", + "name": "get_input", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "batch", + "type": null + }, + { + "name": "k", + "type": null + }, + { + "name": "return_first_stage_outputs", + "type": null + }, + { + "name": "force_c_encode", + "type": null + }, + { + "name": "cond_key", + "type": null + }, + { + "name": "return_original_cond", + "type": null + }, + { + "name": "bs", + "type": null + }, + { + "name": "uncond", + "type": null + } + ], + "return_type": "out", + "parent": "LatentDiffusion" + }, + { + "type": "function", + "name": "decode_first_stage", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "z", + "type": null + }, + { + "name": "predict_cids", + "type": null + }, + { + "name": "force_not_quantize", + "type": null + } + ], + "return_type": "decoded", + "parent": "LatentDiffusion" + }, + { + "type": "function", + "name": "differentiable_decode_first_stage", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "z", + "type": null + }, + { + "name": "predict_cids", + "type": null + }, + { + "name": "force_not_quantize", + "type": null + } + ], + "return_type": "decoded", + "parent": "LatentDiffusion" + }, + { + "type": "function", + "name": "encode_first_stage", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "self.first_stage_model.encode(x)", + "parent": "LatentDiffusion" + }, + { + "type": "function", + "name": "shared_step", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "batch", + "type": null + } + ], + "return_type": "loss", + "parent": "LatentDiffusion" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "c", + "type": null + } + ], + "return_type": "self.p_losses(x, c, t, *args, **kwargs)", + "parent": "LatentDiffusion" + }, + { + "type": "function", + "name": "apply_model", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x_noisy", + "type": null + }, + { + "name": "t", + "type": null + }, + { + "name": "cond", + "type": null + }, + { + "name": "return_ids", + "type": null + } + ], + "return_type": "x_recon[0]", + "parent": "LatentDiffusion" + }, + { + "type": "function", + "name": "_predict_eps_from_xstart", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x_t", + "type": null + }, + { + "name": "t", + "type": null + }, + { + "name": "pred_xstart", + "type": null + } + ], + "return_type": "((extract_into_tensor(self.sqrt_recip_alphas_cumprod, t, x_t.shape) * x_t -\n pred_xstart) / extract_into_tensor(self.sqrt_recipm1_alphas_cumprod, t,\n x_t.shape))", + "parent": "LatentDiffusion" + }, + { + "type": "function", + "name": "_prior_bpd", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x_start", + "type": null + } + ], + "return_type": "(mean_flat(kl_prior) / np.log(2.0))", + "parent": "LatentDiffusion" + }, + { + "type": "function", + "name": "p_losses", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x_start", + "type": null + }, + { + "name": "cond", + "type": null + }, + { + "name": "t", + "type": null + }, + { + "name": "noise", + "type": null + } + ], + "return_type": "(loss, loss_dict)", + "parent": "LatentDiffusion" + }, + { + "type": "function", + "name": "p_mean_variance", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "c", + "type": null + }, + { + "name": "t", + "type": null + }, + { + "name": "clip_denoised", + "type": "bool" + }, + { + "name": "return_codebook_ids", + "type": null + }, + { + "name": "quantize_denoised", + "type": null + }, + { + "name": "return_x0", + "type": null + }, + { + "name": "score_corrector", + "type": null + }, + { + "name": "corrector_kwargs", + "type": null + } + ], + "return_type": "(model_mean, posterior_variance, posterior_log_variance, logits)", + "parent": "LatentDiffusion" + }, + { + "type": "function", + "name": "p_sample", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "c", + "type": null + }, + { + "name": "t", + "type": null + }, + { + "name": "clip_denoised", + "type": null + }, + { + "name": "repeat_noise", + "type": null + }, + { + "name": "return_codebook_ids", + "type": null + }, + { + "name": "quantize_denoised", + "type": null + }, + { + "name": "return_x0", + "type": null + }, + { + "name": "temperature", + "type": null + }, + { + "name": "noise_dropout", + "type": null + }, + { + "name": "score_corrector", + "type": null + }, + { + "name": "corrector_kwargs", + "type": null + } + ], + "return_type": "(model_mean + nonzero_mask * (0.5 * model_log_variance).exp() * noise,\n logits.argmax(dim=1))", + "parent": "LatentDiffusion" + }, + { + "type": "function", + "name": "progressive_denoising", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "cond", + "type": null + }, + { + "name": "shape", + "type": null + }, + { + "name": "verbose", + "type": null + }, + { + "name": "callback", + "type": null + }, + { + "name": "quantize_denoised", + "type": null + }, + { + "name": "img_callback", + "type": null + }, + { + "name": "mask", + "type": null + }, + { + "name": "x0", + "type": null + }, + { + "name": "temperature", + "type": null + }, + { + "name": "noise_dropout", + "type": null + }, + { + "name": "score_corrector", + "type": null + }, + { + "name": "corrector_kwargs", + "type": null + }, + { + "name": "batch_size", + "type": null + }, + { + "name": "x_T", + "type": null + }, + { + "name": "start_T", + "type": null + }, + { + "name": "log_every_t", + "type": null + } + ], + "return_type": "(img, intermediates)", + "parent": "LatentDiffusion" + }, + { + "type": "function", + "name": "p_sample_loop", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "cond", + "type": null + }, + { + "name": "shape", + "type": null + }, + { + "name": "return_intermediates", + "type": null + }, + { + "name": "x_T", + "type": null + }, + { + "name": "verbose", + "type": null + }, + { + "name": "callback", + "type": null + }, + { + "name": "timesteps", + "type": null + }, + { + "name": "quantize_denoised", + "type": null + }, + { + "name": "mask", + "type": null + }, + { + "name": "x0", + "type": null + }, + { + "name": "img_callback", + "type": null + }, + { + "name": "start_T", + "type": null + }, + { + "name": "log_every_t", + "type": null + } + ], + "return_type": "img", + "parent": "LatentDiffusion" + }, + { + "type": "function", + "name": "sample", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "cond", + "type": null + }, + { + "name": "batch_size", + "type": null + }, + { + "name": "return_intermediates", + "type": null + }, + { + "name": "x_T", + "type": null + }, + { + "name": "verbose", + "type": null + }, + { + "name": "timesteps", + "type": null + }, + { + "name": "quantize_denoised", + "type": null + }, + { + "name": "mask", + "type": null + }, + { + "name": "x0", + "type": null + }, + { + "name": "shape", + "type": null + } + ], + "return_type": "self.p_sample_loop(cond, shape, return_intermediates=return_intermediates,\n x_T=x_T, verbose=verbose, timesteps=timesteps, quantize_denoised=\n quantize_denoised, mask=mask, x0=x0)", + "parent": "LatentDiffusion" + }, + { + "type": "function", + "name": "sample_log", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "cond", + "type": null + }, + { + "name": "batch_size", + "type": null + }, + { + "name": "ddim", + "type": null + }, + { + "name": "ddim_steps", + "type": null + } + ], + "return_type": "(samples, intermediates)", + "parent": "LatentDiffusion" + }, + { + "type": "function", + "name": "log_images", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "batch", + "type": null + }, + { + "name": "N", + "type": null + }, + { + "name": "n_row", + "type": null + }, + { + "name": "sample", + "type": null + }, + { + "name": "ddim_steps", + "type": null + }, + { + "name": "ddim_eta", + "type": null + }, + { + "name": "return_keys", + "type": null + }, + { + "name": "quantize_denoised", + "type": null + }, + { + "name": "inpaint", + "type": null + }, + { + "name": "plot_denoise_rows", + "type": null + }, + { + "name": "plot_progressive_rows", + "type": null + }, + { + "name": "plot_diffusion_rows", + "type": null + } + ], + "return_type": "log", + "parent": "LatentDiffusion" + }, + { + "type": "function", + "name": "configure_optimizers", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "opt", + "parent": "LatentDiffusion" + }, + { + "type": "function", + "name": "to_rgb", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "x", + "parent": "LatentDiffusion" + } + ], + "parent": null + }, + { + "type": "class", + "name": "DiffusionWrapper", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "diff_model_config", + "type": null + }, + { + "name": "conditioning_key", + "type": null + } + ], + "return_type": null, + "parent": "DiffusionWrapper" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "t", + "type": null + }, + { + "name": "c_concat", + "type": "list" + }, + { + "name": "c_crossattn", + "type": "list" + } + ], + "return_type": "out", + "parent": "DiffusionWrapper" + } + ], + "parent": null + }, + { + "type": "class", + "name": "Layout2ImgDiffusion", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "cond_stage_key", + "type": null + } + ], + "return_type": null, + "parent": "Layout2ImgDiffusion" + }, + { + "type": "function", + "name": "log_images", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "batch", + "type": null + }, + { + "name": "N", + "type": null + } + ], + "return_type": "logs", + "parent": "Layout2ImgDiffusion" + } + ], + "parent": null + } + ], + "modules/models/diffusion/uni_pc/__init__.py": [], + "modules/models/diffusion/uni_pc/sampler.py": [ + { + "type": "class", + "name": "UniPCSampler", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "model", + "type": null + } + ], + "return_type": null, + "parent": "UniPCSampler" + }, + { + "type": "function", + "name": "register_buffer", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "name", + "type": null + }, + { + "name": "attr", + "type": null + } + ], + "return_type": null, + "parent": "UniPCSampler" + }, + { + "type": "function", + "name": "set_hooks", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "before_sample", + "type": null + }, + { + "name": "after_sample", + "type": null + }, + { + "name": "after_update", + "type": null + } + ], + "return_type": null, + "parent": "UniPCSampler" + }, + { + "type": "function", + "name": "sample", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "S", + "type": null + }, + { + "name": "batch_size", + "type": null + }, + { + "name": "shape", + "type": null + }, + { + "name": "conditioning", + "type": null + }, + { + "name": "callback", + "type": null + }, + { + "name": "normals_sequence", + "type": null + }, + { + "name": "img_callback", + "type": null + }, + { + "name": "quantize_x0", + "type": null + }, + { + "name": "eta", + "type": null + }, + { + "name": "mask", + "type": null + }, + { + "name": "x0", + "type": null + }, + { + "name": "temperature", + "type": null + }, + { + "name": "noise_dropout", + "type": null + }, + { + "name": "score_corrector", + "type": null + }, + { + "name": "corrector_kwargs", + "type": null + }, + { + "name": "verbose", + "type": null + }, + { + "name": "x_T", + "type": null + }, + { + "name": "log_every_t", + "type": null + }, + { + "name": "unconditional_guidance_scale", + "type": null + }, + { + "name": "unconditional_conditioning", + "type": null + } + ], + "return_type": "(x.to(device), None)", + "parent": "UniPCSampler" + } + ], + "parent": null + } + ], + "modules/models/diffusion/uni_pc/uni_pc.py": [ + { + "type": "class", + "name": "NoiseScheduleVP", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "schedule", + "type": null + }, + { + "name": "betas", + "type": null + }, + { + "name": "alphas_cumprod", + "type": null + }, + { + "name": "continuous_beta_0", + "type": null + }, + { + "name": "continuous_beta_1", + "type": null + } + ], + "return_type": null, + "parent": "NoiseScheduleVP" + }, + { + "type": "function", + "name": "marginal_log_mean_coeff", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "t", + "type": null + } + ], + "return_type": "interpolate_fn(t.reshape((-1, 1)), self.t_array.to(t.device), self.\n log_alpha_array.to(t.device)).reshape(-1)", + "parent": "NoiseScheduleVP" + }, + { + "type": "function", + "name": "marginal_alpha", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "t", + "type": null + } + ], + "return_type": "torch.exp(self.marginal_log_mean_coeff(t))", + "parent": "NoiseScheduleVP" + }, + { + "type": "function", + "name": "marginal_std", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "t", + "type": null + } + ], + "return_type": "torch.sqrt(1.0 - torch.exp(2.0 * self.marginal_log_mean_coeff(t)))", + "parent": "NoiseScheduleVP" + }, + { + "type": "function", + "name": "marginal_lambda", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "t", + "type": null + } + ], + "return_type": "(log_mean_coeff - log_std)", + "parent": "NoiseScheduleVP" + }, + { + "type": "function", + "name": "inverse_lambda", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "lamb", + "type": null + } + ], + "return_type": "(tmp / (torch.sqrt(Delta) + self.beta_0) / (self.beta_1 - self.beta_0))", + "parent": "NoiseScheduleVP" + } + ], + "parent": null + }, + { + "type": "function", + "name": "model_wrapper", + "args": [ + { + "name": "model", + "type": null + }, + { + "name": "noise_schedule", + "type": null + }, + { + "name": "model_type", + "type": null + }, + { + "name": "model_kwargs", + "type": null + }, + { + "name": "guidance_type", + "type": null + }, + { + "name": "guidance_scale", + "type": null + }, + { + "name": "classifier_fn", + "type": null + }, + { + "name": "classifier_kwargs", + "type": null + } + ], + "return_type": "model_fn", + "parent": null + }, + { + "type": "class", + "name": "UniPC", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "model_fn", + "type": null + }, + { + "name": "noise_schedule", + "type": null + }, + { + "name": "predict_x0", + "type": null + }, + { + "name": "thresholding", + "type": null + }, + { + "name": "max_val", + "type": null + }, + { + "name": "variant", + "type": null + }, + { + "name": "condition", + "type": null + }, + { + "name": "unconditional_condition", + "type": null + }, + { + "name": "before_sample", + "type": null + }, + { + "name": "after_sample", + "type": null + }, + { + "name": "after_update", + "type": null + } + ], + "return_type": null, + "parent": "UniPC" + }, + { + "type": "function", + "name": "dynamic_thresholding_fn", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x0", + "type": null + }, + { + "name": "t", + "type": null + } + ], + "return_type": "x0", + "parent": "UniPC" + }, + { + "type": "function", + "name": "model", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "t", + "type": null + } + ], + "return_type": "res", + "parent": "UniPC" + }, + { + "type": "function", + "name": "noise_prediction_fn", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "t", + "type": null + } + ], + "return_type": "self.model(x, t)", + "parent": "UniPC" + }, + { + "type": "function", + "name": "data_prediction_fn", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "t", + "type": null + } + ], + "return_type": "x0", + "parent": "UniPC" + }, + { + "type": "function", + "name": "model_fn", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "t", + "type": null + } + ], + "return_type": "self.data_prediction_fn(x, t)", + "parent": "UniPC" + }, + { + "type": "function", + "name": "get_time_steps", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "skip_type", + "type": null + }, + { + "name": "t_T", + "type": null + }, + { + "name": "t_0", + "type": null + }, + { + "name": "N", + "type": null + }, + { + "name": "device", + "type": null + } + ], + "return_type": "self.noise_schedule.inverse_lambda(logSNR_steps)", + "parent": "UniPC" + }, + { + "type": "function", + "name": "get_orders_and_timesteps_for_singlestep_solver", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "steps", + "type": null + }, + { + "name": "order", + "type": null + }, + { + "name": "skip_type", + "type": null + }, + { + "name": "t_T", + "type": null + }, + { + "name": "t_0", + "type": null + }, + { + "name": "device", + "type": null + } + ], + "return_type": "(timesteps_outer, orders)", + "parent": "UniPC" + }, + { + "type": "function", + "name": "denoise_to_zero_fn", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "s", + "type": null + } + ], + "return_type": "self.data_prediction_fn(x, s)", + "parent": "UniPC" + }, + { + "type": "function", + "name": "multistep_uni_pc_update", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "model_prev_list", + "type": null + }, + { + "name": "t_prev_list", + "type": null + }, + { + "name": "t", + "type": null + }, + { + "name": "order", + "type": null + } + ], + "return_type": "self.multistep_uni_pc_bh_update(x, model_prev_list, t_prev_list, t, order,\n **kwargs)", + "parent": "UniPC" + }, + { + "type": "function", + "name": "multistep_uni_pc_vary_update", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "model_prev_list", + "type": null + }, + { + "name": "t_prev_list", + "type": null + }, + { + "name": "t", + "type": null + }, + { + "name": "order", + "type": null + }, + { + "name": "use_corrector", + "type": null + } + ], + "return_type": "(x_t, model_t)", + "parent": "UniPC" + }, + { + "type": "function", + "name": "multistep_uni_pc_bh_update", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "model_prev_list", + "type": null + }, + { + "name": "t_prev_list", + "type": null + }, + { + "name": "t", + "type": null + }, + { + "name": "order", + "type": null + }, + { + "name": "x_t", + "type": null + }, + { + "name": "use_corrector", + "type": null + } + ], + "return_type": "(x_t, model_t)", + "parent": "UniPC" + }, + { + "type": "function", + "name": "sample", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "steps", + "type": null + }, + { + "name": "t_start", + "type": null + }, + { + "name": "t_end", + "type": null + }, + { + "name": "order", + "type": null + }, + { + "name": "skip_type", + "type": null + }, + { + "name": "method", + "type": null + }, + { + "name": "lower_order_final", + "type": null + }, + { + "name": "denoise_to_zero", + "type": null + }, + { + "name": "solver_type", + "type": null + }, + { + "name": "atol", + "type": null + }, + { + "name": "rtol", + "type": null + }, + { + "name": "corrector", + "type": null + } + ], + "return_type": "x", + "parent": "UniPC" + } + ], + "parent": null + }, + { + "type": "function", + "name": "interpolate_fn", + "args": [ + { + "name": "x", + "type": null + }, + { + "name": "xp", + "type": null + }, + { + "name": "yp", + "type": null + } + ], + "return_type": "cand", + "parent": null + }, + { + "type": "function", + "name": "expand_dims", + "args": [ + { + "name": "v", + "type": null + }, + { + "name": "dims", + "type": null + } + ], + "return_type": "v[(...,) + (None,) * (dims - 1)]", + "parent": null + } + ], + "modules/ngrok.py": [ + { + "type": "function", + "name": "connect", + "args": [ + { + "name": "token", + "type": null + }, + { + "name": "port", + "type": null + }, + { + "name": "options", + "type": null + } + ], + "return_type": null, + "parent": null + } + ], + "modules/options.py": [ + { + "type": "class", + "name": "OptionInfo", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "default", + "type": null + }, + { + "name": "label", + "type": null + }, + { + "name": "component", + "type": null + }, + { + "name": "component_args", + "type": null + }, + { + "name": "onchange", + "type": null + }, + { + "name": "section", + "type": null + }, + { + "name": "refresh", + "type": null + }, + { + "name": "comment_before", + "type": null + }, + { + "name": "comment_after", + "type": null + }, + { + "name": "infotext", + "type": null + }, + { + "name": "restrict_api", + "type": null + } + ], + "return_type": null, + "parent": "OptionInfo" + }, + { + "type": "function", + "name": "link", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "label", + "type": null + }, + { + "name": "url", + "type": null + } + ], + "return_type": "self", + "parent": "OptionInfo" + }, + { + "type": "function", + "name": "js", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "label", + "type": null + }, + { + "name": "js_func", + "type": null + } + ], + "return_type": "self", + "parent": "OptionInfo" + }, + { + "type": "function", + "name": "info", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "info", + "type": null + } + ], + "return_type": "self", + "parent": "OptionInfo" + }, + { + "type": "function", + "name": "html", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "html", + "type": null + } + ], + "return_type": "self", + "parent": "OptionInfo" + }, + { + "type": "function", + "name": "needs_restart", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "self", + "parent": "OptionInfo" + }, + { + "type": "function", + "name": "needs_reload_ui", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "self", + "parent": "OptionInfo" + } + ], + "parent": null + }, + { + "type": "class", + "name": "OptionHTML", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "text", + "type": null + } + ], + "return_type": null, + "parent": "OptionHTML" + } + ], + "parent": null + }, + { + "type": "function", + "name": "options_section", + "args": [ + { + "name": "section_identifier", + "type": null + }, + { + "name": "options_dict", + "type": null + } + ], + "return_type": "options_dict", + "parent": null + }, + { + "type": "class", + "name": "Options", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "data_labels", + "type": "dict[str, OptionInfo]" + }, + { + "name": "restricted_opts", + "type": null + } + ], + "return_type": null, + "parent": "Options" + }, + { + "type": "function", + "name": "__setattr__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "key", + "type": null + }, + { + "name": "value", + "type": null + } + ], + "return_type": "super(Options, self).__setattr__(key, value)", + "parent": "Options" + }, + { + "type": "function", + "name": "__getattr__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "item", + "type": null + } + ], + "return_type": "super(Options, self).__getattribute__(item)", + "parent": "Options" + }, + { + "type": "function", + "name": "set", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "key", + "type": null + }, + { + "name": "value", + "type": null + }, + { + "name": "is_api", + "type": null + }, + { + "name": "run_callbacks", + "type": null + } + ], + "return_type": "(True)", + "parent": "Options" + }, + { + "type": "function", + "name": "get_default", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "key", + "type": null + } + ], + "return_type": "data_label.default", + "parent": "Options" + }, + { + "type": "function", + "name": "save", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "filename", + "type": null + } + ], + "return_type": null, + "parent": "Options" + }, + { + "type": "function", + "name": "same_type", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "y", + "type": null + } + ], + "return_type": "(type_x == type_y)", + "parent": "Options" + }, + { + "type": "function", + "name": "load", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "filename", + "type": null + } + ], + "return_type": null, + "parent": "Options" + }, + { + "type": "function", + "name": "onchange", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "key", + "type": null + }, + { + "name": "func", + "type": null + }, + { + "name": "call", + "type": null + } + ], + "return_type": null, + "parent": "Options" + }, + { + "type": "function", + "name": "dumpjson", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "json.dumps(d)", + "parent": "Options" + }, + { + "type": "function", + "name": "add_option", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "key", + "type": null + }, + { + "name": "info", + "type": null + } + ], + "return_type": null, + "parent": "Options" + }, + { + "type": "function", + "name": "reorder", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "Options" + }, + { + "type": "function", + "name": "cast_value", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "key", + "type": null + }, + { + "name": "value", + "type": null + } + ], + "return_type": "value", + "parent": "Options" + } + ], + "parent": null + } + ], + "modules/patches.py": [ + { + "type": "function", + "name": "patch", + "args": [ + { + "name": "key", + "type": null + }, + { + "name": "obj", + "type": null + }, + { + "name": "field", + "type": null + }, + { + "name": "replacement", + "type": null + } + ], + "return_type": "original_func", + "parent": null + }, + { + "type": "function", + "name": "undo", + "args": [ + { + "name": "key", + "type": null + }, + { + "name": "obj", + "type": null + }, + { + "name": "field", + "type": null + } + ], + "return_type": "None", + "parent": null + }, + { + "type": "function", + "name": "original", + "args": [ + { + "name": "key", + "type": null + }, + { + "name": "obj", + "type": null + }, + { + "name": "field", + "type": null + } + ], + "return_type": "originals[key].get(patch_key, None)", + "parent": null + } + ], + "modules/paths.py": [ + { + "type": "function", + "name": "mute_sdxl_imports", + "args": [], + "return_type": null, + "parent": null + } + ], + "modules/paths_internal.py": [], + "modules/postprocessing.py": [ + { + "type": "function", + "name": "run_postprocessing", + "args": [ + { + "name": "extras_mode", + "type": null + }, + { + "name": "image", + "type": null + }, + { + "name": "image_folder", + "type": null + }, + { + "name": "input_dir", + "type": null + }, + { + "name": "output_dir", + "type": null + }, + { + "name": "show_extras_results", + "type": null + } + ], + "return_type": "(outputs, ui_common.plaintext_to_html(infotext), '')", + "parent": null + }, + { + "type": "function", + "name": "run_extras", + "args": [ + { + "name": "extras_mode", + "type": null + }, + { + "name": "resize_mode", + "type": null + }, + { + "name": "image", + "type": null + }, + { + "name": "image_folder", + "type": null + }, + { + "name": "input_dir", + "type": null + }, + { + "name": "output_dir", + "type": null + }, + { + "name": "show_extras_results", + "type": null + }, + { + "name": "gfpgan_visibility", + "type": null + }, + { + "name": "codeformer_visibility", + "type": null + }, + { + "name": "codeformer_weight", + "type": null + }, + { + "name": "upscaling_resize", + "type": null + }, + { + "name": "upscaling_resize_w", + "type": null + }, + { + "name": "upscaling_resize_h", + "type": null + }, + { + "name": "upscaling_crop", + "type": null + }, + { + "name": "extras_upscaler_1", + "type": null + }, + { + "name": "extras_upscaler_2", + "type": null + }, + { + "name": "extras_upscaler_2_visibility", + "type": null + }, + { + "name": "upscale_first", + "type": "bool" + }, + { + "name": "save_output", + "type": "bool" + } + ], + "return_type": "run_postprocessing(extras_mode, image, image_folder, input_dir, output_dir,\n show_extras_results, *args, save_output=save_output)", + "parent": null + } + ], + "modules/processing.py": [ + { + "type": "function", + "name": "setup_color_correction", + "args": [ + { + "name": "image", + "type": null + } + ], + "return_type": "correction_target", + "parent": null + }, + { + "type": "function", + "name": "apply_color_correction", + "args": [ + { + "name": "correction", + "type": null + }, + { + "name": "original_image", + "type": null + } + ], + "return_type": "image.convert('RGB')", + "parent": null + }, + { + "type": "function", + "name": "apply_overlay", + "args": [ + { + "name": "image", + "type": null + }, + { + "name": "paste_loc", + "type": null + }, + { + "name": "index", + "type": null + }, + { + "name": "overlays", + "type": null + } + ], + "return_type": "image", + "parent": null + }, + { + "type": "function", + "name": "create_binary_mask", + "args": [ + { + "name": "image", + "type": null + } + ], + "return_type": "image", + "parent": null + }, + { + "type": "function", + "name": "txt2img_image_conditioning", + "args": [ + { + "name": "sd_model", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "width", + "type": null + }, + { + "name": "height", + "type": null + } + ], + "return_type": "image_conditioning", + "parent": null + }, + { + "type": "class", + "name": "StableDiffusionProcessing", + "methods": [ + { + "type": "function", + "name": "__post_init__", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "StableDiffusionProcessing" + }, + { + "type": "function", + "name": "sd_model", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "shared.sd_model", + "parent": "StableDiffusionProcessing" + }, + { + "type": "function", + "name": "sd_model", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "value", + "type": null + } + ], + "return_type": null, + "parent": "StableDiffusionProcessing" + }, + { + "type": "function", + "name": "scripts", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "self.scripts_value", + "parent": "StableDiffusionProcessing" + }, + { + "type": "function", + "name": "scripts", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "value", + "type": null + } + ], + "return_type": null, + "parent": "StableDiffusionProcessing" + }, + { + "type": "function", + "name": "script_args", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "self.script_args_value", + "parent": "StableDiffusionProcessing" + }, + { + "type": "function", + "name": "script_args", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "value", + "type": null + } + ], + "return_type": null, + "parent": "StableDiffusionProcessing" + }, + { + "type": "function", + "name": "setup_scripts", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "StableDiffusionProcessing" + }, + { + "type": "function", + "name": "comment", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "text", + "type": null + } + ], + "return_type": null, + "parent": "StableDiffusionProcessing" + }, + { + "type": "function", + "name": "txt2img_image_conditioning", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "width", + "type": null + }, + { + "name": "height", + "type": null + } + ], + "return_type": "txt2img_image_conditioning(self.sd_model, x, width or self.width, height or\n self.height)", + "parent": "StableDiffusionProcessing" + }, + { + "type": "function", + "name": "depth2img_image_conditioning", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "source_image", + "type": null + } + ], + "return_type": "conditioning", + "parent": "StableDiffusionProcessing" + }, + { + "type": "function", + "name": "edit_image_conditioning", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "source_image", + "type": null + } + ], + "return_type": "conditioning_image", + "parent": "StableDiffusionProcessing" + }, + { + "type": "function", + "name": "unclip_image_conditioning", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "source_image", + "type": null + } + ], + "return_type": "c_adm", + "parent": "StableDiffusionProcessing" + }, + { + "type": "function", + "name": "inpainting_image_conditioning", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "source_image", + "type": null + }, + { + "name": "latent_image", + "type": null + }, + { + "name": "image_mask", + "type": null + } + ], + "return_type": "image_conditioning", + "parent": "StableDiffusionProcessing" + }, + { + "type": "function", + "name": "img2img_image_conditioning", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "source_image", + "type": null + }, + { + "name": "latent_image", + "type": null + }, + { + "name": "image_mask", + "type": null + } + ], + "return_type": "latent_image.new_zeros(latent_image.shape[0], 5, 1, 1)", + "parent": "StableDiffusionProcessing" + }, + { + "type": "function", + "name": "init", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "all_prompts", + "type": null + }, + { + "name": "all_seeds", + "type": null + }, + { + "name": "all_subseeds", + "type": null + } + ], + "return_type": null, + "parent": "StableDiffusionProcessing" + }, + { + "type": "function", + "name": "sample", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "conditioning", + "type": null + }, + { + "name": "unconditional_conditioning", + "type": null + }, + { + "name": "seeds", + "type": null + }, + { + "name": "subseeds", + "type": null + }, + { + "name": "subseed_strength", + "type": null + }, + { + "name": "prompts", + "type": null + } + ], + "return_type": null, + "parent": "StableDiffusionProcessing" + }, + { + "type": "function", + "name": "close", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "StableDiffusionProcessing" + }, + { + "type": "function", + "name": "get_token_merging_ratio", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "for_hr", + "type": null + } + ], + "return_type": "(self.token_merging_ratio or opts.token_merging_ratio)", + "parent": "StableDiffusionProcessing" + }, + { + "type": "function", + "name": "setup_prompts", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "StableDiffusionProcessing" + }, + { + "type": "function", + "name": "cached_params", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "required_prompts", + "type": null + }, + { + "name": "steps", + "type": null + }, + { + "name": "extra_network_data", + "type": null + }, + { + "name": "hires_steps", + "type": null + }, + { + "name": "use_old_scheduling", + "type": null + } + ], + "return_type": "(required_prompts, steps, hires_steps, use_old_scheduling, opts.\n CLIP_stop_at_last_layers, shared.sd_model.sd_checkpoint_info,\n extra_network_data, opts.sdxl_crop_left, opts.sdxl_crop_top, self.width,\n self.height)", + "parent": "StableDiffusionProcessing" + }, + { + "type": "function", + "name": "get_conds_with_caching", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "function", + "type": null + }, + { + "name": "required_prompts", + "type": null + }, + { + "name": "steps", + "type": null + }, + { + "name": "caches", + "type": null + }, + { + "name": "extra_network_data", + "type": null + }, + { + "name": "hires_steps", + "type": null + } + ], + "return_type": "cache[1]", + "parent": "StableDiffusionProcessing" + }, + { + "type": "function", + "name": "setup_conds", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "StableDiffusionProcessing" + }, + { + "type": "function", + "name": "get_conds", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "(self.c, self.uc)", + "parent": "StableDiffusionProcessing" + }, + { + "type": "function", + "name": "parse_extra_network_prompts", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "StableDiffusionProcessing" + }, + { + "type": "function", + "name": "save_samples", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "(opts.samples_save and not self.do_not_save_samples and (opts.\n save_incomplete_images or not state.interrupted and not state.skipped))", + "parent": "StableDiffusionProcessing" + } + ], + "parent": null + }, + { + "type": "class", + "name": "Processed", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": "StableDiffusionProcessing" + }, + { + "name": "images_list", + "type": null + }, + { + "name": "seed", + "type": null + }, + { + "name": "info", + "type": null + }, + { + "name": "subseed", + "type": null + }, + { + "name": "all_prompts", + "type": null + }, + { + "name": "all_negative_prompts", + "type": null + }, + { + "name": "all_seeds", + "type": null + }, + { + "name": "all_subseeds", + "type": null + }, + { + "name": "index_of_first_image", + "type": null + }, + { + "name": "infotexts", + "type": null + }, + { + "name": "comments", + "type": null + } + ], + "return_type": null, + "parent": "Processed" + }, + { + "type": "function", + "name": "js", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "json.dumps(obj)", + "parent": "Processed" + }, + { + "type": "function", + "name": "infotext", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": "StableDiffusionProcessing" + }, + { + "name": "index", + "type": null + } + ], + "return_type": "create_infotext(p, self.all_prompts, self.all_seeds, self.all_subseeds,\n comments=[], position_in_batch=index % self.batch_size, iteration=index //\n self.batch_size)", + "parent": "Processed" + }, + { + "type": "function", + "name": "get_token_merging_ratio", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "for_hr", + "type": null + } + ], + "return_type": "(self.token_merging_ratio_hr if for_hr else self.token_merging_ratio)", + "parent": "Processed" + } + ], + "parent": null + }, + { + "type": "function", + "name": "create_random_tensors", + "args": [ + { + "name": "shape", + "type": null + }, + { + "name": "seeds", + "type": null + }, + { + "name": "subseeds", + "type": null + }, + { + "name": "subseed_strength", + "type": null + }, + { + "name": "seed_resize_from_h", + "type": null + }, + { + "name": "seed_resize_from_w", + "type": null + }, + { + "name": "p", + "type": null + } + ], + "return_type": "g.next()", + "parent": null + }, + { + "type": "class", + "name": "DecodedSamples", + "methods": [], + "parent": null + }, + { + "type": "function", + "name": "decode_latent_batch", + "args": [ + { + "name": "model", + "type": null + }, + { + "name": "batch", + "type": null + }, + { + "name": "target_device", + "type": null + }, + { + "name": "check_for_nans", + "type": null + } + ], + "return_type": "samples", + "parent": null + }, + { + "type": "function", + "name": "get_fixed_seed", + "args": [ + { + "name": "seed", + "type": null + } + ], + "return_type": "seed", + "parent": null + }, + { + "type": "function", + "name": "fix_seed", + "args": [ + { + "name": "p", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "program_version", + "args": [], + "return_type": "res", + "parent": null + }, + { + "type": "function", + "name": "create_infotext", + "args": [ + { + "name": "p", + "type": null + }, + { + "name": "all_prompts", + "type": null + }, + { + "name": "all_seeds", + "type": null + }, + { + "name": "all_subseeds", + "type": null + }, + { + "name": "comments", + "type": null + }, + { + "name": "iteration", + "type": null + }, + { + "name": "position_in_batch", + "type": null + }, + { + "name": "use_main_prompt", + "type": null + }, + { + "name": "index", + "type": null + }, + { + "name": "all_negative_prompts", + "type": null + } + ], + "return_type": "f\"\"\"{prompt_text}{negative_prompt_text}\n{generation_params_text}\"\"\".strip()", + "parent": null + }, + { + "type": "function", + "name": "process_images", + "args": [ + { + "name": "p", + "type": "StableDiffusionProcessing" + } + ], + "return_type": "res", + "parent": null + }, + { + "type": "function", + "name": "process_images_inner", + "args": [ + { + "name": "p", + "type": "StableDiffusionProcessing" + } + ], + "return_type": "res", + "parent": null + }, + { + "type": "function", + "name": "old_hires_fix_first_pass_dimensions", + "args": [ + { + "name": "width", + "type": null + }, + { + "name": "height", + "type": null + } + ], + "return_type": "(width, height)", + "parent": null + }, + { + "type": "class", + "name": "StableDiffusionProcessingTxt2Img", + "methods": [ + { + "type": "function", + "name": "__post_init__", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "StableDiffusionProcessingTxt2Img" + }, + { + "type": "function", + "name": "calculate_target_resolution", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "StableDiffusionProcessingTxt2Img" + }, + { + "type": "function", + "name": "init", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "all_prompts", + "type": null + }, + { + "name": "all_seeds", + "type": null + }, + { + "name": "all_subseeds", + "type": null + } + ], + "return_type": null, + "parent": "StableDiffusionProcessingTxt2Img" + }, + { + "type": "function", + "name": "sample", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "conditioning", + "type": null + }, + { + "name": "unconditional_conditioning", + "type": null + }, + { + "name": "seeds", + "type": null + }, + { + "name": "subseeds", + "type": null + }, + { + "name": "subseed_strength", + "type": null + }, + { + "name": "prompts", + "type": null + } + ], + "return_type": "self.sample_hr_pass(samples, decoded_samples, seeds, subseeds,\n subseed_strength, prompts)", + "parent": "StableDiffusionProcessingTxt2Img" + }, + { + "type": "function", + "name": "sample_hr_pass", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "samples", + "type": null + }, + { + "name": "decoded_samples", + "type": null + }, + { + "name": "seeds", + "type": null + }, + { + "name": "subseeds", + "type": null + }, + { + "name": "subseed_strength", + "type": null + }, + { + "name": "prompts", + "type": null + } + ], + "return_type": "decoded_samples", + "parent": "StableDiffusionProcessingTxt2Img" + }, + { + "type": "function", + "name": "close", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "StableDiffusionProcessingTxt2Img" + }, + { + "type": "function", + "name": "setup_prompts", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "StableDiffusionProcessingTxt2Img" + }, + { + "type": "function", + "name": "calculate_hr_conds", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "StableDiffusionProcessingTxt2Img" + }, + { + "type": "function", + "name": "setup_conds", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "StableDiffusionProcessingTxt2Img" + }, + { + "type": "function", + "name": "get_conds", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "super().get_conds()", + "parent": "StableDiffusionProcessingTxt2Img" + }, + { + "type": "function", + "name": "parse_extra_network_prompts", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "res", + "parent": "StableDiffusionProcessingTxt2Img" + } + ], + "parent": null + }, + { + "type": "class", + "name": "StableDiffusionProcessingImg2Img", + "methods": [ + { + "type": "function", + "name": "__post_init__", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "StableDiffusionProcessingImg2Img" + }, + { + "type": "function", + "name": "mask_blur", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "None", + "parent": "StableDiffusionProcessingImg2Img" + }, + { + "type": "function", + "name": "mask_blur", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "value", + "type": null + } + ], + "return_type": null, + "parent": "StableDiffusionProcessingImg2Img" + }, + { + "type": "function", + "name": "init", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "all_prompts", + "type": null + }, + { + "name": "all_seeds", + "type": null + }, + { + "name": "all_subseeds", + "type": null + } + ], + "return_type": null, + "parent": "StableDiffusionProcessingImg2Img" + }, + { + "type": "function", + "name": "sample", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "conditioning", + "type": null + }, + { + "name": "unconditional_conditioning", + "type": null + }, + { + "name": "seeds", + "type": null + }, + { + "name": "subseeds", + "type": null + }, + { + "name": "subseed_strength", + "type": null + }, + { + "name": "prompts", + "type": null + } + ], + "return_type": "samples", + "parent": "StableDiffusionProcessingImg2Img" + }, + { + "type": "function", + "name": "get_token_merging_ratio", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "for_hr", + "type": null + } + ], + "return_type": "(self.token_merging_ratio or 'token_merging_ratio' in self.\n override_settings and opts.token_merging_ratio or opts.\n token_merging_ratio_img2img or opts.token_merging_ratio)", + "parent": "StableDiffusionProcessingImg2Img" + } + ], + "parent": null + } + ], + "modules/processing_scripts/refiner.py": [ + { + "type": "class", + "name": "ScriptRefiner", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "ScriptRefiner" + }, + { + "type": "function", + "name": "title", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "\"\"\"Refiner\"\"\"", + "parent": "ScriptRefiner" + }, + { + "type": "function", + "name": "show", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "is_img2img", + "type": null + } + ], + "return_type": "scripts.AlwaysVisible", + "parent": "ScriptRefiner" + }, + { + "type": "function", + "name": "ui", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "is_img2img", + "type": null + } + ], + "return_type": "(enable_refiner, refiner_checkpoint, refiner_switch_at)", + "parent": "ScriptRefiner" + }, + { + "type": "function", + "name": "setup", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": null + }, + { + "name": "enable_refiner", + "type": null + }, + { + "name": "refiner_checkpoint", + "type": null + }, + { + "name": "refiner_switch_at", + "type": null + } + ], + "return_type": null, + "parent": "ScriptRefiner" + } + ], + "parent": null + } + ], + "modules/processing_scripts/seed.py": [ + { + "type": "class", + "name": "ScriptSeed", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "ScriptSeed" + }, + { + "type": "function", + "name": "title", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "\"\"\"Seed\"\"\"", + "parent": "ScriptSeed" + }, + { + "type": "function", + "name": "show", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "is_img2img", + "type": null + } + ], + "return_type": "scripts.AlwaysVisible", + "parent": "ScriptSeed" + }, + { + "type": "function", + "name": "ui", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "is_img2img", + "type": null + } + ], + "return_type": "(self.seed, seed_checkbox, subseed, subseed_strength, seed_resize_from_w,\n seed_resize_from_h)", + "parent": "ScriptSeed" + }, + { + "type": "function", + "name": "setup", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": null + }, + { + "name": "seed", + "type": null + }, + { + "name": "seed_checkbox", + "type": null + }, + { + "name": "subseed", + "type": null + }, + { + "name": "subseed_strength", + "type": null + }, + { + "name": "seed_resize_from_w", + "type": null + }, + { + "name": "seed_resize_from_h", + "type": null + } + ], + "return_type": null, + "parent": "ScriptSeed" + } + ], + "parent": null + }, + { + "type": "function", + "name": "connect_reuse_seed", + "args": [ + { + "name": "seed", + "type": "gr.Number" + }, + { + "name": "reuse_seed", + "type": "gr.Button" + }, + { + "name": "generation_info", + "type": "gr.Textbox" + }, + { + "name": "is_subseed", + "type": null + } + ], + "return_type": "[res, gr.update()]", + "parent": null + } + ], + "modules/progress.py": [ + { + "type": "function", + "name": "start_task", + "args": [ + { + "name": "id_task", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "finish_task", + "args": [ + { + "name": "id_task", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "record_results", + "args": [ + { + "name": "id_task", + "type": null + }, + { + "name": "res", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "add_task_to_queue", + "args": [ + { + "name": "id_job", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "class", + "name": "ProgressRequest", + "methods": [], + "parent": null + }, + { + "type": "class", + "name": "ProgressResponse", + "methods": [], + "parent": null + }, + { + "type": "function", + "name": "setup_progress_api", + "args": [ + { + "name": "app", + "type": null + } + ], + "return_type": "app.add_api_route('/internal/progress', progressapi, methods=['POST'],\n response_model=ProgressResponse)", + "parent": null + }, + { + "type": "function", + "name": "progressapi", + "args": [ + { + "name": "req", + "type": "ProgressRequest" + } + ], + "return_type": "ProgressResponse(active=active, queued=queued, completed=completed,\n progress=progress, eta=eta, live_preview=live_preview, id_live_preview=\n id_live_preview, textinfo=shared.state.textinfo)", + "parent": null + }, + { + "type": "function", + "name": "restore_progress", + "args": [ + { + "name": "id_task", + "type": null + } + ], + "return_type": "(gr.update(), gr.update(), gr.update(),\n f\"Couldn't restore progress for {id_task}: results either have been discarded or never were obtained\"\n )", + "parent": null + } + ], + "modules/prompt_parser.py": [ + { + "type": "function", + "name": "get_learned_conditioning_prompt_schedules", + "args": [ + { + "name": "prompts", + "type": null + }, + { + "name": "base_steps", + "type": null + }, + { + "name": "hires_steps", + "type": null + }, + { + "name": "use_old_scheduling", + "type": null + } + ], + "return_type": "[promptdict[prompt] for prompt in prompts]", + "parent": null + }, + { + "type": "class", + "name": "SdConditioning", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "prompts", + "type": null + }, + { + "name": "is_negative_prompt", + "type": null + }, + { + "name": "width", + "type": null + }, + { + "name": "height", + "type": null + }, + { + "name": "copy_from", + "type": null + } + ], + "return_type": null, + "parent": "SdConditioning" + } + ], + "parent": null + }, + { + "type": "function", + "name": "get_learned_conditioning", + "args": [ + { + "name": "model", + "type": null + }, + { + "name": "prompts", + "type": "(SdConditioning | list[str])" + }, + { + "name": "steps", + "type": null + }, + { + "name": "hires_steps", + "type": null + }, + { + "name": "use_old_scheduling", + "type": null + } + ], + "return_type": "res", + "parent": null + }, + { + "type": "function", + "name": "get_multicond_prompt_list", + "args": [ + { + "name": "prompts", + "type": "(SdConditioning | list[str])" + } + ], + "return_type": "(res_indexes, prompt_flat_list, prompt_indexes)", + "parent": null + }, + { + "type": "class", + "name": "ComposableScheduledPromptConditioning", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "schedules", + "type": null + }, + { + "name": "weight", + "type": null + } + ], + "return_type": null, + "parent": "ComposableScheduledPromptConditioning" + } + ], + "parent": null + }, + { + "type": "class", + "name": "MulticondLearnedConditioning", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "shape", + "type": null + }, + { + "name": "batch", + "type": null + } + ], + "return_type": null, + "parent": "MulticondLearnedConditioning" + } + ], + "parent": null + }, + { + "type": "function", + "name": "get_multicond_learned_conditioning", + "args": [ + { + "name": "model", + "type": null + }, + { + "name": "prompts", + "type": null + }, + { + "name": "steps", + "type": null + }, + { + "name": "hires_steps", + "type": null + }, + { + "name": "use_old_scheduling", + "type": null + } + ], + "return_type": "MulticondLearnedConditioning(shape=(len(prompts),), batch=res)", + "parent": null + }, + { + "type": "class", + "name": "DictWithShape", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "shape", + "type": null + } + ], + "return_type": null, + "parent": "DictWithShape" + }, + { + "type": "function", + "name": "shape", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "self['crossattn'].shape", + "parent": "DictWithShape" + } + ], + "parent": null + }, + { + "type": "function", + "name": "reconstruct_cond_batch", + "args": [ + { + "name": "c", + "type": "List[List[ScheduledPromptConditioning]]" + }, + { + "name": "current_step", + "type": null + } + ], + "return_type": "res", + "parent": null + }, + { + "type": "function", + "name": "stack_conds", + "args": [ + { + "name": "tensors", + "type": null + } + ], + "return_type": "torch.stack(tensors)", + "parent": null + }, + { + "type": "function", + "name": "reconstruct_multicond_batch", + "args": [ + { + "name": "c", + "type": "MulticondLearnedConditioning" + }, + { + "name": "current_step", + "type": null + } + ], + "return_type": "(conds_list, stacked)", + "parent": null + }, + { + "type": "function", + "name": "parse_prompt_attention", + "args": [ + { + "name": "text", + "type": null + } + ], + "return_type": "res", + "parent": null + } + ], + "modules/realesrgan_model.py": [ + { + "type": "class", + "name": "UpscalerRealESRGAN", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "path", + "type": null + } + ], + "return_type": null, + "parent": "UpscalerRealESRGAN" + }, + { + "type": "function", + "name": "do_upscale", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "img", + "type": null + }, + { + "name": "path", + "type": null + } + ], + "return_type": "image", + "parent": "UpscalerRealESRGAN" + }, + { + "type": "function", + "name": "load_model", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "path", + "type": null + } + ], + "return_type": "scaler", + "parent": "UpscalerRealESRGAN" + }, + { + "type": "function", + "name": "load_models", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "_", + "type": null + } + ], + "return_type": "get_realesrgan_models(self)", + "parent": "UpscalerRealESRGAN" + } + ], + "parent": null + }, + { + "type": "function", + "name": "get_realesrgan_models", + "args": [ + { + "name": "scaler", + "type": null + } + ], + "return_type": "models", + "parent": null + } + ], + "modules/restart.py": [ + { + "type": "function", + "name": "is_restartable", + "args": [], + "return_type": "bool(os.environ.get('SD_WEBUI_RESTART'))", + "parent": null + }, + { + "type": "function", + "name": "restart_program", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "stop_program", + "args": [], + "return_type": null, + "parent": null + } + ], + "modules/rng.py": [ + { + "type": "function", + "name": "randn", + "args": [ + { + "name": "seed", + "type": null + }, + { + "name": "shape", + "type": null + }, + { + "name": "generator", + "type": null + } + ], + "return_type": "torch.randn(shape, device=devices.device, generator=generator)", + "parent": null + }, + { + "type": "function", + "name": "randn_local", + "args": [ + { + "name": "seed", + "type": null + }, + { + "name": "shape", + "type": null + } + ], + "return_type": "torch.randn(shape, device=local_device, generator=local_generator).to(devices\n .device)", + "parent": null + }, + { + "type": "function", + "name": "randn_like", + "args": [ + { + "name": "x", + "type": null + } + ], + "return_type": "torch.randn_like(x)", + "parent": null + }, + { + "type": "function", + "name": "randn_without_seed", + "args": [ + { + "name": "shape", + "type": null + }, + { + "name": "generator", + "type": null + } + ], + "return_type": "torch.randn(shape, device=devices.device, generator=generator)", + "parent": null + }, + { + "type": "function", + "name": "manual_seed", + "args": [ + { + "name": "seed", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "create_generator", + "args": [ + { + "name": "seed", + "type": null + } + ], + "return_type": "rng_philox.Generator(seed)", + "parent": null + }, + { + "type": "function", + "name": "slerp", + "args": [ + { + "name": "val", + "type": null + }, + { + "name": "low", + "type": null + }, + { + "name": "high", + "type": null + } + ], + "return_type": "res", + "parent": null + }, + { + "type": "class", + "name": "ImageRNG", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "shape", + "type": null + }, + { + "name": "seeds", + "type": null + }, + { + "name": "subseeds", + "type": null + }, + { + "name": "subseed_strength", + "type": null + }, + { + "name": "seed_resize_from_h", + "type": null + }, + { + "name": "seed_resize_from_w", + "type": null + } + ], + "return_type": null, + "parent": "ImageRNG" + }, + { + "type": "function", + "name": "first", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "torch.stack(xs).to(shared.device)", + "parent": "ImageRNG" + }, + { + "type": "function", + "name": "next", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "torch.stack(xs).to(shared.device)", + "parent": "ImageRNG" + } + ], + "parent": null + } + ], + "modules/rng_philox.py": [ + { + "type": "function", + "name": "uint32", + "args": [ + { + "name": "x", + "type": null + } + ], + "return_type": "x.view(np.uint32).reshape(-1, 2).transpose(1, 0)", + "parent": null + }, + { + "type": "function", + "name": "philox4_round", + "args": [ + { + "name": "counter", + "type": null + }, + { + "name": "key", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "philox4_32", + "args": [ + { + "name": "counter", + "type": null + }, + { + "name": "key", + "type": null + }, + { + "name": "rounds", + "type": null + } + ], + "return_type": "counter", + "parent": null + }, + { + "type": "function", + "name": "box_muller", + "args": [ + { + "name": "x", + "type": null + }, + { + "name": "y", + "type": null + } + ], + "return_type": "r1.astype(np.float32)", + "parent": null + }, + { + "type": "class", + "name": "Generator", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "seed", + "type": null + } + ], + "return_type": null, + "parent": "Generator" + }, + { + "type": "function", + "name": "randn", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "shape", + "type": null + } + ], + "return_type": "box_muller(g[0], g[1]).reshape(shape)", + "parent": "Generator" + } + ], + "parent": null + } + ], + "modules/safe.py": [ + { + "type": "function", + "name": "encode", + "args": [], + "return_type": "out", + "parent": null + }, + { + "type": "class", + "name": "RestrictedUnpickler", + "methods": [ + { + "type": "function", + "name": "persistent_load", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "saved_id", + "type": null + } + ], + "return_type": "TypedStorage(_internal=True)", + "parent": "RestrictedUnpickler" + }, + { + "type": "function", + "name": "find_class", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "module", + "type": null + }, + { + "name": "name", + "type": null + } + ], + "return_type": "getattr(collections, name)", + "parent": "RestrictedUnpickler" + } + ], + "parent": null + }, + { + "type": "function", + "name": "check_zip_filenames", + "args": [ + { + "name": "filename", + "type": null + }, + { + "name": "names", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "check_pt", + "args": [ + { + "name": "filename", + "type": null + }, + { + "name": "extra_handler", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "load", + "args": [ + { + "name": "filename", + "type": null + } + ], + "return_type": "load_with_extra(filename, *args, extra_handler=global_extra_handler, **kwargs)", + "parent": null + }, + { + "type": "function", + "name": "load_with_extra", + "args": [ + { + "name": "filename", + "type": null + }, + { + "name": "extra_handler", + "type": null + } + ], + "return_type": "unsafe_torch_load(filename, *args, **kwargs)", + "parent": null + }, + { + "type": "class", + "name": "Extra", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "handler", + "type": null + } + ], + "return_type": null, + "parent": "Extra" + }, + { + "type": "function", + "name": "__enter__", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "Extra" + }, + { + "type": "function", + "name": "__exit__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "exc_type", + "type": null + }, + { + "name": "exc_val", + "type": null + }, + { + "name": "exc_tb", + "type": null + } + ], + "return_type": null, + "parent": "Extra" + } + ], + "parent": null + } + ], + "modules/script_callbacks.py": [ + { + "type": "function", + "name": "report_exception", + "args": [ + { + "name": "c", + "type": null + }, + { + "name": "job", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "class", + "name": "ImageSaveParams", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "image", + "type": null + }, + { + "name": "p", + "type": null + }, + { + "name": "filename", + "type": null + }, + { + "name": "pnginfo", + "type": null + } + ], + "return_type": null, + "parent": "ImageSaveParams" + } + ], + "parent": null + }, + { + "type": "class", + "name": "ExtraNoiseParams", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "noise", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "xi", + "type": null + } + ], + "return_type": null, + "parent": "ExtraNoiseParams" + } + ], + "parent": null + }, + { + "type": "class", + "name": "CFGDenoiserParams", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "image_cond", + "type": null + }, + { + "name": "sigma", + "type": null + }, + { + "name": "sampling_step", + "type": null + }, + { + "name": "total_sampling_steps", + "type": null + }, + { + "name": "text_cond", + "type": null + }, + { + "name": "text_uncond", + "type": null + } + ], + "return_type": null, + "parent": "CFGDenoiserParams" + } + ], + "parent": null + }, + { + "type": "class", + "name": "CFGDenoisedParams", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "sampling_step", + "type": null + }, + { + "name": "total_sampling_steps", + "type": null + }, + { + "name": "inner_model", + "type": null + } + ], + "return_type": null, + "parent": "CFGDenoisedParams" + } + ], + "parent": null + }, + { + "type": "class", + "name": "AfterCFGCallbackParams", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "sampling_step", + "type": null + }, + { + "name": "total_sampling_steps", + "type": null + } + ], + "return_type": null, + "parent": "AfterCFGCallbackParams" + } + ], + "parent": null + }, + { + "type": "class", + "name": "UiTrainTabParams", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "txt2img_preview_params", + "type": null + } + ], + "return_type": null, + "parent": "UiTrainTabParams" + } + ], + "parent": null + }, + { + "type": "class", + "name": "ImageGridLoopParams", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "imgs", + "type": null + }, + { + "name": "cols", + "type": null + }, + { + "name": "rows", + "type": null + } + ], + "return_type": null, + "parent": "ImageGridLoopParams" + } + ], + "parent": null + }, + { + "type": "function", + "name": "clear_callbacks", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "app_started_callback", + "args": [ + { + "name": "demo", + "type": "Optional[Blocks]" + }, + { + "name": "app", + "type": "FastAPI" + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "app_reload_callback", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "model_loaded_callback", + "args": [ + { + "name": "sd_model", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "ui_tabs_callback", + "args": [], + "return_type": "res", + "parent": null + }, + { + "type": "function", + "name": "ui_train_tabs_callback", + "args": [ + { + "name": "params", + "type": "UiTrainTabParams" + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "ui_settings_callback", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "before_image_saved_callback", + "args": [ + { + "name": "params", + "type": "ImageSaveParams" + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "image_saved_callback", + "args": [ + { + "name": "params", + "type": "ImageSaveParams" + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "extra_noise_callback", + "args": [ + { + "name": "params", + "type": "ExtraNoiseParams" + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "cfg_denoiser_callback", + "args": [ + { + "name": "params", + "type": "CFGDenoiserParams" + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "cfg_denoised_callback", + "args": [ + { + "name": "params", + "type": "CFGDenoisedParams" + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "cfg_after_cfg_callback", + "args": [ + { + "name": "params", + "type": "AfterCFGCallbackParams" + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "before_component_callback", + "args": [ + { + "name": "component", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "after_component_callback", + "args": [ + { + "name": "component", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "image_grid_callback", + "args": [ + { + "name": "params", + "type": "ImageGridLoopParams" + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "infotext_pasted_callback", + "args": [ + { + "name": "infotext", + "type": "str" + }, + { + "name": "params", + "type": "Dict[str, Any]" + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "script_unloaded_callback", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "before_ui_callback", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "list_optimizers_callback", + "args": [], + "return_type": "res", + "parent": null + }, + { + "type": "function", + "name": "list_unets_callback", + "args": [], + "return_type": "res", + "parent": null + }, + { + "type": "function", + "name": "add_callback", + "args": [ + { + "name": "callbacks", + "type": null + }, + { + "name": "fun", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "remove_current_script_callbacks", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "remove_callbacks_for_function", + "args": [ + { + "name": "callback_func", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "on_app_started", + "args": [ + { + "name": "callback", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "on_before_reload", + "args": [ + { + "name": "callback", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "on_model_loaded", + "args": [ + { + "name": "callback", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "on_ui_tabs", + "args": [ + { + "name": "callback", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "on_ui_train_tabs", + "args": [ + { + "name": "callback", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "on_ui_settings", + "args": [ + { + "name": "callback", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "on_before_image_saved", + "args": [ + { + "name": "callback", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "on_image_saved", + "args": [ + { + "name": "callback", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "on_extra_noise", + "args": [ + { + "name": "callback", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "on_cfg_denoiser", + "args": [ + { + "name": "callback", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "on_cfg_denoised", + "args": [ + { + "name": "callback", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "on_cfg_after_cfg", + "args": [ + { + "name": "callback", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "on_before_component", + "args": [ + { + "name": "callback", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "on_after_component", + "args": [ + { + "name": "callback", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "on_image_grid", + "args": [ + { + "name": "callback", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "on_infotext_pasted", + "args": [ + { + "name": "callback", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "on_script_unloaded", + "args": [ + { + "name": "callback", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "on_before_ui", + "args": [ + { + "name": "callback", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "on_list_optimizers", + "args": [ + { + "name": "callback", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "on_list_unets", + "args": [ + { + "name": "callback", + "type": null + } + ], + "return_type": null, + "parent": null + } + ], + "modules/script_loading.py": [ + { + "type": "function", + "name": "load_module", + "args": [ + { + "name": "path", + "type": null + } + ], + "return_type": "module", + "parent": null + }, + { + "type": "function", + "name": "preload_extensions", + "args": [ + { + "name": "extensions_dir", + "type": null + }, + { + "name": "parser", + "type": null + }, + { + "name": "extension_list", + "type": null + } + ], + "return_type": null, + "parent": null + } + ], + "modules/scripts.py": [ + { + "type": "class", + "name": "PostprocessImageArgs", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "image", + "type": null + } + ], + "return_type": null, + "parent": "PostprocessImageArgs" + } + ], + "parent": null + }, + { + "type": "class", + "name": "PostprocessBatchListArgs", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "images", + "type": null + } + ], + "return_type": null, + "parent": "PostprocessBatchListArgs" + } + ], + "parent": null + }, + { + "type": "class", + "name": "OnComponent", + "methods": [], + "parent": null + }, + { + "type": "class", + "name": "Script", + "methods": [ + { + "type": "function", + "name": "title", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "Script" + }, + { + "type": "function", + "name": "ui", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "is_img2img", + "type": null + } + ], + "return_type": null, + "parent": "Script" + }, + { + "type": "function", + "name": "show", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "is_img2img", + "type": null + } + ], + "return_type": "(True)", + "parent": "Script" + }, + { + "type": "function", + "name": "run", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": null + } + ], + "return_type": null, + "parent": "Script" + }, + { + "type": "function", + "name": "setup", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": null + } + ], + "return_type": null, + "parent": "Script" + }, + { + "type": "function", + "name": "before_process", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": null + } + ], + "return_type": null, + "parent": "Script" + }, + { + "type": "function", + "name": "process", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": null + } + ], + "return_type": null, + "parent": "Script" + }, + { + "type": "function", + "name": "before_process_batch", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": null + } + ], + "return_type": null, + "parent": "Script" + }, + { + "type": "function", + "name": "after_extra_networks_activate", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": null + } + ], + "return_type": null, + "parent": "Script" + }, + { + "type": "function", + "name": "process_batch", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": null + } + ], + "return_type": null, + "parent": "Script" + }, + { + "type": "function", + "name": "postprocess_batch", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": null + } + ], + "return_type": null, + "parent": "Script" + }, + { + "type": "function", + "name": "postprocess_batch_list", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": null + }, + { + "name": "pp", + "type": "PostprocessBatchListArgs" + } + ], + "return_type": null, + "parent": "Script" + }, + { + "type": "function", + "name": "postprocess_image", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": null + }, + { + "name": "pp", + "type": "PostprocessImageArgs" + } + ], + "return_type": null, + "parent": "Script" + }, + { + "type": "function", + "name": "postprocess", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": null + }, + { + "name": "processed", + "type": null + } + ], + "return_type": null, + "parent": "Script" + }, + { + "type": "function", + "name": "before_component", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "component", + "type": null + } + ], + "return_type": null, + "parent": "Script" + }, + { + "type": "function", + "name": "after_component", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "component", + "type": null + } + ], + "return_type": null, + "parent": "Script" + }, + { + "type": "function", + "name": "on_before_component", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "callback", + "type": null + } + ], + "return_type": null, + "parent": "Script" + }, + { + "type": "function", + "name": "on_after_component", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "callback", + "type": null + } + ], + "return_type": null, + "parent": "Script" + }, + { + "type": "function", + "name": "describe", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "\"\"\"\"\"\"", + "parent": "Script" + }, + { + "type": "function", + "name": "elem_id", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "item_id", + "type": null + } + ], + "return_type": "f\"\"\"script_{tabname}{title}_{item_id}\"\"\"", + "parent": "Script" + }, + { + "type": "function", + "name": "before_hr", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": null + } + ], + "return_type": null, + "parent": "Script" + } + ], + "parent": null + }, + { + "type": "class", + "name": "ScriptBuiltinUI", + "methods": [ + { + "type": "function", + "name": "elem_id", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "item_id", + "type": null + } + ], + "return_type": "f\"\"\"{tabname}{item_id}\"\"\"", + "parent": "ScriptBuiltinUI" + } + ], + "parent": null + }, + { + "type": "function", + "name": "basedir", + "args": [], + "return_type": "current_basedir", + "parent": null + }, + { + "type": "function", + "name": "list_scripts", + "args": [ + { + "name": "scriptdirname", + "type": null + }, + { + "name": "extension", + "type": null + } + ], + "return_type": "scripts_list", + "parent": null + }, + { + "type": "function", + "name": "list_files_with_name", + "args": [ + { + "name": "filename", + "type": null + } + ], + "return_type": "res", + "parent": null + }, + { + "type": "function", + "name": "load_scripts", + "args": [], + "return_type": "(9999)", + "parent": null + }, + { + "type": "function", + "name": "wrap_call", + "args": [ + { + "name": "func", + "type": null + }, + { + "name": "filename", + "type": null + }, + { + "name": "funcname", + "type": null + } + ], + "return_type": "default", + "parent": null + }, + { + "type": "class", + "name": "ScriptRunner", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "ScriptRunner" + }, + { + "type": "function", + "name": "initialize_scripts", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "is_img2img", + "type": null + } + ], + "return_type": null, + "parent": "ScriptRunner" + }, + { + "type": "function", + "name": "apply_on_before_component_callbacks", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "ScriptRunner" + }, + { + "type": "function", + "name": "create_script_ui", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "script", + "type": null + } + ], + "return_type": null, + "parent": "ScriptRunner" + }, + { + "type": "function", + "name": "setup_ui_for_section", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "section", + "type": null + }, + { + "name": "scriptlist", + "type": null + } + ], + "return_type": null, + "parent": "ScriptRunner" + }, + { + "type": "function", + "name": "prepare_ui", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "ScriptRunner" + }, + { + "type": "function", + "name": "setup_ui", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "self.inputs", + "parent": "ScriptRunner" + }, + { + "type": "function", + "name": "run", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": null + } + ], + "return_type": "processed", + "parent": "ScriptRunner" + }, + { + "type": "function", + "name": "before_process", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": null + } + ], + "return_type": null, + "parent": "ScriptRunner" + }, + { + "type": "function", + "name": "process", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": null + } + ], + "return_type": null, + "parent": "ScriptRunner" + }, + { + "type": "function", + "name": "before_process_batch", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": null + } + ], + "return_type": null, + "parent": "ScriptRunner" + }, + { + "type": "function", + "name": "after_extra_networks_activate", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": null + } + ], + "return_type": null, + "parent": "ScriptRunner" + }, + { + "type": "function", + "name": "process_batch", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": null + } + ], + "return_type": null, + "parent": "ScriptRunner" + }, + { + "type": "function", + "name": "postprocess", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": null + }, + { + "name": "processed", + "type": null + } + ], + "return_type": null, + "parent": "ScriptRunner" + }, + { + "type": "function", + "name": "postprocess_batch", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": null + }, + { + "name": "images", + "type": null + } + ], + "return_type": null, + "parent": "ScriptRunner" + }, + { + "type": "function", + "name": "postprocess_batch_list", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": null + }, + { + "name": "pp", + "type": "PostprocessBatchListArgs" + } + ], + "return_type": null, + "parent": "ScriptRunner" + }, + { + "type": "function", + "name": "postprocess_image", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": null + }, + { + "name": "pp", + "type": "PostprocessImageArgs" + } + ], + "return_type": null, + "parent": "ScriptRunner" + }, + { + "type": "function", + "name": "before_component", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "component", + "type": null + } + ], + "return_type": null, + "parent": "ScriptRunner" + }, + { + "type": "function", + "name": "after_component", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "component", + "type": null + } + ], + "return_type": null, + "parent": "ScriptRunner" + }, + { + "type": "function", + "name": "script", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "title", + "type": null + } + ], + "return_type": "self.title_map.get(title.lower())", + "parent": "ScriptRunner" + }, + { + "type": "function", + "name": "reload_sources", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "cache", + "type": null + } + ], + "return_type": null, + "parent": "ScriptRunner" + }, + { + "type": "function", + "name": "before_hr", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": null + } + ], + "return_type": null, + "parent": "ScriptRunner" + }, + { + "type": "function", + "name": "setup_scrips", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": null + } + ], + "return_type": null, + "parent": "ScriptRunner" + } + ], + "parent": null + }, + { + "type": "function", + "name": "reload_script_body_only", + "args": [], + "return_type": null, + "parent": null + } + ], + "modules/scripts_auto_postprocessing.py": [ + { + "type": "class", + "name": "ScriptPostprocessingForMainUI", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "script_postproc", + "type": null + } + ], + "return_type": null, + "parent": "ScriptPostprocessingForMainUI" + }, + { + "type": "function", + "name": "title", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "self.script.name", + "parent": "ScriptPostprocessingForMainUI" + }, + { + "type": "function", + "name": "show", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "is_img2img", + "type": null + } + ], + "return_type": "scripts.AlwaysVisible", + "parent": "ScriptPostprocessingForMainUI" + }, + { + "type": "function", + "name": "ui", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "is_img2img", + "type": null + } + ], + "return_type": "self.postprocessing_controls.values()", + "parent": "ScriptPostprocessingForMainUI" + }, + { + "type": "function", + "name": "postprocess_image", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": null + }, + { + "name": "script_pp", + "type": null + } + ], + "return_type": null, + "parent": "ScriptPostprocessingForMainUI" + } + ], + "parent": null + }, + { + "type": "function", + "name": "create_auto_preprocessing_script_data", + "args": [], + "return_type": "res", + "parent": null + } + ], + "modules/scripts_postprocessing.py": [ + { + "type": "class", + "name": "PostprocessedImage", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "image", + "type": null + } + ], + "return_type": null, + "parent": "PostprocessedImage" + } + ], + "parent": null + }, + { + "type": "class", + "name": "ScriptPostprocessing", + "methods": [ + { + "type": "function", + "name": "ui", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "ScriptPostprocessing" + }, + { + "type": "function", + "name": "process", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "pp", + "type": "PostprocessedImage" + } + ], + "return_type": null, + "parent": "ScriptPostprocessing" + }, + { + "type": "function", + "name": "image_changed", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "ScriptPostprocessing" + } + ], + "parent": null + }, + { + "type": "function", + "name": "wrap_call", + "args": [ + { + "name": "func", + "type": null + }, + { + "name": "filename", + "type": null + }, + { + "name": "funcname", + "type": null + } + ], + "return_type": "default", + "parent": null + }, + { + "type": "class", + "name": "ScriptPostprocessingRunner", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "ScriptPostprocessingRunner" + }, + { + "type": "function", + "name": "initialize_scripts", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "scripts_data", + "type": null + } + ], + "return_type": null, + "parent": "ScriptPostprocessingRunner" + }, + { + "type": "function", + "name": "create_script_ui", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "script", + "type": null + }, + { + "name": "inputs", + "type": null + } + ], + "return_type": null, + "parent": "ScriptPostprocessingRunner" + }, + { + "type": "function", + "name": "scripts_in_preferred_order", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "sorted(self.scripts, key=lambda x: script_scores[x.name])", + "parent": "ScriptPostprocessingRunner" + }, + { + "type": "function", + "name": "setup_ui", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "inputs", + "parent": "ScriptPostprocessingRunner" + }, + { + "type": "function", + "name": "run", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "pp", + "type": "PostprocessedImage" + }, + { + "name": "args", + "type": null + } + ], + "return_type": null, + "parent": "ScriptPostprocessingRunner" + }, + { + "type": "function", + "name": "create_args_for_run", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "scripts_args", + "type": null + } + ], + "return_type": "args", + "parent": "ScriptPostprocessingRunner" + }, + { + "type": "function", + "name": "image_changed", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "ScriptPostprocessingRunner" + } + ], + "parent": null + } + ], + "modules/sd_disable_initialization.py": [ + { + "type": "class", + "name": "ReplaceHelper", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "ReplaceHelper" + }, + { + "type": "function", + "name": "replace", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "obj", + "type": null + }, + { + "name": "field", + "type": null + }, + { + "name": "func", + "type": null + } + ], + "return_type": "original", + "parent": "ReplaceHelper" + }, + { + "type": "function", + "name": "restore", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "ReplaceHelper" + } + ], + "parent": null + }, + { + "type": "class", + "name": "DisableInitialization", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "disable_clip", + "type": null + } + ], + "return_type": null, + "parent": "DisableInitialization" + }, + { + "type": "function", + "name": "replace", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "obj", + "type": null + }, + { + "name": "field", + "type": null + }, + { + "name": "func", + "type": null + } + ], + "return_type": "original", + "parent": "DisableInitialization" + }, + { + "type": "function", + "name": "__enter__", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "self.create_model_and_transforms(*args, pretrained=None, **kwargs)", + "parent": "DisableInitialization" + }, + { + "type": "function", + "name": "__exit__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "exc_type", + "type": null + }, + { + "name": "exc_val", + "type": null + }, + { + "name": "exc_tb", + "type": null + } + ], + "return_type": null, + "parent": "DisableInitialization" + } + ], + "parent": null + }, + { + "type": "class", + "name": "InitializeOnMeta", + "methods": [ + { + "type": "function", + "name": "__enter__", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "x", + "parent": "InitializeOnMeta" + }, + { + "type": "function", + "name": "__exit__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "exc_type", + "type": null + }, + { + "name": "exc_val", + "type": null + }, + { + "name": "exc_tb", + "type": null + } + ], + "return_type": null, + "parent": "InitializeOnMeta" + } + ], + "parent": null + }, + { + "type": "class", + "name": "LoadStateDictOnMeta", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "state_dict", + "type": null + }, + { + "name": "device", + "type": null + }, + { + "name": "weight_dtype_conversion", + "type": null + } + ], + "return_type": null, + "parent": "LoadStateDictOnMeta" + }, + { + "type": "function", + "name": "get_weight_dtype", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "key", + "type": null + } + ], + "return_type": "self.weight_dtype_conversion.get(key_first_term, self.default_dtype)", + "parent": "LoadStateDictOnMeta" + }, + { + "type": "function", + "name": "__enter__", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "LoadStateDictOnMeta" + }, + { + "type": "function", + "name": "__exit__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "exc_type", + "type": null + }, + { + "name": "exc_val", + "type": null + }, + { + "name": "exc_tb", + "type": null + } + ], + "return_type": null, + "parent": "LoadStateDictOnMeta" + } + ], + "parent": null + } + ], + "modules/sd_hijack.py": [ + { + "type": "function", + "name": "list_optimizers", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "apply_optimizations", + "args": [ + { + "name": "option", + "type": null + } + ], + "return_type": "\"\"\"\"\"\"", + "parent": null + }, + { + "type": "function", + "name": "undo_optimizations", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "fix_checkpoint", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "weighted_loss", + "args": [ + { + "name": "sd_model", + "type": null + }, + { + "name": "pred", + "type": null + }, + { + "name": "target", + "type": null + }, + { + "name": "mean", + "type": null + } + ], + "return_type": "(loss.mean() if mean else loss)", + "parent": null + }, + { + "type": "function", + "name": "weighted_forward", + "args": [ + { + "name": "sd_model", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "c", + "type": null + }, + { + "name": "w", + "type": null + } + ], + "return_type": "sd_model.forward(x, c, *args, **kwargs)", + "parent": null + }, + { + "type": "function", + "name": "apply_weighted_forward", + "args": [ + { + "name": "sd_model", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "undo_weighted_forward", + "args": [ + { + "name": "sd_model", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "class", + "name": "StableDiffusionModelHijack", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "StableDiffusionModelHijack" + }, + { + "type": "function", + "name": "apply_optimizations", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "option", + "type": null + } + ], + "return_type": null, + "parent": "StableDiffusionModelHijack" + }, + { + "type": "function", + "name": "hijack", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "m", + "type": null + } + ], + "return_type": "res", + "parent": "StableDiffusionModelHijack" + }, + { + "type": "function", + "name": "undo_hijack", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "m", + "type": null + } + ], + "return_type": null, + "parent": "StableDiffusionModelHijack" + }, + { + "type": "function", + "name": "apply_circular", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "enable", + "type": null + } + ], + "return_type": null, + "parent": "StableDiffusionModelHijack" + }, + { + "type": "function", + "name": "clear_comments", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "StableDiffusionModelHijack" + }, + { + "type": "function", + "name": "get_prompt_lengths", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "text", + "type": null + } + ], + "return_type": "(token_count, self.clip.get_target_prompt_token_count(token_count))", + "parent": "StableDiffusionModelHijack" + }, + { + "type": "function", + "name": "redo_hijack", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "m", + "type": null + } + ], + "return_type": null, + "parent": "StableDiffusionModelHijack" + } + ], + "parent": null + }, + { + "type": "class", + "name": "EmbeddingsWithFixes", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "wrapped", + "type": null + }, + { + "name": "embeddings", + "type": null + }, + { + "name": "textual_inversion_key", + "type": null + } + ], + "return_type": null, + "parent": "EmbeddingsWithFixes" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "input_ids", + "type": null + } + ], + "return_type": "torch.stack(vecs)", + "parent": "EmbeddingsWithFixes" + } + ], + "parent": null + }, + { + "type": "function", + "name": "add_circular_option_to_conv_2d", + "args": [], + "return_type": "conv2d_constructor(self, *args, padding_mode='circular', **kwargs)", + "parent": null + }, + { + "type": "function", + "name": "register_buffer", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "name", + "type": null + }, + { + "name": "attr", + "type": null + } + ], + "return_type": null, + "parent": null + } + ], + "modules/sd_hijack_checkpoint.py": [ + { + "type": "function", + "name": "BasicTransformerBlock_forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "context", + "type": null + } + ], + "return_type": "checkpoint(self._forward, x, context)", + "parent": null + }, + { + "type": "function", + "name": "AttentionBlock_forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "checkpoint(self._forward, x)", + "parent": null + }, + { + "type": "function", + "name": "ResBlock_forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "emb", + "type": null + } + ], + "return_type": "checkpoint(self._forward, x, emb)", + "parent": null + }, + { + "type": "function", + "name": "add", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "remove", + "args": [], + "return_type": null, + "parent": null + } + ], + "modules/sd_hijack_clip.py": [ + { + "type": "class", + "name": "PromptChunk", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "PromptChunk" + } + ], + "parent": null + }, + { + "type": "class", + "name": "FrozenCLIPEmbedderWithCustomWordsBase", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "wrapped", + "type": null + }, + { + "name": "hijack", + "type": null + } + ], + "return_type": null, + "parent": "FrozenCLIPEmbedderWithCustomWordsBase" + }, + { + "type": "function", + "name": "empty_chunk", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "chunk", + "parent": "FrozenCLIPEmbedderWithCustomWordsBase" + }, + { + "type": "function", + "name": "get_target_prompt_token_count", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "token_count", + "type": null + } + ], + "return_type": "(math.ceil(max(token_count, 1) / self.chunk_length) * self.chunk_length)", + "parent": "FrozenCLIPEmbedderWithCustomWordsBase" + }, + { + "type": "function", + "name": "tokenize", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "texts", + "type": null + } + ], + "return_type": null, + "parent": "FrozenCLIPEmbedderWithCustomWordsBase" + }, + { + "type": "function", + "name": "encode_with_transformers", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "tokens", + "type": null + } + ], + "return_type": null, + "parent": "FrozenCLIPEmbedderWithCustomWordsBase" + }, + { + "type": "function", + "name": "encode_embedding_init_text", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "init_text", + "type": null + }, + { + "name": "nvpt", + "type": null + } + ], + "return_type": null, + "parent": "FrozenCLIPEmbedderWithCustomWordsBase" + }, + { + "type": "function", + "name": "tokenize_line", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "line", + "type": null + } + ], + "return_type": "(chunks, token_count)", + "parent": "FrozenCLIPEmbedderWithCustomWordsBase" + }, + { + "type": "function", + "name": "process_texts", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "texts", + "type": null + } + ], + "return_type": "(batch_chunks, token_count)", + "parent": "FrozenCLIPEmbedderWithCustomWordsBase" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "texts", + "type": null + } + ], + "return_type": "modules.sd_hijack_clip_old.forward_old(self, texts)", + "parent": "FrozenCLIPEmbedderWithCustomWordsBase" + }, + { + "type": "function", + "name": "process_tokens", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "remade_batch_tokens", + "type": null + }, + { + "name": "batch_multipliers", + "type": null + } + ], + "return_type": "z", + "parent": "FrozenCLIPEmbedderWithCustomWordsBase" + } + ], + "parent": null + }, + { + "type": "class", + "name": "FrozenCLIPEmbedderWithCustomWords", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "wrapped", + "type": null + }, + { + "name": "hijack", + "type": null + } + ], + "return_type": null, + "parent": "FrozenCLIPEmbedderWithCustomWords" + }, + { + "type": "function", + "name": "tokenize", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "texts", + "type": null + } + ], + "return_type": "tokenized", + "parent": "FrozenCLIPEmbedderWithCustomWords" + }, + { + "type": "function", + "name": "encode_with_transformers", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "tokens", + "type": null + } + ], + "return_type": "z", + "parent": "FrozenCLIPEmbedderWithCustomWords" + }, + { + "type": "function", + "name": "encode_embedding_init_text", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "init_text", + "type": null + }, + { + "name": "nvpt", + "type": null + } + ], + "return_type": "embedded", + "parent": "FrozenCLIPEmbedderWithCustomWords" + } + ], + "parent": null + }, + { + "type": "class", + "name": "FrozenCLIPEmbedderForSDXLWithCustomWords", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "wrapped", + "type": null + }, + { + "name": "hijack", + "type": null + } + ], + "return_type": null, + "parent": "FrozenCLIPEmbedderForSDXLWithCustomWords" + }, + { + "type": "function", + "name": "encode_with_transformers", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "tokens", + "type": null + } + ], + "return_type": "z", + "parent": "FrozenCLIPEmbedderForSDXLWithCustomWords" + } + ], + "parent": null + } + ], + "modules/sd_hijack_clip_old.py": [ + { + "type": "function", + "name": "process_text_old", + "args": [ + { + "name": "self", + "type": "sd_hijack_clip.FrozenCLIPEmbedderWithCustomWordsBase" + }, + { + "name": "texts", + "type": null + } + ], + "return_type": "(batch_multipliers, remade_batch_tokens, used_custom_terms, hijack_comments,\n hijack_fixes, token_count)", + "parent": null + }, + { + "type": "function", + "name": "forward_old", + "args": [ + { + "name": "self", + "type": "sd_hijack_clip.FrozenCLIPEmbedderWithCustomWordsBase" + }, + { + "name": "texts", + "type": null + } + ], + "return_type": "self.process_tokens(remade_batch_tokens, batch_multipliers)", + "parent": null + } + ], + "modules/sd_hijack_ip2p.py": [ + { + "type": "function", + "name": "should_hijack_ip2p", + "args": [ + { + "name": "checkpoint_info", + "type": null + } + ], + "return_type": "('pix2pix' in ckpt_basename and 'pix2pix' not in cfg_basename)", + "parent": null + } + ], + "modules/sd_hijack_open_clip.py": [ + { + "type": "class", + "name": "FrozenOpenCLIPEmbedderWithCustomWords", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "wrapped", + "type": null + }, + { + "name": "hijack", + "type": null + } + ], + "return_type": null, + "parent": "FrozenOpenCLIPEmbedderWithCustomWords" + }, + { + "type": "function", + "name": "tokenize", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "texts", + "type": null + } + ], + "return_type": "tokenized", + "parent": "FrozenOpenCLIPEmbedderWithCustomWords" + }, + { + "type": "function", + "name": "encode_with_transformers", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "tokens", + "type": null + } + ], + "return_type": "z", + "parent": "FrozenOpenCLIPEmbedderWithCustomWords" + }, + { + "type": "function", + "name": "encode_embedding_init_text", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "init_text", + "type": null + }, + { + "name": "nvpt", + "type": null + } + ], + "return_type": "embedded", + "parent": "FrozenOpenCLIPEmbedderWithCustomWords" + } + ], + "parent": null + }, + { + "type": "class", + "name": "FrozenOpenCLIPEmbedder2WithCustomWords", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "wrapped", + "type": null + }, + { + "name": "hijack", + "type": null + } + ], + "return_type": null, + "parent": "FrozenOpenCLIPEmbedder2WithCustomWords" + }, + { + "type": "function", + "name": "tokenize", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "texts", + "type": null + } + ], + "return_type": "tokenized", + "parent": "FrozenOpenCLIPEmbedder2WithCustomWords" + }, + { + "type": "function", + "name": "encode_with_transformers", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "tokens", + "type": null + } + ], + "return_type": "z", + "parent": "FrozenOpenCLIPEmbedder2WithCustomWords" + }, + { + "type": "function", + "name": "encode_embedding_init_text", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "init_text", + "type": null + }, + { + "name": "nvpt", + "type": null + } + ], + "return_type": "embedded", + "parent": "FrozenOpenCLIPEmbedder2WithCustomWords" + } + ], + "parent": null + } + ], + "modules/sd_hijack_optimizations.py": [ + { + "type": "class", + "name": "SdOptimization", + "methods": [ + { + "type": "function", + "name": "title", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "f\"\"\"{self.name} - {self.label}\"\"\"", + "parent": "SdOptimization" + }, + { + "type": "function", + "name": "is_available", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "(True)", + "parent": "SdOptimization" + }, + { + "type": "function", + "name": "apply", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "SdOptimization" + }, + { + "type": "function", + "name": "undo", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "SdOptimization" + } + ], + "parent": null + }, + { + "type": "class", + "name": "SdOptimizationXformers", + "methods": [ + { + "type": "function", + "name": "is_available", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "(shared.cmd_opts.force_enable_xformers or shared.xformers_available and\n torch.cuda.is_available() and (6, 0) <= torch.cuda.\n get_device_capability(shared.device) <= (9, 0))", + "parent": "SdOptimizationXformers" + }, + { + "type": "function", + "name": "apply", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "SdOptimizationXformers" + } + ], + "parent": null + }, + { + "type": "class", + "name": "SdOptimizationSdpNoMem", + "methods": [ + { + "type": "function", + "name": "is_available", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "(hasattr(torch.nn.functional, 'scaled_dot_product_attention') and callable(\n torch.nn.functional.scaled_dot_product_attention))", + "parent": "SdOptimizationSdpNoMem" + }, + { + "type": "function", + "name": "apply", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "SdOptimizationSdpNoMem" + } + ], + "parent": null + }, + { + "type": "class", + "name": "SdOptimizationSdp", + "methods": [ + { + "type": "function", + "name": "apply", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "SdOptimizationSdp" + } + ], + "parent": null + }, + { + "type": "class", + "name": "SdOptimizationSubQuad", + "methods": [ + { + "type": "function", + "name": "priority", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "(1000 if shared.device.type == 'mps' else 10)", + "parent": "SdOptimizationSubQuad" + }, + { + "type": "function", + "name": "apply", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "SdOptimizationSubQuad" + } + ], + "parent": null + }, + { + "type": "class", + "name": "SdOptimizationV1", + "methods": [ + { + "type": "function", + "name": "apply", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "SdOptimizationV1" + } + ], + "parent": null + }, + { + "type": "class", + "name": "SdOptimizationInvokeAI", + "methods": [ + { + "type": "function", + "name": "priority", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "(1000 if shared.device.type != 'mps' and not torch.cuda.is_available() else 10)", + "parent": "SdOptimizationInvokeAI" + }, + { + "type": "function", + "name": "apply", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "SdOptimizationInvokeAI" + } + ], + "parent": null + }, + { + "type": "class", + "name": "SdOptimizationDoggettx", + "methods": [ + { + "type": "function", + "name": "apply", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "SdOptimizationDoggettx" + } + ], + "parent": null + }, + { + "type": "function", + "name": "list_optimizers", + "args": [ + { + "name": "res", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "get_available_vram", + "args": [], + "return_type": "mem_free_total", + "parent": null + }, + { + "type": "function", + "name": "split_cross_attention_forward_v1", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "context", + "type": null + }, + { + "name": "mask", + "type": null + } + ], + "return_type": "self.to_out(r2)", + "parent": null + }, + { + "type": "function", + "name": "split_cross_attention_forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "context", + "type": null + }, + { + "name": "mask", + "type": null + } + ], + "return_type": "self.to_out(r2)", + "parent": null + }, + { + "type": "function", + "name": "einsum_op_compvis", + "args": [ + { + "name": "q", + "type": null + }, + { + "name": "k", + "type": null + }, + { + "name": "v", + "type": null + } + ], + "return_type": "einsum('b i j, b j d -> b i d', s, v)", + "parent": null + }, + { + "type": "function", + "name": "einsum_op_slice_0", + "args": [ + { + "name": "q", + "type": null + }, + { + "name": "k", + "type": null + }, + { + "name": "v", + "type": null + }, + { + "name": "slice_size", + "type": null + } + ], + "return_type": "r", + "parent": null + }, + { + "type": "function", + "name": "einsum_op_slice_1", + "args": [ + { + "name": "q", + "type": null + }, + { + "name": "k", + "type": null + }, + { + "name": "v", + "type": null + }, + { + "name": "slice_size", + "type": null + } + ], + "return_type": "r", + "parent": null + }, + { + "type": "function", + "name": "einsum_op_mps_v1", + "args": [ + { + "name": "q", + "type": null + }, + { + "name": "k", + "type": null + }, + { + "name": "v", + "type": null + } + ], + "return_type": "einsum_op_compvis(q, k, v)", + "parent": null + }, + { + "type": "function", + "name": "einsum_op_mps_v2", + "args": [ + { + "name": "q", + "type": null + }, + { + "name": "k", + "type": null + }, + { + "name": "v", + "type": null + } + ], + "return_type": "einsum_op_compvis(q, k, v)", + "parent": null + }, + { + "type": "function", + "name": "einsum_op_tensor_mem", + "args": [ + { + "name": "q", + "type": null + }, + { + "name": "k", + "type": null + }, + { + "name": "v", + "type": null + }, + { + "name": "max_tensor_mb", + "type": null + } + ], + "return_type": "einsum_op_slice_1(q, k, v, max(q.shape[1] // div, 1))", + "parent": null + }, + { + "type": "function", + "name": "einsum_op_cuda", + "args": [ + { + "name": "q", + "type": null + }, + { + "name": "k", + "type": null + }, + { + "name": "v", + "type": null + } + ], + "return_type": "einsum_op_tensor_mem(q, k, v, mem_free_total / 3.3 / (1 << 20))", + "parent": null + }, + { + "type": "function", + "name": "einsum_op", + "args": [ + { + "name": "q", + "type": null + }, + { + "name": "k", + "type": null + }, + { + "name": "v", + "type": null + } + ], + "return_type": "einsum_op_tensor_mem(q, k, v, 32)", + "parent": null + }, + { + "type": "function", + "name": "split_cross_attention_forward_invokeAI", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "context", + "type": null + }, + { + "name": "mask", + "type": null + } + ], + "return_type": "self.to_out(rearrange(r, '(b h) n d -> b n (h d)', h=h))", + "parent": null + }, + { + "type": "function", + "name": "sub_quad_attention_forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "context", + "type": null + }, + { + "name": "mask", + "type": null + } + ], + "return_type": "x", + "parent": null + }, + { + "type": "function", + "name": "sub_quad_attention", + "args": [ + { + "name": "q", + "type": null + }, + { + "name": "k", + "type": null + }, + { + "name": "v", + "type": null + }, + { + "name": "q_chunk_size", + "type": null + }, + { + "name": "kv_chunk_size", + "type": null + }, + { + "name": "kv_chunk_size_min", + "type": null + }, + { + "name": "chunk_threshold", + "type": null + }, + { + "name": "use_checkpoint", + "type": null + } + ], + "return_type": "sub_quadratic_attention.efficient_dot_product_attention(q, k, v,\n query_chunk_size=q_chunk_size, kv_chunk_size=kv_chunk_size,\n kv_chunk_size_min=kv_chunk_size_min, use_checkpoint=use_checkpoint)", + "parent": null + }, + { + "type": "function", + "name": "get_xformers_flash_attention_op", + "args": [ + { + "name": "q", + "type": null + }, + { + "name": "k", + "type": null + }, + { + "name": "v", + "type": null + } + ], + "return_type": "None", + "parent": null + }, + { + "type": "function", + "name": "xformers_attention_forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "context", + "type": null + }, + { + "name": "mask", + "type": null + } + ], + "return_type": "self.to_out(out)", + "parent": null + }, + { + "type": "function", + "name": "scaled_dot_product_attention_forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "context", + "type": null + }, + { + "name": "mask", + "type": null + } + ], + "return_type": "hidden_states", + "parent": null + }, + { + "type": "function", + "name": "scaled_dot_product_no_mem_attention_forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "context", + "type": null + }, + { + "name": "mask", + "type": null + } + ], + "return_type": "scaled_dot_product_attention_forward(self, x, context, mask)", + "parent": null + }, + { + "type": "function", + "name": "cross_attention_attnblock_forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "h3", + "parent": null + }, + { + "type": "function", + "name": "xformers_attnblock_forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "(x + out)", + "parent": null + }, + { + "type": "function", + "name": "sdp_attnblock_forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "(x + out)", + "parent": null + }, + { + "type": "function", + "name": "sdp_no_mem_attnblock_forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "sdp_attnblock_forward(self, x)", + "parent": null + }, + { + "type": "function", + "name": "sub_quad_attnblock_forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "(x + out)", + "parent": null + } + ], + "modules/sd_hijack_unet.py": [ + { + "type": "class", + "name": "TorchHijackForUnet", + "methods": [ + { + "type": "function", + "name": "__getattr__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "item", + "type": null + } + ], + "return_type": "self.cat", + "parent": "TorchHijackForUnet" + }, + { + "type": "function", + "name": "cat", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "tensors", + "type": null + } + ], + "return_type": "torch.cat(tensors, *args, **kwargs)", + "parent": "TorchHijackForUnet" + } + ], + "parent": null + }, + { + "type": "function", + "name": "apply_model", + "args": [ + { + "name": "orig_func", + "type": null + }, + { + "name": "self", + "type": null + }, + { + "name": "x_noisy", + "type": null + }, + { + "name": "t", + "type": null + }, + { + "name": "cond", + "type": null + } + ], + "return_type": "orig_func(self, x_noisy.to(devices.dtype_unet), t.to(devices.dtype_unet),\n cond, **kwargs).float()", + "parent": null + }, + { + "type": "class", + "name": "GELUHijack", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "GELUHijack" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "torch.nn.GELU.forward(self.float(), x.float()).to(devices.dtype_unet)", + "parent": "GELUHijack" + } + ], + "parent": null + }, + { + "type": "function", + "name": "hijack_ddpm_edit", + "args": [], + "return_type": null, + "parent": null + } + ], + "modules/sd_hijack_utils.py": [ + { + "type": "class", + "name": "CondFunc", + "methods": [ + { + "type": "function", + "name": "__new__", + "args": [ + { + "name": "cls", + "type": null + }, + { + "name": "orig_func", + "type": null + }, + { + "name": "sub_func", + "type": null + }, + { + "name": "cond_func", + "type": null + } + ], + "return_type": "(lambda *args, **kwargs: self(*args, **kwargs))", + "parent": "CondFunc" + }, + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "orig_func", + "type": null + }, + { + "name": "sub_func", + "type": null + }, + { + "name": "cond_func", + "type": null + } + ], + "return_type": null, + "parent": "CondFunc" + }, + { + "type": "function", + "name": "__call__", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "self.__sub_func(self.__orig_func, *args, **kwargs)", + "parent": "CondFunc" + } + ], + "parent": null + } + ], + "modules/sd_hijack_xlmr.py": [ + { + "type": "class", + "name": "FrozenXLMREmbedderWithCustomWords", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "wrapped", + "type": null + }, + { + "name": "hijack", + "type": null + } + ], + "return_type": null, + "parent": "FrozenXLMREmbedderWithCustomWords" + }, + { + "type": "function", + "name": "encode_with_transformers", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "tokens", + "type": null + } + ], + "return_type": "z", + "parent": "FrozenXLMREmbedderWithCustomWords" + }, + { + "type": "function", + "name": "encode_embedding_init_text", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "init_text", + "type": null + }, + { + "name": "nvpt", + "type": null + } + ], + "return_type": "embedded", + "parent": "FrozenXLMREmbedderWithCustomWords" + } + ], + "parent": null + } + ], + "modules/sd_models.py": [ + { + "type": "function", + "name": "replace_key", + "args": [ + { + "name": "d", + "type": null + }, + { + "name": "key", + "type": null + }, + { + "name": "new_key", + "type": null + }, + { + "name": "value", + "type": null + } + ], + "return_type": "d", + "parent": null + }, + { + "type": "class", + "name": "CheckpointInfo", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "filename", + "type": null + } + ], + "return_type": "metadata", + "parent": "CheckpointInfo" + }, + { + "type": "function", + "name": "register", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "CheckpointInfo" + }, + { + "type": "function", + "name": "calculate_shorthash", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "self.shorthash", + "parent": "CheckpointInfo" + } + ], + "parent": null + }, + { + "type": "function", + "name": "setup_model", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "checkpoint_tiles", + "args": [ + { + "name": "use_short", + "type": null + } + ], + "return_type": "[(x.short_title if use_short else x.title) for x in checkpoints_list.values()]", + "parent": null + }, + { + "type": "function", + "name": "list_models", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "get_closet_checkpoint_match", + "args": [ + { + "name": "search_string", + "type": null + } + ], + "return_type": "None", + "parent": null + }, + { + "type": "function", + "name": "model_hash", + "args": [ + { + "name": "filename", + "type": null + } + ], + "return_type": "m.hexdigest()[0:8]", + "parent": null + }, + { + "type": "function", + "name": "select_checkpoint", + "args": [], + "return_type": "checkpoint_info", + "parent": null + }, + { + "type": "function", + "name": "transform_checkpoint_dict_key", + "args": [ + { + "name": "k", + "type": null + } + ], + "return_type": "k", + "parent": null + }, + { + "type": "function", + "name": "get_state_dict_from_checkpoint", + "args": [ + { + "name": "pl_sd", + "type": null + } + ], + "return_type": "pl_sd", + "parent": null + }, + { + "type": "function", + "name": "read_metadata_from_safetensors", + "args": [ + { + "name": "filename", + "type": null + } + ], + "return_type": "res", + "parent": null + }, + { + "type": "function", + "name": "read_state_dict", + "args": [ + { + "name": "checkpoint_file", + "type": null + }, + { + "name": "print_global_state", + "type": null + }, + { + "name": "map_location", + "type": null + } + ], + "return_type": "sd", + "parent": null + }, + { + "type": "function", + "name": "get_checkpoint_state_dict", + "args": [ + { + "name": "checkpoint_info", + "type": "CheckpointInfo" + }, + { + "name": "timer", + "type": null + } + ], + "return_type": "res", + "parent": null + }, + { + "type": "class", + "name": "SkipWritingToConfig", + "methods": [ + { + "type": "function", + "name": "__enter__", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "self", + "parent": "SkipWritingToConfig" + }, + { + "type": "function", + "name": "__exit__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "exc_type", + "type": null + }, + { + "name": "exc_value", + "type": null + }, + { + "name": "exc_traceback", + "type": null + } + ], + "return_type": null, + "parent": "SkipWritingToConfig" + } + ], + "parent": null + }, + { + "type": "function", + "name": "load_model_weights", + "args": [ + { + "name": "model", + "type": null + }, + { + "name": "checkpoint_info", + "type": "CheckpointInfo" + }, + { + "name": "state_dict", + "type": null + }, + { + "name": "timer", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "enable_midas_autodownload", + "args": [], + "return_type": "midas.api.load_model_inner(model_type)", + "parent": null + }, + { + "type": "function", + "name": "repair_config", + "args": [ + { + "name": "sd_config", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "class", + "name": "SdModelData", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "SdModelData" + }, + { + "type": "function", + "name": "get_sd_model", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "self.sd_model", + "parent": "SdModelData" + }, + { + "type": "function", + "name": "set_sd_model", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "v", + "type": null + }, + { + "name": "already_loaded", + "type": null + } + ], + "return_type": null, + "parent": "SdModelData" + } + ], + "parent": null + }, + { + "type": "function", + "name": "get_empty_cond", + "args": [ + { + "name": "sd_model", + "type": null + } + ], + "return_type": "d['crossattn']", + "parent": null + }, + { + "type": "function", + "name": "send_model_to_cpu", + "args": [ + { + "name": "m", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "model_target_device", + "args": [ + { + "name": "m", + "type": null + } + ], + "return_type": "devices.cpu", + "parent": null + }, + { + "type": "function", + "name": "send_model_to_device", + "args": [ + { + "name": "m", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "send_model_to_trash", + "args": [ + { + "name": "m", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "load_model", + "args": [ + { + "name": "checkpoint_info", + "type": null + }, + { + "name": "already_loaded_state_dict", + "type": null + } + ], + "return_type": "sd_model", + "parent": null + }, + { + "type": "function", + "name": "reuse_model_from_already_loaded", + "args": [ + { + "name": "sd_model", + "type": null + }, + { + "name": "checkpoint_info", + "type": null + }, + { + "name": "timer", + "type": null + } + ], + "return_type": "model_data.sd_model", + "parent": null + }, + { + "type": "function", + "name": "reload_model_weights", + "args": [ + { + "name": "sd_model", + "type": null + }, + { + "name": "info", + "type": null + } + ], + "return_type": "sd_model", + "parent": null + }, + { + "type": "function", + "name": "unload_model_weights", + "args": [ + { + "name": "sd_model", + "type": null + }, + { + "name": "info", + "type": null + } + ], + "return_type": "sd_model", + "parent": null + }, + { + "type": "function", + "name": "apply_token_merging", + "args": [ + { + "name": "sd_model", + "type": null + }, + { + "name": "token_merging_ratio", + "type": null + } + ], + "return_type": null, + "parent": null + } + ], + "modules/sd_models_config.py": [ + { + "type": "function", + "name": "is_using_v_parameterization_for_sd2", + "args": [ + { + "name": "state_dict", + "type": null + } + ], + "return_type": "(out < -1)", + "parent": null + }, + { + "type": "function", + "name": "guess_model_config_from_state_dict", + "args": [ + { + "name": "sd", + "type": null + }, + { + "name": "filename", + "type": null + } + ], + "return_type": "config_default", + "parent": null + }, + { + "type": "function", + "name": "find_checkpoint_config", + "args": [ + { + "name": "state_dict", + "type": null + }, + { + "name": "info", + "type": null + } + ], + "return_type": "guess_model_config_from_state_dict(state_dict, info.filename)", + "parent": null + }, + { + "type": "function", + "name": "find_checkpoint_config_near_filename", + "args": [ + { + "name": "info", + "type": null + } + ], + "return_type": "None", + "parent": null + } + ], + "modules/sd_models_types.py": [ + { + "type": "class", + "name": "WebuiSdModel", + "methods": [], + "parent": null + } + ], + "modules/sd_models_xl.py": [ + { + "type": "function", + "name": "get_learned_conditioning", + "args": [ + { + "name": "self", + "type": "sgm.models.diffusion.DiffusionEngine" + }, + { + "name": "batch", + "type": "(prompt_parser.SdConditioning | list[str])" + } + ], + "return_type": "c", + "parent": null + }, + { + "type": "function", + "name": "apply_model", + "args": [ + { + "name": "self", + "type": "sgm.models.diffusion.DiffusionEngine" + }, + { + "name": "x", + "type": null + }, + { + "name": "t", + "type": null + }, + { + "name": "cond", + "type": null + } + ], + "return_type": "self.model(x, t, cond)", + "parent": null + }, + { + "type": "function", + "name": "get_first_stage_encoding", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "x", + "parent": null + }, + { + "type": "function", + "name": "encode_embedding_init_text", + "args": [ + { + "name": "self", + "type": "sgm.modules.GeneralConditioner" + }, + { + "name": "init_text", + "type": null + }, + { + "name": "nvpt", + "type": null + } + ], + "return_type": "torch.cat(res, dim=1)", + "parent": null + }, + { + "type": "function", + "name": "tokenize", + "args": [ + { + "name": "self", + "type": "sgm.modules.GeneralConditioner" + }, + { + "name": "texts", + "type": null + } + ], + "return_type": "embedder.tokenize(texts)", + "parent": null + }, + { + "type": "function", + "name": "process_texts", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "texts", + "type": null + } + ], + "return_type": "embedder.process_texts(texts)", + "parent": null + }, + { + "type": "function", + "name": "get_target_prompt_token_count", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "token_count", + "type": null + } + ], + "return_type": "embedder.get_target_prompt_token_count(token_count)", + "parent": null + }, + { + "type": "function", + "name": "extend_sdxl", + "args": [ + { + "name": "model", + "type": null + } + ], + "return_type": null, + "parent": null + } + ], + "modules/sd_samplers.py": [ + { + "type": "function", + "name": "find_sampler_config", + "args": [ + { + "name": "name", + "type": null + } + ], + "return_type": "config", + "parent": null + }, + { + "type": "function", + "name": "create_sampler", + "args": [ + { + "name": "name", + "type": null + }, + { + "name": "model", + "type": null + } + ], + "return_type": "sampler", + "parent": null + }, + { + "type": "function", + "name": "set_samplers", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "visible_sampler_names", + "args": [], + "return_type": "[x.name for x in samplers if x.name not in samplers_hidden]", + "parent": null + } + ], + "modules/sd_samplers_cfg_denoiser.py": [ + { + "type": "function", + "name": "catenate_conds", + "args": [ + { + "name": "conds", + "type": null + } + ], + "return_type": "{key: torch.cat([x[key] for x in conds]) for key in conds[0].keys()}", + "parent": null + }, + { + "type": "function", + "name": "subscript_cond", + "args": [ + { + "name": "cond", + "type": null + }, + { + "name": "a", + "type": null + }, + { + "name": "b", + "type": null + } + ], + "return_type": "{key: vec[a:b] for key, vec in cond.items()}", + "parent": null + }, + { + "type": "function", + "name": "pad_cond", + "args": [ + { + "name": "tensor", + "type": null + }, + { + "name": "repeats", + "type": null + }, + { + "name": "empty", + "type": null + } + ], + "return_type": "tensor", + "parent": null + }, + { + "type": "class", + "name": "CFGDenoiser", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "sampler", + "type": null + } + ], + "return_type": null, + "parent": "CFGDenoiser" + }, + { + "type": "function", + "name": "inner_model", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "CFGDenoiser" + }, + { + "type": "function", + "name": "combine_denoised", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x_out", + "type": null + }, + { + "name": "conds_list", + "type": null + }, + { + "name": "uncond", + "type": null + }, + { + "name": "cond_scale", + "type": null + } + ], + "return_type": "denoised", + "parent": "CFGDenoiser" + }, + { + "type": "function", + "name": "combine_denoised_for_edit_model", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x_out", + "type": null + }, + { + "name": "cond_scale", + "type": null + } + ], + "return_type": "denoised", + "parent": "CFGDenoiser" + }, + { + "type": "function", + "name": "get_pred_x0", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x_in", + "type": null + }, + { + "name": "x_out", + "type": null + }, + { + "name": "sigma", + "type": null + } + ], + "return_type": "x_out", + "parent": "CFGDenoiser" + }, + { + "type": "function", + "name": "update_inner_model", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "CFGDenoiser" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "sigma", + "type": null + }, + { + "name": "uncond", + "type": null + }, + { + "name": "cond", + "type": null + }, + { + "name": "cond_scale", + "type": null + }, + { + "name": "s_min_uncond", + "type": null + }, + { + "name": "image_cond", + "type": null + } + ], + "return_type": "denoised", + "parent": "CFGDenoiser" + } + ], + "parent": null + } + ], + "modules/sd_samplers_common.py": [ + { + "type": "class", + "name": "SamplerData", + "methods": [ + { + "type": "function", + "name": "total_steps", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "steps", + "type": null + } + ], + "return_type": "steps", + "parent": "SamplerData" + } + ], + "parent": null + }, + { + "type": "function", + "name": "setup_img2img_steps", + "args": [ + { + "name": "p", + "type": null + }, + { + "name": "steps", + "type": null + } + ], + "return_type": "(steps, t_enc)", + "parent": null + }, + { + "type": "function", + "name": "samples_to_images_tensor", + "args": [ + { + "name": "sample", + "type": null + }, + { + "name": "approximation", + "type": null + }, + { + "name": "model", + "type": null + } + ], + "return_type": "x_sample", + "parent": null + }, + { + "type": "function", + "name": "single_sample_to_image", + "args": [ + { + "name": "sample", + "type": null + }, + { + "name": "approximation", + "type": null + } + ], + "return_type": "Image.fromarray(x_sample)", + "parent": null + }, + { + "type": "function", + "name": "decode_first_stage", + "args": [ + { + "name": "model", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "samples_to_images_tensor(x, approx_index, model)", + "parent": null + }, + { + "type": "function", + "name": "sample_to_image", + "args": [ + { + "name": "samples", + "type": null + }, + { + "name": "index", + "type": null + }, + { + "name": "approximation", + "type": null + } + ], + "return_type": "single_sample_to_image(samples[index], approximation)", + "parent": null + }, + { + "type": "function", + "name": "samples_to_image_grid", + "args": [ + { + "name": "samples", + "type": null + }, + { + "name": "approximation", + "type": null + } + ], + "return_type": "images.image_grid([single_sample_to_image(sample, approximation) for sample in\n samples])", + "parent": null + }, + { + "type": "function", + "name": "images_tensor_to_samples", + "args": [ + { + "name": "image", + "type": null + }, + { + "name": "approximation", + "type": null + }, + { + "name": "model", + "type": null + } + ], + "return_type": "x_latent", + "parent": null + }, + { + "type": "function", + "name": "store_latent", + "args": [ + { + "name": "decoded", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "is_sampler_using_eta_noise_seed_delta", + "args": [ + { + "name": "p", + "type": null + } + ], + "return_type": "sampler_config.options.get('uses_ensd', False)", + "parent": null + }, + { + "type": "class", + "name": "InterruptedException", + "methods": [], + "parent": null + }, + { + "type": "function", + "name": "replace_torchsde_browinan", + "args": [], + "return_type": "devices.randn_local(seed, size).to(device=device, dtype=dtype)", + "parent": null + }, + { + "type": "function", + "name": "apply_refiner", + "args": [ + { + "name": "cfg_denoiser", + "type": null + } + ], + "return_type": "(True)", + "parent": null + }, + { + "type": "class", + "name": "TorchHijack", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": null + } + ], + "return_type": null, + "parent": "TorchHijack" + }, + { + "type": "function", + "name": "__getattr__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "item", + "type": null + } + ], + "return_type": "self.randn_like", + "parent": "TorchHijack" + }, + { + "type": "function", + "name": "randn_like", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "self.rng.next()", + "parent": "TorchHijack" + } + ], + "parent": null + }, + { + "type": "class", + "name": "Sampler", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "funcname", + "type": null + } + ], + "return_type": null, + "parent": "Sampler" + }, + { + "type": "function", + "name": "callback_state", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "d", + "type": null + } + ], + "return_type": null, + "parent": "Sampler" + }, + { + "type": "function", + "name": "launch_sampling", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "steps", + "type": null + }, + { + "name": "func", + "type": null + } + ], + "return_type": "func()", + "parent": "Sampler" + }, + { + "type": "function", + "name": "number_of_needed_noises", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": null + } + ], + "return_type": "p.steps", + "parent": "Sampler" + }, + { + "type": "function", + "name": "initialize", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": null + } + ], + "return_type": "extra_params_kwargs", + "parent": "Sampler" + }, + { + "type": "function", + "name": "create_noise_sampler", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "sigmas", + "type": null + }, + { + "name": "p", + "type": null + } + ], + "return_type": "BrownianTreeNoiseSampler(x, sigma_min, sigma_max, seed=current_iter_seeds)", + "parent": "Sampler" + }, + { + "type": "function", + "name": "sample", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "conditioning", + "type": null + }, + { + "name": "unconditional_conditioning", + "type": null + }, + { + "name": "steps", + "type": null + }, + { + "name": "image_conditioning", + "type": null + } + ], + "return_type": null, + "parent": "Sampler" + }, + { + "type": "function", + "name": "sample_img2img", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "noise", + "type": null + }, + { + "name": "conditioning", + "type": null + }, + { + "name": "unconditional_conditioning", + "type": null + }, + { + "name": "steps", + "type": null + }, + { + "name": "image_conditioning", + "type": null + } + ], + "return_type": null, + "parent": "Sampler" + } + ], + "parent": null + } + ], + "modules/sd_samplers_compvis.py": [], + "modules/sd_samplers_extra.py": [ + { + "type": "function", + "name": "restart_sampler", + "args": [ + { + "name": "model", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "sigmas", + "type": null + }, + { + "name": "extra_args", + "type": null + }, + { + "name": "callback", + "type": null + }, + { + "name": "disable", + "type": null + }, + { + "name": "s_noise", + "type": null + }, + { + "name": "restart_list", + "type": null + } + ], + "return_type": "x", + "parent": null + } + ], + "modules/sd_samplers_kdiffusion.py": [ + { + "type": "class", + "name": "CFGDenoiserKDiffusion", + "methods": [ + { + "type": "function", + "name": "inner_model", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "self.model_wrap", + "parent": "CFGDenoiserKDiffusion" + } + ], + "parent": null + }, + { + "type": "class", + "name": "KDiffusionSampler", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "funcname", + "type": null + }, + { + "name": "sd_model", + "type": null + }, + { + "name": "options", + "type": null + } + ], + "return_type": null, + "parent": "KDiffusionSampler" + }, + { + "type": "function", + "name": "get_sigmas", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": null + }, + { + "name": "steps", + "type": null + } + ], + "return_type": "sigmas", + "parent": "KDiffusionSampler" + }, + { + "type": "function", + "name": "sample_img2img", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "noise", + "type": null + }, + { + "name": "conditioning", + "type": null + }, + { + "name": "unconditional_conditioning", + "type": null + }, + { + "name": "steps", + "type": null + }, + { + "name": "image_conditioning", + "type": null + } + ], + "return_type": "samples", + "parent": "KDiffusionSampler" + }, + { + "type": "function", + "name": "sample", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "conditioning", + "type": null + }, + { + "name": "unconditional_conditioning", + "type": null + }, + { + "name": "steps", + "type": null + }, + { + "name": "image_conditioning", + "type": null + } + ], + "return_type": "samples", + "parent": "KDiffusionSampler" + } + ], + "parent": null + } + ], + "modules/sd_samplers_timesteps.py": [ + { + "type": "class", + "name": "CompVisTimestepsDenoiser", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "model", + "type": null + } + ], + "return_type": null, + "parent": "CompVisTimestepsDenoiser" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "input", + "type": null + }, + { + "name": "timesteps", + "type": null + } + ], + "return_type": "self.inner_model.apply_model(input, timesteps, **kwargs)", + "parent": "CompVisTimestepsDenoiser" + } + ], + "parent": null + }, + { + "type": "class", + "name": "CompVisTimestepsVDenoiser", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "model", + "type": null + } + ], + "return_type": null, + "parent": "CompVisTimestepsVDenoiser" + }, + { + "type": "function", + "name": "predict_eps_from_z_and_v", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x_t", + "type": null + }, + { + "name": "t", + "type": null + }, + { + "name": "v", + "type": null + } + ], + "return_type": "(self.inner_model.sqrt_alphas_cumprod[t.to(torch.int), None, None, None] *\n v + self.inner_model.sqrt_one_minus_alphas_cumprod[t.to(torch.int),\n None, None, None] * x_t)", + "parent": "CompVisTimestepsVDenoiser" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "input", + "type": null + }, + { + "name": "timesteps", + "type": null + } + ], + "return_type": "e_t", + "parent": "CompVisTimestepsVDenoiser" + } + ], + "parent": null + }, + { + "type": "class", + "name": "CFGDenoiserTimesteps", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "sampler", + "type": null + } + ], + "return_type": null, + "parent": "CFGDenoiserTimesteps" + }, + { + "type": "function", + "name": "get_pred_x0", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x_in", + "type": null + }, + { + "name": "x_out", + "type": null + }, + { + "name": "sigma", + "type": null + } + ], + "return_type": "pred_x0", + "parent": "CFGDenoiserTimesteps" + }, + { + "type": "function", + "name": "inner_model", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "self.model_wrap", + "parent": "CFGDenoiserTimesteps" + } + ], + "parent": null + }, + { + "type": "class", + "name": "CompVisSampler", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "funcname", + "type": null + }, + { + "name": "sd_model", + "type": null + } + ], + "return_type": null, + "parent": "CompVisSampler" + }, + { + "type": "function", + "name": "get_timesteps", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": null + }, + { + "name": "steps", + "type": null + } + ], + "return_type": "timesteps", + "parent": "CompVisSampler" + }, + { + "type": "function", + "name": "sample_img2img", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "noise", + "type": null + }, + { + "name": "conditioning", + "type": null + }, + { + "name": "unconditional_conditioning", + "type": null + }, + { + "name": "steps", + "type": null + }, + { + "name": "image_conditioning", + "type": null + } + ], + "return_type": "samples", + "parent": "CompVisSampler" + }, + { + "type": "function", + "name": "sample", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "conditioning", + "type": null + }, + { + "name": "unconditional_conditioning", + "type": null + }, + { + "name": "steps", + "type": null + }, + { + "name": "image_conditioning", + "type": null + } + ], + "return_type": "samples", + "parent": "CompVisSampler" + } + ], + "parent": null + } + ], + "modules/sd_samplers_timesteps_impl.py": [ + { + "type": "function", + "name": "ddim", + "args": [ + { + "name": "model", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "timesteps", + "type": null + }, + { + "name": "extra_args", + "type": null + }, + { + "name": "callback", + "type": null + }, + { + "name": "disable", + "type": null + }, + { + "name": "eta", + "type": null + } + ], + "return_type": "x", + "parent": null + }, + { + "type": "function", + "name": "plms", + "args": [ + { + "name": "model", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "timesteps", + "type": null + }, + { + "name": "extra_args", + "type": null + }, + { + "name": "callback", + "type": null + }, + { + "name": "disable", + "type": null + } + ], + "return_type": "x", + "parent": null + }, + { + "type": "class", + "name": "UniPCCFG", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "cfg_model", + "type": null + }, + { + "name": "extra_args", + "type": null + }, + { + "name": "callback", + "type": null + } + ], + "return_type": null, + "parent": "UniPCCFG" + }, + { + "type": "function", + "name": "get_model_input_time", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "t_continuous", + "type": null + } + ], + "return_type": "((t_continuous - 1.0 / self.noise_schedule.total_N) * 1000.0)", + "parent": "UniPCCFG" + }, + { + "type": "function", + "name": "model", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "t", + "type": null + } + ], + "return_type": "res", + "parent": "UniPCCFG" + } + ], + "parent": null + }, + { + "type": "function", + "name": "unipc", + "args": [ + { + "name": "model", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "timesteps", + "type": null + }, + { + "name": "extra_args", + "type": null + }, + { + "name": "callback", + "type": null + }, + { + "name": "disable", + "type": null + }, + { + "name": "is_img2img", + "type": null + } + ], + "return_type": "x", + "parent": null + } + ], + "modules/sd_unet.py": [ + { + "type": "function", + "name": "list_unets", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "get_unet_option", + "args": [ + { + "name": "option", + "type": null + } + ], + "return_type": "next(iter([x for x in unet_options if x.label == option]), None)", + "parent": null + }, + { + "type": "function", + "name": "apply_unet", + "args": [ + { + "name": "option", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "class", + "name": "SdUnetOption", + "methods": [ + { + "type": "function", + "name": "create_unet", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "SdUnetOption" + } + ], + "parent": null + }, + { + "type": "class", + "name": "SdUnet", + "methods": [ + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "timesteps", + "type": null + }, + { + "name": "context", + "type": null + } + ], + "return_type": null, + "parent": "SdUnet" + }, + { + "type": "function", + "name": "activate", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "SdUnet" + }, + { + "type": "function", + "name": "deactivate", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "SdUnet" + } + ], + "parent": null + }, + { + "type": "function", + "name": "UNetModel_forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "timesteps", + "type": null + }, + { + "name": "context", + "type": null + } + ], + "return_type": "ldm.modules.diffusionmodules.openaimodel.copy_of_UNetModel_forward_for_webui(\n self, x, timesteps, context, *args, **kwargs)", + "parent": null + } + ], + "modules/sd_vae.py": [ + { + "type": "function", + "name": "get_loaded_vae_name", + "args": [], + "return_type": "os.path.basename(loaded_vae_file)", + "parent": null + }, + { + "type": "function", + "name": "get_loaded_vae_hash", + "args": [], + "return_type": "(sha256[0:10] if sha256 else None)", + "parent": null + }, + { + "type": "function", + "name": "get_base_vae", + "args": [ + { + "name": "model", + "type": null + } + ], + "return_type": "None", + "parent": null + }, + { + "type": "function", + "name": "store_base_vae", + "args": [ + { + "name": "model", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "delete_base_vae", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "restore_base_vae", + "args": [ + { + "name": "model", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "get_filename", + "args": [ + { + "name": "filepath", + "type": null + } + ], + "return_type": "os.path.basename(filepath)", + "parent": null + }, + { + "type": "function", + "name": "refresh_vae_list", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "find_vae_near_checkpoint", + "args": [ + { + "name": "checkpoint_file", + "type": null + } + ], + "return_type": "None", + "parent": null + }, + { + "type": "class", + "name": "VaeResolution", + "methods": [ + { + "type": "function", + "name": "tuple", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "(self.vae, self.source)", + "parent": "VaeResolution" + } + ], + "parent": null + }, + { + "type": "function", + "name": "is_automatic", + "args": [], + "return_type": "(shared.opts.sd_vae in {'Automatic', 'auto'})", + "parent": null + }, + { + "type": "function", + "name": "resolve_vae_from_setting", + "args": [], + "return_type": "VaeResolution(resolved=False)", + "parent": null + }, + { + "type": "function", + "name": "resolve_vae_from_user_metadata", + "args": [ + { + "name": "checkpoint_file", + "type": null + } + ], + "return_type": "VaeResolution(resolved=False)", + "parent": null + }, + { + "type": "function", + "name": "resolve_vae_near_checkpoint", + "args": [ + { + "name": "checkpoint_file", + "type": null + } + ], + "return_type": "VaeResolution(resolved=False)", + "parent": null + }, + { + "type": "function", + "name": "resolve_vae", + "args": [ + { + "name": "checkpoint_file", + "type": null + } + ], + "return_type": "res", + "parent": null + }, + { + "type": "function", + "name": "load_vae_dict", + "args": [ + { + "name": "filename", + "type": null + }, + { + "name": "map_location", + "type": null + } + ], + "return_type": "vae_dict_1", + "parent": null + }, + { + "type": "function", + "name": "load_vae", + "args": [ + { + "name": "model", + "type": null + }, + { + "name": "vae_file", + "type": null + }, + { + "name": "vae_source", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "_load_vae_dict", + "args": [ + { + "name": "model", + "type": null + }, + { + "name": "vae_dict_1", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "clear_loaded_vae", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "reload_vae_weights", + "args": [ + { + "name": "sd_model", + "type": null + }, + { + "name": "vae_file", + "type": null + } + ], + "return_type": "sd_model", + "parent": null + } + ], + "modules/sd_vae_approx.py": [ + { + "type": "class", + "name": "VAEApprox", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "VAEApprox" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "x", + "parent": "VAEApprox" + } + ], + "parent": null + }, + { + "type": "function", + "name": "download_model", + "args": [ + { + "name": "model_path", + "type": null + }, + { + "name": "model_url", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "model", + "args": [], + "return_type": "loaded_model", + "parent": null + }, + { + "type": "function", + "name": "cheap_approximation", + "args": [ + { + "name": "sample", + "type": null + } + ], + "return_type": "x_sample", + "parent": null + } + ], + "modules/sd_vae_taesd.py": [ + { + "type": "function", + "name": "conv", + "args": [ + { + "name": "n_in", + "type": null + }, + { + "name": "n_out", + "type": null + } + ], + "return_type": "nn.Conv2d(n_in, n_out, 3, padding=1, **kwargs)", + "parent": null + }, + { + "type": "class", + "name": "Clamp", + "methods": [ + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "x", + "type": null + } + ], + "return_type": "(torch.tanh(x / 3) * 3)", + "parent": "Clamp" + } + ], + "parent": null + }, + { + "type": "class", + "name": "Block", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "n_in", + "type": null + }, + { + "name": "n_out", + "type": null + } + ], + "return_type": null, + "parent": "Block" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "self.fuse(self.conv(x) + self.skip(x))", + "parent": "Block" + } + ], + "parent": null + }, + { + "type": "function", + "name": "decoder", + "args": [], + "return_type": "nn.Sequential(Clamp(), conv(4, 64), nn.ReLU(), Block(64, 64), Block(64, 64),\n Block(64, 64), nn.Upsample(scale_factor=2), conv(64, 64, bias=False),\n Block(64, 64), Block(64, 64), Block(64, 64), nn.Upsample(scale_factor=2\n ), conv(64, 64, bias=False), Block(64, 64), Block(64, 64), Block(64, 64\n ), nn.Upsample(scale_factor=2), conv(64, 64, bias=False), Block(64, 64),\n conv(64, 3))", + "parent": null + }, + { + "type": "function", + "name": "encoder", + "args": [], + "return_type": "nn.Sequential(conv(3, 64), Block(64, 64), conv(64, 64, stride=2, bias=False\n ), Block(64, 64), Block(64, 64), Block(64, 64), conv(64, 64, stride=2,\n bias=False), Block(64, 64), Block(64, 64), Block(64, 64), conv(64, 64,\n stride=2, bias=False), Block(64, 64), Block(64, 64), Block(64, 64),\n conv(64, 4))", + "parent": null + }, + { + "type": "class", + "name": "TAESDDecoder", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "decoder_path", + "type": null + } + ], + "return_type": null, + "parent": "TAESDDecoder" + } + ], + "parent": null + }, + { + "type": "class", + "name": "TAESDEncoder", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "encoder_path", + "type": null + } + ], + "return_type": null, + "parent": "TAESDEncoder" + } + ], + "parent": null + }, + { + "type": "function", + "name": "download_model", + "args": [ + { + "name": "model_path", + "type": null + }, + { + "name": "model_url", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "decoder_model", + "args": [], + "return_type": "loaded_model.decoder", + "parent": null + }, + { + "type": "function", + "name": "encoder_model", + "args": [], + "return_type": "loaded_model.encoder", + "parent": null + } + ], + "modules/shared.py": [], + "modules/shared_cmd_options.py": [], + "modules/shared_gradio_themes.py": [ + { + "type": "function", + "name": "reload_gradio_theme", + "args": [ + { + "name": "theme_name", + "type": null + } + ], + "return_type": null, + "parent": null + } + ], + "modules/shared_init.py": [ + { + "type": "function", + "name": "initialize", + "args": [], + "return_type": null, + "parent": null + } + ], + "modules/shared_items.py": [ + { + "type": "function", + "name": "realesrgan_models_names", + "args": [], + "return_type": "[x.name for x in modules.realesrgan_model.get_realesrgan_models(None)]", + "parent": null + }, + { + "type": "function", + "name": "postprocessing_scripts", + "args": [], + "return_type": "modules.scripts.scripts_postproc.scripts", + "parent": null + }, + { + "type": "function", + "name": "sd_vae_items", + "args": [], + "return_type": "(['Automatic', 'None'] + list(modules.sd_vae.vae_dict))", + "parent": null + }, + { + "type": "function", + "name": "refresh_vae_list", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "cross_attention_optimizations", + "args": [], + "return_type": "(['Automatic'] + [x.title() for x in modules.sd_hijack.optimizers] + ['None'])", + "parent": null + }, + { + "type": "function", + "name": "sd_unet_items", + "args": [], + "return_type": "(['Automatic'] + [x.label for x in modules.sd_unet.unet_options] + ['None'])", + "parent": null + }, + { + "type": "function", + "name": "refresh_unet_list", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "list_checkpoint_tiles", + "args": [], + "return_type": "modules.sd_models.checkpoint_tiles()", + "parent": null + }, + { + "type": "function", + "name": "refresh_checkpoints", + "args": [], + "return_type": "modules.sd_models.list_models()", + "parent": null + }, + { + "type": "function", + "name": "list_samplers", + "args": [], + "return_type": "modules.sd_samplers.all_samplers", + "parent": null + }, + { + "type": "function", + "name": "reload_hypernetworks", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "ui_reorder_categories", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "class", + "name": "Shared", + "methods": [ + { + "type": "function", + "name": "sd_model", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "modules.sd_models.model_data.get_sd_model()", + "parent": "Shared" + }, + { + "type": "function", + "name": "sd_model", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "value", + "type": null + } + ], + "return_type": null, + "parent": "Shared" + } + ], + "parent": null + } + ], + "modules/shared_options.py": [], + "modules/shared_state.py": [ + { + "type": "class", + "name": "State", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "State" + }, + { + "type": "function", + "name": "need_restart", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "(self.server_command == 'restart')", + "parent": "State" + }, + { + "type": "function", + "name": "need_restart", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "value", + "type": "bool" + } + ], + "return_type": null, + "parent": "State" + }, + { + "type": "function", + "name": "server_command", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "self._server_command", + "parent": "State" + }, + { + "type": "function", + "name": "server_command", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "value", + "type": "Optional[str]" + } + ], + "return_type": null, + "parent": "State" + }, + { + "type": "function", + "name": "wait_for_server_command", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "timeout", + "type": "Optional[float]" + } + ], + "return_type": "None", + "parent": "State" + }, + { + "type": "function", + "name": "request_restart", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "State" + }, + { + "type": "function", + "name": "skip", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "State" + }, + { + "type": "function", + "name": "interrupt", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "State" + }, + { + "type": "function", + "name": "nextjob", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "State" + }, + { + "type": "function", + "name": "dict", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "obj", + "parent": "State" + }, + { + "type": "function", + "name": "begin", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "job", + "type": "str" + } + ], + "return_type": null, + "parent": "State" + }, + { + "type": "function", + "name": "end", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "State" + }, + { + "type": "function", + "name": "set_current_image", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "State" + }, + { + "type": "function", + "name": "do_set_current_image", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "State" + }, + { + "type": "function", + "name": "assign_current_image", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "image", + "type": null + } + ], + "return_type": null, + "parent": "State" + } + ], + "parent": null + } + ], + "modules/shared_total_tqdm.py": [ + { + "type": "class", + "name": "TotalTQDM", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "TotalTQDM" + }, + { + "type": "function", + "name": "reset", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "TotalTQDM" + }, + { + "type": "function", + "name": "update", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "TotalTQDM" + }, + { + "type": "function", + "name": "updateTotal", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "new_total", + "type": null + } + ], + "return_type": null, + "parent": "TotalTQDM" + }, + { + "type": "function", + "name": "clear", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "TotalTQDM" + } + ], + "parent": null + } + ], + "modules/styles.py": [ + { + "type": "class", + "name": "PromptStyle", + "methods": [], + "parent": null + }, + { + "type": "function", + "name": "merge_prompts", + "args": [ + { + "name": "style_prompt", + "type": "str" + }, + { + "name": "prompt", + "type": "str" + } + ], + "return_type": "res", + "parent": null + }, + { + "type": "function", + "name": "apply_styles_to_prompt", + "args": [ + { + "name": "prompt", + "type": null + }, + { + "name": "styles", + "type": null + } + ], + "return_type": "prompt", + "parent": null + }, + { + "type": "function", + "name": "extract_style_text_from_prompt", + "args": [ + { + "name": "style_text", + "type": null + }, + { + "name": "prompt", + "type": null + } + ], + "return_type": "(False, prompt)", + "parent": null + }, + { + "type": "function", + "name": "extract_style_from_prompts", + "args": [ + { + "name": "style", + "type": "PromptStyle" + }, + { + "name": "prompt", + "type": null + }, + { + "name": "negative_prompt", + "type": null + } + ], + "return_type": "(True, extracted_positive, extracted_negative)", + "parent": null + }, + { + "type": "class", + "name": "StyleDatabase", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "path", + "type": "str" + } + ], + "return_type": null, + "parent": "StyleDatabase" + }, + { + "type": "function", + "name": "reload", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "StyleDatabase" + }, + { + "type": "function", + "name": "get_style_prompts", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "styles", + "type": null + } + ], + "return_type": "[self.styles.get(x, self.no_style).prompt for x in styles]", + "parent": "StyleDatabase" + }, + { + "type": "function", + "name": "get_negative_style_prompts", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "styles", + "type": null + } + ], + "return_type": "[self.styles.get(x, self.no_style).negative_prompt for x in styles]", + "parent": "StyleDatabase" + }, + { + "type": "function", + "name": "apply_styles_to_prompt", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "prompt", + "type": null + }, + { + "name": "styles", + "type": null + } + ], + "return_type": "apply_styles_to_prompt(prompt, [self.styles.get(x, self.no_style).prompt for\n x in styles])", + "parent": "StyleDatabase" + }, + { + "type": "function", + "name": "apply_negative_styles_to_prompt", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "prompt", + "type": null + }, + { + "name": "styles", + "type": null + } + ], + "return_type": "apply_styles_to_prompt(prompt, [self.styles.get(x, self.no_style).\n negative_prompt for x in styles])", + "parent": "StyleDatabase" + }, + { + "type": "function", + "name": "save_styles", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "path", + "type": "str" + } + ], + "return_type": null, + "parent": "StyleDatabase" + }, + { + "type": "function", + "name": "extract_styles_from_prompt", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "prompt", + "type": null + }, + { + "name": "negative_prompt", + "type": null + } + ], + "return_type": "(list(reversed(extracted)), prompt, negative_prompt)", + "parent": "StyleDatabase" + } + ], + "parent": null + } + ], + "modules/sub_quadratic_attention.py": [ + { + "type": "function", + "name": "narrow_trunc", + "args": [ + { + "name": "input", + "type": "Tensor" + }, + { + "name": "dim", + "type": "int" + }, + { + "name": "start", + "type": "int" + }, + { + "name": "length", + "type": "int" + } + ], + "return_type": "torch.narrow(input, dim, start, length if input.shape[dim] >= start +\n length else input.shape[dim] - start)", + "parent": null + }, + { + "type": "class", + "name": "AttnChunk", + "methods": [], + "parent": null + }, + { + "type": "class", + "name": "SummarizeChunk", + "methods": [ + { + "type": "function", + "name": "__call__", + "args": [ + { + "name": "query", + "type": "Tensor" + }, + { + "name": "key", + "type": "Tensor" + }, + { + "name": "value", + "type": "Tensor" + } + ], + "return_type": null, + "parent": "SummarizeChunk" + } + ], + "parent": null + }, + { + "type": "class", + "name": "ComputeQueryChunkAttn", + "methods": [ + { + "type": "function", + "name": "__call__", + "args": [ + { + "name": "query", + "type": "Tensor" + }, + { + "name": "key", + "type": "Tensor" + }, + { + "name": "value", + "type": "Tensor" + } + ], + "return_type": null, + "parent": "ComputeQueryChunkAttn" + } + ], + "parent": null + }, + { + "type": "function", + "name": "_summarize_chunk", + "args": [ + { + "name": "query", + "type": "Tensor" + }, + { + "name": "key", + "type": "Tensor" + }, + { + "name": "value", + "type": "Tensor" + }, + { + "name": "scale", + "type": "float" + } + ], + "return_type": "AttnChunk(exp_values, exp_weights.sum(dim=-1), max_score)", + "parent": null + }, + { + "type": "function", + "name": "_query_chunk_attention", + "args": [ + { + "name": "query", + "type": "Tensor" + }, + { + "name": "key", + "type": "Tensor" + }, + { + "name": "value", + "type": "Tensor" + }, + { + "name": "summarize_chunk", + "type": "SummarizeChunk" + }, + { + "name": "kv_chunk_size", + "type": "int" + } + ], + "return_type": "(all_values / all_weights)", + "parent": null + }, + { + "type": "function", + "name": "_get_attention_scores_no_kv_chunking", + "args": [ + { + "name": "query", + "type": "Tensor" + }, + { + "name": "key", + "type": "Tensor" + }, + { + "name": "value", + "type": "Tensor" + }, + { + "name": "scale", + "type": "float" + } + ], + "return_type": "hidden_states_slice", + "parent": null + }, + { + "type": "class", + "name": "ScannedChunk", + "methods": [], + "parent": null + }, + { + "type": "function", + "name": "efficient_dot_product_attention", + "args": [ + { + "name": "query", + "type": "Tensor" + }, + { + "name": "key", + "type": "Tensor" + }, + { + "name": "value", + "type": "Tensor" + }, + { + "name": "query_chunk_size", + "type": null + }, + { + "name": "kv_chunk_size", + "type": "Optional[int]" + }, + { + "name": "kv_chunk_size_min", + "type": "Optional[int]" + }, + { + "name": "use_checkpoint", + "type": null + } + ], + "return_type": "res", + "parent": null + } + ], + "modules/sysinfo.py": [ + { + "type": "function", + "name": "pretty_bytes", + "args": [ + { + "name": "num", + "type": null + }, + { + "name": "suffix", + "type": null + } + ], + "return_type": "f\"\"\"{num:.0f}{unit}{suffix}\"\"\"", + "parent": null + }, + { + "type": "function", + "name": "get", + "args": [], + "return_type": "text", + "parent": null + }, + { + "type": "function", + "name": "check", + "args": [ + { + "name": "x", + "type": null + } + ], + "return_type": "(h.hexdigest() == m.group(1))", + "parent": null + }, + { + "type": "function", + "name": "get_dict", + "args": [], + "return_type": "res", + "parent": null + }, + { + "type": "function", + "name": "format_traceback", + "args": [ + { + "name": "tb", + "type": null + } + ], + "return_type": "[[f'{x.filename}, line {x.lineno}, {x.name}', x.line] for x in traceback.\n extract_tb(tb)]", + "parent": null + }, + { + "type": "function", + "name": "format_exception", + "args": [ + { + "name": "e", + "type": null + }, + { + "name": "tb", + "type": null + } + ], + "return_type": "{'exception': str(e), 'traceback': format_traceback(tb)}", + "parent": null + }, + { + "type": "function", + "name": "get_exceptions", + "args": [], + "return_type": "list(reversed(errors.exception_records))", + "parent": null + }, + { + "type": "function", + "name": "get_environment", + "args": [], + "return_type": "{k: os.environ[k] for k in sorted(os.environ) if k in environment_whitelist}", + "parent": null + }, + { + "type": "function", + "name": "get_argv", + "args": [], + "return_type": "res", + "parent": null + }, + { + "type": "function", + "name": "get_torch_sysinfo", + "args": [], + "return_type": "{k: (re.split(re_newline, str(v)) if '\\n' in str(v) else v) for k, v in\n info.items()}", + "parent": null + }, + { + "type": "function", + "name": "get_extensions", + "args": [], + "return_type": "[to_json(x) for x in extensions.extensions if not x.is_builtin and x.\n enabled == enabled]", + "parent": null + }, + { + "type": "function", + "name": "get_config", + "args": [], + "return_type": "shared.opts.data", + "parent": null + } + ], + "modules/textual_inversion/autocrop.py": [ + { + "type": "function", + "name": "crop_image", + "args": [ + { + "name": "im", + "type": null + }, + { + "name": "settings", + "type": null + } + ], + "return_type": "results", + "parent": null + }, + { + "type": "function", + "name": "focal_point", + "args": [ + { + "name": "im", + "type": null + }, + { + "name": "settings", + "type": null + } + ], + "return_type": "average_point", + "parent": null + }, + { + "type": "function", + "name": "image_face_points", + "args": [ + { + "name": "im", + "type": null + }, + { + "name": "settings", + "type": null + } + ], + "return_type": "[]", + "parent": null + }, + { + "type": "function", + "name": "image_corner_points", + "args": [ + { + "name": "im", + "type": null + }, + { + "name": "settings", + "type": null + } + ], + "return_type": "focal_points", + "parent": null + }, + { + "type": "function", + "name": "image_entropy_points", + "args": [ + { + "name": "im", + "type": null + }, + { + "name": "settings", + "type": null + } + ], + "return_type": "[PointOfInterest(x_mid, y_mid, size=25, weight=1.0)]", + "parent": null + }, + { + "type": "function", + "name": "image_entropy", + "args": [ + { + "name": "im", + "type": null + } + ], + "return_type": "(-np.log2(hist / hist.sum()).sum())", + "parent": null + }, + { + "type": "function", + "name": "centroid", + "args": [ + { + "name": "pois", + "type": null + } + ], + "return_type": "PointOfInterest(sum(x) / len(pois), sum(y) / len(pois))", + "parent": null + }, + { + "type": "function", + "name": "poi_average", + "args": [ + { + "name": "pois", + "type": null + }, + { + "name": "settings", + "type": null + } + ], + "return_type": "PointOfInterest(avg_x, avg_y)", + "parent": null + }, + { + "type": "function", + "name": "is_landscape", + "args": [ + { + "name": "w", + "type": null + }, + { + "name": "h", + "type": null + } + ], + "return_type": "(w > h)", + "parent": null + }, + { + "type": "function", + "name": "is_portrait", + "args": [ + { + "name": "w", + "type": null + }, + { + "name": "h", + "type": null + } + ], + "return_type": "(h > w)", + "parent": null + }, + { + "type": "function", + "name": "is_square", + "args": [ + { + "name": "w", + "type": null + }, + { + "name": "h", + "type": null + } + ], + "return_type": "(w == h)", + "parent": null + }, + { + "type": "function", + "name": "download_and_cache_models", + "args": [ + { + "name": "dirname", + "type": null + } + ], + "return_type": "None", + "parent": null + }, + { + "type": "class", + "name": "PointOfInterest", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "y", + "type": null + }, + { + "name": "weight", + "type": null + }, + { + "name": "size", + "type": null + } + ], + "return_type": null, + "parent": "PointOfInterest" + }, + { + "type": "function", + "name": "bounding", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "size", + "type": null + } + ], + "return_type": "[self.x - size // 2, self.y - size // 2, self.x + size // 2, self.y + size // 2\n ]", + "parent": "PointOfInterest" + } + ], + "parent": null + }, + { + "type": "class", + "name": "Settings", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "crop_width", + "type": null + }, + { + "name": "crop_height", + "type": null + }, + { + "name": "corner_points_weight", + "type": null + }, + { + "name": "entropy_points_weight", + "type": null + }, + { + "name": "face_points_weight", + "type": null + }, + { + "name": "annotate_image", + "type": null + }, + { + "name": "dnn_model_path", + "type": null + } + ], + "return_type": null, + "parent": "Settings" + } + ], + "parent": null + } + ], + "modules/textual_inversion/dataset.py": [ + { + "type": "class", + "name": "DatasetEntry", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "filename", + "type": null + }, + { + "name": "filename_text", + "type": null + }, + { + "name": "latent_dist", + "type": null + }, + { + "name": "latent_sample", + "type": null + }, + { + "name": "cond", + "type": null + }, + { + "name": "cond_text", + "type": null + }, + { + "name": "pixel_values", + "type": null + }, + { + "name": "weight", + "type": null + } + ], + "return_type": null, + "parent": "DatasetEntry" + } + ], + "parent": null + }, + { + "type": "class", + "name": "PersonalizedBase", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "data_root", + "type": null + }, + { + "name": "width", + "type": null + }, + { + "name": "height", + "type": null + }, + { + "name": "repeats", + "type": null + }, + { + "name": "flip_p", + "type": null + }, + { + "name": "placeholder_token", + "type": null + }, + { + "name": "model", + "type": null + }, + { + "name": "cond_model", + "type": null + }, + { + "name": "device", + "type": null + }, + { + "name": "template_file", + "type": null + }, + { + "name": "include_cond", + "type": null + }, + { + "name": "batch_size", + "type": null + }, + { + "name": "gradient_step", + "type": null + }, + { + "name": "shuffle_tags", + "type": null + }, + { + "name": "tag_drop_out", + "type": null + }, + { + "name": "latent_sampling_method", + "type": null + }, + { + "name": "varsize", + "type": null + }, + { + "name": "use_weight", + "type": null + } + ], + "return_type": null, + "parent": "PersonalizedBase" + }, + { + "type": "function", + "name": "create_text", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "filename_text", + "type": null + } + ], + "return_type": "text", + "parent": "PersonalizedBase" + }, + { + "type": "function", + "name": "__len__", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "self.length", + "parent": "PersonalizedBase" + }, + { + "type": "function", + "name": "__getitem__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "i", + "type": null + } + ], + "return_type": "entry", + "parent": "PersonalizedBase" + } + ], + "parent": null + }, + { + "type": "class", + "name": "GroupedBatchSampler", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "data_source", + "type": "PersonalizedBase" + }, + { + "name": "batch_size", + "type": "int" + } + ], + "return_type": null, + "parent": "GroupedBatchSampler" + }, + { + "type": "function", + "name": "__len__", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "self.len", + "parent": "GroupedBatchSampler" + }, + { + "type": "function", + "name": "__iter__", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "GroupedBatchSampler" + } + ], + "parent": null + }, + { + "type": "class", + "name": "PersonalizedDataLoader", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "dataset", + "type": null + }, + { + "name": "latent_sampling_method", + "type": null + }, + { + "name": "batch_size", + "type": null + }, + { + "name": "pin_memory", + "type": null + } + ], + "return_type": null, + "parent": "PersonalizedDataLoader" + } + ], + "parent": null + }, + { + "type": "class", + "name": "BatchLoader", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "data", + "type": null + } + ], + "return_type": null, + "parent": "BatchLoader" + }, + { + "type": "function", + "name": "pin_memory", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "self", + "parent": "BatchLoader" + } + ], + "parent": null + }, + { + "type": "function", + "name": "collate_wrapper", + "args": [ + { + "name": "batch", + "type": null + } + ], + "return_type": "BatchLoader(batch)", + "parent": null + }, + { + "type": "class", + "name": "BatchLoaderRandom", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "data", + "type": null + } + ], + "return_type": null, + "parent": "BatchLoaderRandom" + }, + { + "type": "function", + "name": "pin_memory", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "self", + "parent": "BatchLoaderRandom" + } + ], + "parent": null + }, + { + "type": "function", + "name": "collate_wrapper_random", + "args": [ + { + "name": "batch", + "type": null + } + ], + "return_type": "BatchLoaderRandom(batch)", + "parent": null + } + ], + "modules/textual_inversion/image_embedding.py": [ + { + "type": "class", + "name": "EmbeddingEncoder", + "methods": [ + { + "type": "function", + "name": "default", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "obj", + "type": null + } + ], + "return_type": "json.JSONEncoder.default(self, obj)", + "parent": "EmbeddingEncoder" + } + ], + "parent": null + }, + { + "type": "class", + "name": "EmbeddingDecoder", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "EmbeddingDecoder" + }, + { + "type": "function", + "name": "object_hook", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "d", + "type": null + } + ], + "return_type": "d", + "parent": "EmbeddingDecoder" + } + ], + "parent": null + }, + { + "type": "function", + "name": "embedding_to_b64", + "args": [ + { + "name": "data", + "type": null + } + ], + "return_type": "base64.b64encode(d.encode())", + "parent": null + }, + { + "type": "function", + "name": "embedding_from_b64", + "args": [ + { + "name": "data", + "type": null + } + ], + "return_type": "json.loads(d, cls=EmbeddingDecoder)", + "parent": null + }, + { + "type": "function", + "name": "lcg", + "args": [ + { + "name": "m", + "type": null + }, + { + "name": "a", + "type": null + }, + { + "name": "c", + "type": null + }, + { + "name": "seed", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "xor_block", + "args": [ + { + "name": "block", + "type": null + } + ], + "return_type": "np.bitwise_xor(block.astype(np.uint8), randblock & 15)", + "parent": null + }, + { + "type": "function", + "name": "style_block", + "args": [ + { + "name": "block", + "type": null + }, + { + "name": "sequence", + "type": null + } + ], + "return_type": "(block ^ fg)", + "parent": null + }, + { + "type": "function", + "name": "insert_image_data_embed", + "args": [ + { + "name": "image", + "type": null + }, + { + "name": "data", + "type": null + } + ], + "return_type": "background", + "parent": null + }, + { + "type": "function", + "name": "crop_black", + "args": [ + { + "name": "img", + "type": null + }, + { + "name": "tol", + "type": null + } + ], + "return_type": "img[row_start:row_end, col_start:col_end]", + "parent": null + }, + { + "type": "function", + "name": "extract_image_data_embed", + "args": [ + { + "name": "image", + "type": null + } + ], + "return_type": "json.loads(data, cls=EmbeddingDecoder)", + "parent": null + }, + { + "type": "function", + "name": "caption_image_overlay", + "args": [ + { + "name": "srcimage", + "type": null + }, + { + "name": "title", + "type": null + }, + { + "name": "footerLeft", + "type": null + }, + { + "name": "footerMid", + "type": null + }, + { + "name": "footerRight", + "type": null + }, + { + "name": "textfont", + "type": null + } + ], + "return_type": "image", + "parent": null + } + ], + "modules/textual_inversion/learn_schedule.py": [ + { + "type": "class", + "name": "LearnScheduleIterator", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "learn_rate", + "type": null + }, + { + "name": "max_steps", + "type": null + }, + { + "name": "cur_step", + "type": null + } + ], + "return_type": null, + "parent": "LearnScheduleIterator" + }, + { + "type": "function", + "name": "__iter__", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "self", + "parent": "LearnScheduleIterator" + }, + { + "type": "function", + "name": "__next__", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "self.rates[self.it - 1]", + "parent": "LearnScheduleIterator" + } + ], + "parent": null + }, + { + "type": "class", + "name": "LearnRateScheduler", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "learn_rate", + "type": null + }, + { + "name": "max_steps", + "type": null + }, + { + "name": "cur_step", + "type": null + }, + { + "name": "verbose", + "type": null + } + ], + "return_type": null, + "parent": "LearnRateScheduler" + }, + { + "type": "function", + "name": "step", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "step_number", + "type": null + } + ], + "return_type": "(True)", + "parent": "LearnRateScheduler" + }, + { + "type": "function", + "name": "apply", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "optimizer", + "type": null + }, + { + "name": "step_number", + "type": null + } + ], + "return_type": null, + "parent": "LearnRateScheduler" + } + ], + "parent": null + } + ], + "modules/textual_inversion/logging.py": [ + { + "type": "function", + "name": "save_settings_to_file", + "args": [ + { + "name": "log_directory", + "type": null + }, + { + "name": "all_params", + "type": null + } + ], + "return_type": null, + "parent": null + } + ], + "modules/textual_inversion/preprocess.py": [ + { + "type": "function", + "name": "preprocess", + "args": [ + { + "name": "id_task", + "type": null + }, + { + "name": "process_src", + "type": null + }, + { + "name": "process_dst", + "type": null + }, + { + "name": "process_width", + "type": null + }, + { + "name": "process_height", + "type": null + }, + { + "name": "preprocess_txt_action", + "type": null + }, + { + "name": "process_keep_original_size", + "type": null + }, + { + "name": "process_flip", + "type": null + }, + { + "name": "process_split", + "type": null + }, + { + "name": "process_caption", + "type": null + }, + { + "name": "process_caption_deepbooru", + "type": null + }, + { + "name": "split_threshold", + "type": null + }, + { + "name": "overlap_ratio", + "type": null + }, + { + "name": "process_focal_crop", + "type": null + }, + { + "name": "process_focal_crop_face_weight", + "type": null + }, + { + "name": "process_focal_crop_entropy_weight", + "type": null + }, + { + "name": "process_focal_crop_edges_weight", + "type": null + }, + { + "name": "process_focal_crop_debug", + "type": null + }, + { + "name": "process_multicrop", + "type": null + }, + { + "name": "process_multicrop_mindim", + "type": null + }, + { + "name": "process_multicrop_maxdim", + "type": null + }, + { + "name": "process_multicrop_minarea", + "type": null + }, + { + "name": "process_multicrop_maxarea", + "type": null + }, + { + "name": "process_multicrop_objective", + "type": null + }, + { + "name": "process_multicrop_threshold", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "listfiles", + "args": [ + { + "name": "dirname", + "type": null + } + ], + "return_type": "os.listdir(dirname)", + "parent": null + }, + { + "type": "class", + "name": "PreprocessParams", + "methods": [], + "parent": null + }, + { + "type": "function", + "name": "save_pic_with_caption", + "args": [ + { + "name": "image", + "type": null + }, + { + "name": "index", + "type": null + }, + { + "name": "params", + "type": "PreprocessParams" + }, + { + "name": "existing_caption", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "save_pic", + "args": [ + { + "name": "image", + "type": null + }, + { + "name": "index", + "type": null + }, + { + "name": "params", + "type": null + }, + { + "name": "existing_caption", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "split_pic", + "args": [ + { + "name": "image", + "type": null + }, + { + "name": "inverse_xy", + "type": null + }, + { + "name": "width", + "type": null + }, + { + "name": "height", + "type": null + }, + { + "name": "overlap_ratio", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "center_crop", + "args": [ + { + "name": "image", + "type": "Image" + }, + { + "name": "w", + "type": "int" + }, + { + "name": "h", + "type": "int" + } + ], + "return_type": "image.resize((w, h), Image.Resampling.LANCZOS, box)", + "parent": null + }, + { + "type": "function", + "name": "multicrop_pic", + "args": [ + { + "name": "image", + "type": "Image" + }, + { + "name": "mindim", + "type": null + }, + { + "name": "maxdim", + "type": null + }, + { + "name": "minarea", + "type": null + }, + { + "name": "maxarea", + "type": null + }, + { + "name": "objective", + "type": null + }, + { + "name": "threshold", + "type": null + } + ], + "return_type": "(wh and center_crop(image, *wh))", + "parent": null + }, + { + "type": "function", + "name": "preprocess_work", + "args": [ + { + "name": "process_src", + "type": null + }, + { + "name": "process_dst", + "type": null + }, + { + "name": "process_width", + "type": null + }, + { + "name": "process_height", + "type": null + }, + { + "name": "preprocess_txt_action", + "type": null + }, + { + "name": "process_keep_original_size", + "type": null + }, + { + "name": "process_flip", + "type": null + }, + { + "name": "process_split", + "type": null + }, + { + "name": "process_caption", + "type": null + }, + { + "name": "process_caption_deepbooru", + "type": null + }, + { + "name": "split_threshold", + "type": null + }, + { + "name": "overlap_ratio", + "type": null + }, + { + "name": "process_focal_crop", + "type": null + }, + { + "name": "process_focal_crop_face_weight", + "type": null + }, + { + "name": "process_focal_crop_entropy_weight", + "type": null + }, + { + "name": "process_focal_crop_edges_weight", + "type": null + }, + { + "name": "process_focal_crop_debug", + "type": null + }, + { + "name": "process_multicrop", + "type": null + }, + { + "name": "process_multicrop_mindim", + "type": null + }, + { + "name": "process_multicrop_maxdim", + "type": null + }, + { + "name": "process_multicrop_minarea", + "type": null + }, + { + "name": "process_multicrop_maxarea", + "type": null + }, + { + "name": "process_multicrop_objective", + "type": null + }, + { + "name": "process_multicrop_threshold", + "type": null + } + ], + "return_type": null, + "parent": null + } + ], + "modules/textual_inversion/textual_inversion.py": [ + { + "type": "function", + "name": "list_textual_inversion_templates", + "args": [], + "return_type": "textual_inversion_templates", + "parent": null + }, + { + "type": "class", + "name": "Embedding", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "vec", + "type": null + }, + { + "name": "name", + "type": null + }, + { + "name": "step", + "type": null + } + ], + "return_type": null, + "parent": "Embedding" + }, + { + "type": "function", + "name": "save", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "filename", + "type": null + } + ], + "return_type": null, + "parent": "Embedding" + }, + { + "type": "function", + "name": "checksum", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "self.cached_checksum", + "parent": "Embedding" + }, + { + "type": "function", + "name": "set_hash", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "v", + "type": null + } + ], + "return_type": null, + "parent": "Embedding" + } + ], + "parent": null + }, + { + "type": "class", + "name": "DirWithTextualInversionEmbeddings", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "path", + "type": null + } + ], + "return_type": null, + "parent": "DirWithTextualInversionEmbeddings" + }, + { + "type": "function", + "name": "has_changed", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "(False)", + "parent": "DirWithTextualInversionEmbeddings" + }, + { + "type": "function", + "name": "update", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "DirWithTextualInversionEmbeddings" + } + ], + "parent": null + }, + { + "type": "class", + "name": "EmbeddingDatabase", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "EmbeddingDatabase" + }, + { + "type": "function", + "name": "add_embedding_dir", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "path", + "type": null + } + ], + "return_type": null, + "parent": "EmbeddingDatabase" + }, + { + "type": "function", + "name": "clear_embedding_dirs", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "EmbeddingDatabase" + }, + { + "type": "function", + "name": "register_embedding", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "embedding", + "type": null + }, + { + "name": "model", + "type": null + } + ], + "return_type": "self.register_embedding_by_name(embedding, model, embedding.name)", + "parent": "EmbeddingDatabase" + }, + { + "type": "function", + "name": "register_embedding_by_name", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "embedding", + "type": null + }, + { + "name": "model", + "type": null + }, + { + "name": "name", + "type": null + } + ], + "return_type": "embedding", + "parent": "EmbeddingDatabase" + }, + { + "type": "function", + "name": "get_expected_shape", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "vec.shape[1]", + "parent": "EmbeddingDatabase" + }, + { + "type": "function", + "name": "load_from_file", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "path", + "type": null + }, + { + "name": "filename", + "type": null + } + ], + "return_type": null, + "parent": "EmbeddingDatabase" + }, + { + "type": "function", + "name": "load_from_dir", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "embdir", + "type": null + } + ], + "return_type": null, + "parent": "EmbeddingDatabase" + }, + { + "type": "function", + "name": "load_textual_inversion_embeddings", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "force_reload", + "type": null + } + ], + "return_type": null, + "parent": "EmbeddingDatabase" + }, + { + "type": "function", + "name": "find_embedding_at_position", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "tokens", + "type": null + }, + { + "name": "offset", + "type": null + } + ], + "return_type": "(None, None)", + "parent": "EmbeddingDatabase" + } + ], + "parent": null + }, + { + "type": "function", + "name": "create_embedding", + "args": [ + { + "name": "name", + "type": null + }, + { + "name": "num_vectors_per_token", + "type": null + }, + { + "name": "overwrite_old", + "type": null + }, + { + "name": "init_text", + "type": null + } + ], + "return_type": "fn", + "parent": null + }, + { + "type": "function", + "name": "write_loss", + "args": [ + { + "name": "log_directory", + "type": null + }, + { + "name": "filename", + "type": null + }, + { + "name": "step", + "type": null + }, + { + "name": "epoch_len", + "type": null + }, + { + "name": "values", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "tensorboard_setup", + "args": [ + { + "name": "log_directory", + "type": null + } + ], + "return_type": "SummaryWriter(log_dir=os.path.join(log_directory, 'tensorboard'),\n flush_secs=shared.opts.training_tensorboard_flush_every)", + "parent": null + }, + { + "type": "function", + "name": "tensorboard_add", + "args": [ + { + "name": "tensorboard_writer", + "type": null + }, + { + "name": "loss", + "type": null + }, + { + "name": "global_step", + "type": null + }, + { + "name": "step", + "type": null + }, + { + "name": "learn_rate", + "type": null + }, + { + "name": "epoch_num", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "tensorboard_add_scaler", + "args": [ + { + "name": "tensorboard_writer", + "type": null + }, + { + "name": "tag", + "type": null + }, + { + "name": "value", + "type": null + }, + { + "name": "step", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "tensorboard_add_image", + "args": [ + { + "name": "tensorboard_writer", + "type": null + }, + { + "name": "tag", + "type": null + }, + { + "name": "pil_image", + "type": null + }, + { + "name": "step", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "validate_train_inputs", + "args": [ + { + "name": "model_name", + "type": null + }, + { + "name": "learn_rate", + "type": null + }, + { + "name": "batch_size", + "type": null + }, + { + "name": "gradient_step", + "type": null + }, + { + "name": "data_root", + "type": null + }, + { + "name": "template_file", + "type": null + }, + { + "name": "template_filename", + "type": null + }, + { + "name": "steps", + "type": null + }, + { + "name": "save_model_every", + "type": null + }, + { + "name": "create_image_every", + "type": null + }, + { + "name": "log_directory", + "type": null + }, + { + "name": "name", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "train_embedding", + "args": [ + { + "name": "id_task", + "type": null + }, + { + "name": "embedding_name", + "type": null + }, + { + "name": "learn_rate", + "type": null + }, + { + "name": "batch_size", + "type": null + }, + { + "name": "gradient_step", + "type": null + }, + { + "name": "data_root", + "type": null + }, + { + "name": "log_directory", + "type": null + }, + { + "name": "training_width", + "type": null + }, + { + "name": "training_height", + "type": null + }, + { + "name": "varsize", + "type": null + }, + { + "name": "steps", + "type": null + }, + { + "name": "clip_grad_mode", + "type": null + }, + { + "name": "clip_grad_value", + "type": null + }, + { + "name": "shuffle_tags", + "type": null + }, + { + "name": "tag_drop_out", + "type": null + }, + { + "name": "latent_sampling_method", + "type": null + }, + { + "name": "use_weight", + "type": null + }, + { + "name": "create_image_every", + "type": null + }, + { + "name": "save_embedding_every", + "type": null + }, + { + "name": "template_filename", + "type": null + }, + { + "name": "save_image_with_stored_embedding", + "type": null + }, + { + "name": "preview_from_txt2img", + "type": null + }, + { + "name": "preview_prompt", + "type": null + }, + { + "name": "preview_negative_prompt", + "type": null + }, + { + "name": "preview_steps", + "type": null + }, + { + "name": "preview_sampler_index", + "type": null + }, + { + "name": "preview_cfg_scale", + "type": null + }, + { + "name": "preview_seed", + "type": null + }, + { + "name": "preview_width", + "type": null + }, + { + "name": "preview_height", + "type": null + } + ], + "return_type": "(embedding, filename)", + "parent": null + }, + { + "type": "function", + "name": "save_embedding", + "args": [ + { + "name": "embedding", + "type": null + }, + { + "name": "optimizer", + "type": null + }, + { + "name": "checkpoint", + "type": null + }, + { + "name": "embedding_name", + "type": null + }, + { + "name": "filename", + "type": null + }, + { + "name": "remove_cached_checksum", + "type": null + } + ], + "return_type": null, + "parent": null + } + ], + "modules/textual_inversion/ui.py": [ + { + "type": "function", + "name": "create_embedding", + "args": [ + { + "name": "name", + "type": null + }, + { + "name": "initialization_text", + "type": null + }, + { + "name": "nvpt", + "type": null + }, + { + "name": "overwrite_old", + "type": null + } + ], + "return_type": "(gr.Dropdown.update(choices=sorted(sd_hijack.model_hijack.embedding_db.\n word_embeddings.keys())), f'Created: {filename}', '')", + "parent": null + }, + { + "type": "function", + "name": "preprocess", + "args": [], + "return_type": "(f\"Preprocessing {'interrupted' if shared.state.interrupted else 'finished'}.\",\n '')", + "parent": null + }, + { + "type": "function", + "name": "train_embedding", + "args": [], + "return_type": "(res, '')", + "parent": null + } + ], + "modules/timer.py": [ + { + "type": "class", + "name": "TimerSubcategory", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "timer", + "type": null + }, + { + "name": "category", + "type": null + } + ], + "return_type": null, + "parent": "TimerSubcategory" + }, + { + "type": "function", + "name": "__enter__", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "TimerSubcategory" + }, + { + "type": "function", + "name": "__exit__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "exc_type", + "type": null + }, + { + "name": "exc_val", + "type": null + }, + { + "name": "exc_tb", + "type": null + } + ], + "return_type": null, + "parent": "TimerSubcategory" + } + ], + "parent": null + }, + { + "type": "class", + "name": "Timer", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "print_log", + "type": null + } + ], + "return_type": null, + "parent": "Timer" + }, + { + "type": "function", + "name": "elapsed", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "res", + "parent": "Timer" + }, + { + "type": "function", + "name": "add_time_to_record", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "category", + "type": null + }, + { + "name": "amount", + "type": null + } + ], + "return_type": null, + "parent": "Timer" + }, + { + "type": "function", + "name": "record", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "category", + "type": null + }, + { + "name": "extra_time", + "type": null + }, + { + "name": "disable_log", + "type": null + } + ], + "return_type": null, + "parent": "Timer" + }, + { + "type": "function", + "name": "subcategory", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "name", + "type": null + } + ], + "return_type": "subcat", + "parent": "Timer" + }, + { + "type": "function", + "name": "summary", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "res", + "parent": "Timer" + }, + { + "type": "function", + "name": "dump", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "{'total': self.total, 'records': self.records}", + "parent": "Timer" + }, + { + "type": "function", + "name": "reset", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "Timer" + } + ], + "parent": null + } + ], + "modules/txt2img.py": [ + { + "type": "function", + "name": "txt2img", + "args": [ + { + "name": "id_task", + "type": "str" + }, + { + "name": "prompt", + "type": "str" + }, + { + "name": "negative_prompt", + "type": "str" + }, + { + "name": "prompt_styles", + "type": null + }, + { + "name": "steps", + "type": "int" + }, + { + "name": "sampler_name", + "type": "str" + }, + { + "name": "n_iter", + "type": "int" + }, + { + "name": "batch_size", + "type": "int" + }, + { + "name": "cfg_scale", + "type": "float" + }, + { + "name": "height", + "type": "int" + }, + { + "name": "width", + "type": "int" + }, + { + "name": "enable_hr", + "type": "bool" + }, + { + "name": "denoising_strength", + "type": "float" + }, + { + "name": "hr_scale", + "type": "float" + }, + { + "name": "hr_upscaler", + "type": "str" + }, + { + "name": "hr_second_pass_steps", + "type": "int" + }, + { + "name": "hr_resize_x", + "type": "int" + }, + { + "name": "hr_resize_y", + "type": "int" + }, + { + "name": "hr_checkpoint_name", + "type": "str" + }, + { + "name": "hr_sampler_name", + "type": "str" + }, + { + "name": "hr_prompt", + "type": "str" + }, + { + "name": "hr_negative_prompt", + "type": null + }, + { + "name": "override_settings_texts", + "type": null + }, + { + "name": "request", + "type": "gr.Request" + } + ], + "return_type": "(processed.images, generation_info_js, plaintext_to_html(processed.info),\n plaintext_to_html(processed.comments, classname='comments'))", + "parent": null + } + ], + "modules/ui.py": [ + { + "type": "function", + "name": "gr_show", + "args": [ + { + "name": "visible", + "type": null + } + ], + "return_type": "{'visible': visible, '__type__': 'update'}", + "parent": null + }, + { + "type": "function", + "name": "send_gradio_gallery_to_image", + "args": [ + { + "name": "x", + "type": null + } + ], + "return_type": "image_from_url_text(x[0])", + "parent": null + }, + { + "type": "function", + "name": "calc_resolution_hires", + "args": [ + { + "name": "enable", + "type": null + }, + { + "name": "width", + "type": null + }, + { + "name": "height", + "type": null + }, + { + "name": "hr_scale", + "type": null + }, + { + "name": "hr_resize_x", + "type": null + }, + { + "name": "hr_resize_y", + "type": null + } + ], + "return_type": "f\"\"\"from {p.width}x{p.height} to {p.hr_resize_x or p.hr_upscale_to_x}x{p.hr_resize_y or p.hr_upscale_to_y}\"\"\"", + "parent": null + }, + { + "type": "function", + "name": "resize_from_to_html", + "args": [ + { + "name": "width", + "type": null + }, + { + "name": "height", + "type": null + }, + { + "name": "scale_by", + "type": null + } + ], + "return_type": "f\"\"\"resize: from {width}x{height} to {target_width}x{target_height}\"\"\"", + "parent": null + }, + { + "type": "function", + "name": "process_interrogate", + "args": [ + { + "name": "interrogation_function", + "type": null + }, + { + "name": "mode", + "type": null + }, + { + "name": "ii_input_dir", + "type": null + }, + { + "name": "ii_output_dir", + "type": null + } + ], + "return_type": "[interrogation_function(ii_singles[mode]), None]", + "parent": null + }, + { + "type": "function", + "name": "interrogate", + "args": [ + { + "name": "image", + "type": null + } + ], + "return_type": "(gr.update() if prompt is None else prompt)", + "parent": null + }, + { + "type": "function", + "name": "interrogate_deepbooru", + "args": [ + { + "name": "image", + "type": null + } + ], + "return_type": "(gr.update() if prompt is None else prompt)", + "parent": null + }, + { + "type": "function", + "name": "connect_clear_prompt", + "args": [ + { + "name": "button", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "update_token_counter", + "args": [ + { + "name": "text", + "type": null + }, + { + "name": "steps", + "type": null + } + ], + "return_type": "f\"\"\"{token_count}/{max_length}\"\"\"", + "parent": null + }, + { + "type": "class", + "name": "Toprow", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "is_img2img", + "type": null + } + ], + "return_type": null, + "parent": "Toprow" + } + ], + "parent": null + }, + { + "type": "function", + "name": "setup_progressbar", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "apply_setting", + "args": [ + { + "name": "key", + "type": null + }, + { + "name": "value", + "type": null + } + ], + "return_type": "getattr(opts, key)", + "parent": null + }, + { + "type": "function", + "name": "create_output_panel", + "args": [ + { + "name": "tabname", + "type": null + }, + { + "name": "outdir", + "type": null + } + ], + "return_type": "ui_common.create_output_panel(tabname, outdir)", + "parent": null + }, + { + "type": "function", + "name": "create_sampler_and_steps_selection", + "args": [ + { + "name": "choices", + "type": null + }, + { + "name": "tabname", + "type": null + } + ], + "return_type": "(steps, sampler_name)", + "parent": null + }, + { + "type": "function", + "name": "ordered_ui_categories", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "create_override_settings_dropdown", + "args": [ + { + "name": "tabname", + "type": null + }, + { + "name": "row", + "type": null + } + ], + "return_type": "dropdown", + "parent": null + }, + { + "type": "function", + "name": "create_ui", + "args": [], + "return_type": "demo", + "parent": null + }, + { + "type": "function", + "name": "versions_html", + "args": [], + "return_type": "f\"\"\"\nversion: {tag}\n \u2022 \npython: {python_version}\n \u2022 \ntorch: {getattr(torch, '__long_version__', torch.__version__)}\n \u2022 \nxformers: {xformers_version}\n \u2022 \ngradio: {gr.__version__}\n \u2022 \ncheckpoint: N/A\n\"\"\"", + "parent": null + }, + { + "type": "function", + "name": "setup_ui_api", + "args": [ + { + "name": "app", + "type": null + } + ], + "return_type": "[QuicksettingsHint(name=k, label=v.label) for k, v in opts.data_labels.items()]", + "parent": null + } + ], + "modules/ui_checkpoint_merger.py": [ + { + "type": "function", + "name": "update_interp_description", + "args": [ + { + "name": "value", + "type": null + } + ], + "return_type": "interp_descriptions[value]", + "parent": null + }, + { + "type": "function", + "name": "modelmerger", + "args": [], + "return_type": "results", + "parent": null + }, + { + "type": "class", + "name": "UiCheckpointMerger", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "UiCheckpointMerger" + }, + { + "type": "function", + "name": "setup_ui", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "dummy_component", + "type": null + }, + { + "name": "sd_model_checkpoint_component", + "type": null + } + ], + "return_type": null, + "parent": "UiCheckpointMerger" + } + ], + "parent": null + } + ], + "modules/ui_common.py": [ + { + "type": "function", + "name": "update_generation_info", + "args": [ + { + "name": "generation_info", + "type": null + }, + { + "name": "html_info", + "type": null + }, + { + "name": "img_index", + "type": null + } + ], + "return_type": "(html_info, gr.update())", + "parent": null + }, + { + "type": "function", + "name": "plaintext_to_html", + "args": [ + { + "name": "text", + "type": null + }, + { + "name": "classname", + "type": null + } + ], + "return_type": "(f\"

{content}

\" if classname else f'

{content}

')", + "parent": null + }, + { + "type": "function", + "name": "save_files", + "args": [ + { + "name": "js_data", + "type": null + }, + { + "name": "images", + "type": null + }, + { + "name": "do_make_zip", + "type": null + }, + { + "name": "index", + "type": null + } + ], + "return_type": "(gr.File.update(value=fullfns, visible=True), plaintext_to_html(\n f'Saved: {filenames[0]}'))", + "parent": null + }, + { + "type": "function", + "name": "create_output_panel", + "args": [ + { + "name": "tabname", + "type": null + }, + { + "name": "outdir", + "type": null + } + ], + "return_type": "(result_gallery, generation_info if tabname != 'extras' else html_info_x,\n html_info, html_log)", + "parent": null + }, + { + "type": "function", + "name": "create_refresh_button", + "args": [ + { + "name": "refresh_component", + "type": null + }, + { + "name": "refresh_method", + "type": null + }, + { + "name": "refreshed_args", + "type": null + }, + { + "name": "elem_id", + "type": null + } + ], + "return_type": "refresh_button", + "parent": null + }, + { + "type": "function", + "name": "setup_dialog", + "args": [ + { + "name": "button_show", + "type": null + }, + { + "name": "dialog", + "type": null + } + ], + "return_type": null, + "parent": null + } + ], + "modules/ui_components.py": [ + { + "type": "class", + "name": "FormComponent", + "methods": [ + { + "type": "function", + "name": "get_expected_parent", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "gr.components.Form", + "parent": "FormComponent" + } + ], + "parent": null + }, + { + "type": "class", + "name": "ToolButton", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "ToolButton" + }, + { + "type": "function", + "name": "get_block_name", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "\"\"\"button\"\"\"", + "parent": "ToolButton" + } + ], + "parent": null + }, + { + "type": "class", + "name": "ResizeHandleRow", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "ResizeHandleRow" + }, + { + "type": "function", + "name": "get_block_name", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "\"\"\"row\"\"\"", + "parent": "ResizeHandleRow" + } + ], + "parent": null + }, + { + "type": "class", + "name": "FormRow", + "methods": [ + { + "type": "function", + "name": "get_block_name", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "\"\"\"row\"\"\"", + "parent": "FormRow" + } + ], + "parent": null + }, + { + "type": "class", + "name": "FormColumn", + "methods": [ + { + "type": "function", + "name": "get_block_name", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "\"\"\"column\"\"\"", + "parent": "FormColumn" + } + ], + "parent": null + }, + { + "type": "class", + "name": "FormGroup", + "methods": [ + { + "type": "function", + "name": "get_block_name", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "\"\"\"group\"\"\"", + "parent": "FormGroup" + } + ], + "parent": null + }, + { + "type": "class", + "name": "FormHTML", + "methods": [ + { + "type": "function", + "name": "get_block_name", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "\"\"\"html\"\"\"", + "parent": "FormHTML" + } + ], + "parent": null + }, + { + "type": "class", + "name": "FormColorPicker", + "methods": [ + { + "type": "function", + "name": "get_block_name", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "\"\"\"colorpicker\"\"\"", + "parent": "FormColorPicker" + } + ], + "parent": null + }, + { + "type": "class", + "name": "DropdownMulti", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "DropdownMulti" + }, + { + "type": "function", + "name": "get_block_name", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "\"\"\"dropdown\"\"\"", + "parent": "DropdownMulti" + } + ], + "parent": null + }, + { + "type": "class", + "name": "DropdownEditable", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "DropdownEditable" + }, + { + "type": "function", + "name": "get_block_name", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "\"\"\"dropdown\"\"\"", + "parent": "DropdownEditable" + } + ], + "parent": null + }, + { + "type": "class", + "name": "InputAccordion", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "value", + "type": null + } + ], + "return_type": null, + "parent": "InputAccordion" + }, + { + "type": "function", + "name": "extra", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "gr.Column(elem_id=self.accordion_id + '-extra', elem_classes=\n 'input-accordion-extra', min_width=0)", + "parent": "InputAccordion" + }, + { + "type": "function", + "name": "__enter__", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "self", + "parent": "InputAccordion" + }, + { + "type": "function", + "name": "__exit__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "exc_type", + "type": null + }, + { + "name": "exc_val", + "type": null + }, + { + "name": "exc_tb", + "type": null + } + ], + "return_type": null, + "parent": "InputAccordion" + }, + { + "type": "function", + "name": "get_block_name", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "\"\"\"checkbox\"\"\"", + "parent": "InputAccordion" + } + ], + "parent": null + } + ], + "modules/ui_extensions.py": [ + { + "type": "function", + "name": "check_access", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "apply_and_restart", + "args": [ + { + "name": "disable_list", + "type": null + }, + { + "name": "update_list", + "type": null + }, + { + "name": "disable_all", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "save_config_state", + "args": [ + { + "name": "name", + "type": null + } + ], + "return_type": "(gr.Dropdown.update(value=new_value, choices=new_choices),\n f'Saved current webui/extension state to \"{filename}\"')", + "parent": null + }, + { + "type": "function", + "name": "restore_config_state", + "args": [ + { + "name": "confirmed", + "type": null + }, + { + "name": "config_state_name", + "type": null + }, + { + "name": "restore_type", + "type": null + } + ], + "return_type": "\"\"\"\"\"\"", + "parent": null + }, + { + "type": "function", + "name": "check_updates", + "args": [ + { + "name": "id_task", + "type": null + }, + { + "name": "disable_list", + "type": null + } + ], + "return_type": "(extension_table(), '')", + "parent": null + }, + { + "type": "function", + "name": "make_commit_link", + "args": [ + { + "name": "commit_hash", + "type": null + }, + { + "name": "remote", + "type": null + }, + { + "name": "text", + "type": null + } + ], + "return_type": "f\"\"\"{text}\"\"\"", + "parent": null + }, + { + "type": "function", + "name": "extension_table", + "args": [], + "return_type": "code", + "parent": null + }, + { + "type": "function", + "name": "update_config_states_table", + "args": [ + { + "name": "state_name", + "type": null + } + ], + "return_type": "code", + "parent": null + }, + { + "type": "function", + "name": "normalize_git_url", + "args": [ + { + "name": "url", + "type": null + } + ], + "return_type": "url", + "parent": null + }, + { + "type": "function", + "name": "install_extension_from_url", + "args": [ + { + "name": "dirname", + "type": null + }, + { + "name": "url", + "type": null + }, + { + "name": "branch_name", + "type": null + } + ], + "return_type": "[extension_table(), html.escape(\n f'Installed into {target_dir}. Use Installed tab to restart.')]", + "parent": null + }, + { + "type": "function", + "name": "install_extension_from_index", + "args": [ + { + "name": "url", + "type": null + }, + { + "name": "hide_tags", + "type": null + }, + { + "name": "sort_column", + "type": null + }, + { + "name": "filter_text", + "type": null + } + ], + "return_type": "(code, ext_table, message, '')", + "parent": null + }, + { + "type": "function", + "name": "refresh_available_extensions", + "args": [ + { + "name": "url", + "type": null + }, + { + "name": "hide_tags", + "type": null + }, + { + "name": "sort_column", + "type": null + } + ], + "return_type": "(url, code, gr.CheckboxGroup.update(choices=tags), '', '')", + "parent": null + }, + { + "type": "function", + "name": "refresh_available_extensions_for_tags", + "args": [ + { + "name": "hide_tags", + "type": null + }, + { + "name": "sort_column", + "type": null + }, + { + "name": "filter_text", + "type": null + } + ], + "return_type": "(code, '')", + "parent": null + }, + { + "type": "function", + "name": "search_extensions", + "args": [ + { + "name": "filter_text", + "type": null + }, + { + "name": "hide_tags", + "type": null + }, + { + "name": "sort_column", + "type": null + } + ], + "return_type": "(code, '')", + "parent": null + }, + { + "type": "function", + "name": "get_date", + "args": [ + { + "name": "info", + "type": "dict" + }, + { + "name": "key", + "type": null + } + ], + "return_type": "datetime.strptime(info.get(key), '%Y-%m-%dT%H:%M:%SZ').replace(tzinfo=\n timezone.utc).astimezone().strftime('%Y-%m-%d')", + "parent": null + }, + { + "type": "function", + "name": "refresh_available_extensions_from_data", + "args": [ + { + "name": "hide_tags", + "type": null + }, + { + "name": "sort_column", + "type": null + }, + { + "name": "filter_text", + "type": null + } + ], + "return_type": "(code, list(tags))", + "parent": null + }, + { + "type": "function", + "name": "preload_extensions_git_metadata", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "create_ui", + "args": [], + "return_type": "ui", + "parent": null + } + ], + "modules/ui_extra_networks.py": [ + { + "type": "function", + "name": "register_page", + "args": [ + { + "name": "page", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "fetch_file", + "args": [ + { + "name": "filename", + "type": "str" + } + ], + "return_type": "FileResponse(filename, headers={'Accept-Ranges': 'bytes'})", + "parent": null + }, + { + "type": "function", + "name": "get_metadata", + "args": [ + { + "name": "page", + "type": "str" + }, + { + "name": "item", + "type": "str" + } + ], + "return_type": "JSONResponse({'metadata': json.dumps(metadata, indent=4, ensure_ascii=False)})", + "parent": null + }, + { + "type": "function", + "name": "get_single_card", + "args": [ + { + "name": "page", + "type": "str" + }, + { + "name": "tabname", + "type": "str" + }, + { + "name": "name", + "type": "str" + } + ], + "return_type": "JSONResponse({'html': item_html})", + "parent": null + }, + { + "type": "function", + "name": "add_pages_to_demo", + "args": [ + { + "name": "app", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "quote_js", + "args": [ + { + "name": "s", + "type": null + } + ], + "return_type": "f\"\"\"\"{s}\\\"\"\"\"", + "parent": null + }, + { + "type": "class", + "name": "ExtraNetworksPage", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "title", + "type": null + } + ], + "return_type": null, + "parent": "ExtraNetworksPage" + }, + { + "type": "function", + "name": "refresh", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "ExtraNetworksPage" + }, + { + "type": "function", + "name": "read_user_metadata", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "item", + "type": null + } + ], + "return_type": null, + "parent": "ExtraNetworksPage" + }, + { + "type": "function", + "name": "link_preview", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "filename", + "type": null + } + ], + "return_type": "f\"\"\"./sd_extra_networks/thumb?filename={quoted_filename}&mtime={mtime}\"\"\"", + "parent": "ExtraNetworksPage" + }, + { + "type": "function", + "name": "search_terms_from_path", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "filename", + "type": null + }, + { + "name": "possible_directories", + "type": null + } + ], + "return_type": "\"\"\"\"\"\"", + "parent": "ExtraNetworksPage" + }, + { + "type": "function", + "name": "create_html", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "tabname", + "type": null + } + ], + "return_type": "res", + "parent": "ExtraNetworksPage" + }, + { + "type": "function", + "name": "create_item", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "name", + "type": null + }, + { + "name": "index", + "type": null + } + ], + "return_type": null, + "parent": "ExtraNetworksPage" + }, + { + "type": "function", + "name": "list_items", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "ExtraNetworksPage" + }, + { + "type": "function", + "name": "allowed_directories_for_previews", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "[]", + "parent": "ExtraNetworksPage" + }, + { + "type": "function", + "name": "create_html_for_item", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "item", + "type": null + }, + { + "name": "tabname", + "type": null + } + ], + "return_type": "self.card_page.format(**args)", + "parent": "ExtraNetworksPage" + }, + { + "type": "function", + "name": "get_sort_keys", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "path", + "type": null + } + ], + "return_type": "{'date_created': int(stat.st_ctime or 0), 'date_modified': int(stat.\n st_mtime or 0), 'name': pth.name.lower()}", + "parent": "ExtraNetworksPage" + }, + { + "type": "function", + "name": "find_preview", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "path", + "type": null + } + ], + "return_type": "None", + "parent": "ExtraNetworksPage" + }, + { + "type": "function", + "name": "find_description", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "path", + "type": null + } + ], + "return_type": "None", + "parent": "ExtraNetworksPage" + }, + { + "type": "function", + "name": "create_user_metadata_editor", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "ui", + "type": null + }, + { + "name": "tabname", + "type": null + } + ], + "return_type": "ui_extra_networks_user_metadata.UserMetadataEditor(ui, tabname, self)", + "parent": "ExtraNetworksPage" + } + ], + "parent": null + }, + { + "type": "function", + "name": "initialize", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "register_default_pages", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "class", + "name": "ExtraNetworksUi", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "ExtraNetworksUi" + } + ], + "parent": null + }, + { + "type": "function", + "name": "pages_in_preferred_order", + "args": [ + { + "name": "pages", + "type": null + } + ], + "return_type": "sorted(pages, key=lambda x: tab_scores[x.name])", + "parent": null + }, + { + "type": "function", + "name": "create_ui", + "args": [ + { + "name": "interface", + "type": "gr.Blocks" + }, + { + "name": "unrelated_tabs", + "type": null + }, + { + "name": "tabname", + "type": null + } + ], + "return_type": "ui", + "parent": null + }, + { + "type": "function", + "name": "path_is_parent", + "args": [ + { + "name": "parent_path", + "type": null + }, + { + "name": "child_path", + "type": null + } + ], + "return_type": "child_path.startswith(parent_path)", + "parent": null + }, + { + "type": "function", + "name": "setup_ui", + "args": [ + { + "name": "ui", + "type": null + }, + { + "name": "gallery", + "type": null + } + ], + "return_type": "[page.create_html(ui.tabname) for page in ui.stored_extra_pages]", + "parent": null + } + ], + "modules/ui_extra_networks_checkpoints.py": [ + { + "type": "class", + "name": "ExtraNetworksPageCheckpoints", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "ExtraNetworksPageCheckpoints" + }, + { + "type": "function", + "name": "refresh", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "ExtraNetworksPageCheckpoints" + }, + { + "type": "function", + "name": "create_item", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "name", + "type": null + }, + { + "name": "index", + "type": null + }, + { + "name": "enable_filter", + "type": null + } + ], + "return_type": "{'name': checkpoint.name_for_extra, 'filename': checkpoint.filename,\n 'shorthash': checkpoint.shorthash, 'preview': self.find_preview(path),\n 'description': self.find_description(path), 'search_term': self.\n search_terms_from_path(checkpoint.filename) + ' ' + (checkpoint.sha256 or\n ''), 'onclick': '\"' + html.escape(\n f'return selectCheckpoint({quote_js(name)})') + '\"', 'local_preview':\n f'{path}.{shared.opts.samples_format}', 'metadata': checkpoint.metadata,\n 'sort_keys': {'default': index, **self.get_sort_keys(checkpoint.filename)}}", + "parent": "ExtraNetworksPageCheckpoints" + }, + { + "type": "function", + "name": "list_items", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "ExtraNetworksPageCheckpoints" + }, + { + "type": "function", + "name": "allowed_directories_for_previews", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "[v for v in [shared.cmd_opts.ckpt_dir, sd_models.model_path] if v is not None]", + "parent": "ExtraNetworksPageCheckpoints" + }, + { + "type": "function", + "name": "create_user_metadata_editor", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "ui", + "type": null + }, + { + "name": "tabname", + "type": null + } + ], + "return_type": "CheckpointUserMetadataEditor(ui, tabname, self)", + "parent": "ExtraNetworksPageCheckpoints" + } + ], + "parent": null + } + ], + "modules/ui_extra_networks_checkpoints_user_metadata.py": [ + { + "type": "class", + "name": "CheckpointUserMetadataEditor", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "ui", + "type": null + }, + { + "name": "tabname", + "type": null + }, + { + "name": "page", + "type": null + } + ], + "return_type": null, + "parent": "CheckpointUserMetadataEditor" + }, + { + "type": "function", + "name": "save_user_metadata", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "name", + "type": null + }, + { + "name": "desc", + "type": null + }, + { + "name": "notes", + "type": null + }, + { + "name": "vae", + "type": null + } + ], + "return_type": null, + "parent": "CheckpointUserMetadataEditor" + }, + { + "type": "function", + "name": "update_vae", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "name", + "type": null + } + ], + "return_type": null, + "parent": "CheckpointUserMetadataEditor" + }, + { + "type": "function", + "name": "put_values_into_components", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "name", + "type": null + } + ], + "return_type": "[*values[0:5], user_metadata.get('vae', '')]", + "parent": "CheckpointUserMetadataEditor" + }, + { + "type": "function", + "name": "create_editor", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "CheckpointUserMetadataEditor" + } + ], + "parent": null + } + ], + "modules/ui_extra_networks_hypernets.py": [ + { + "type": "class", + "name": "ExtraNetworksPageHypernetworks", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "ExtraNetworksPageHypernetworks" + }, + { + "type": "function", + "name": "refresh", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "ExtraNetworksPageHypernetworks" + }, + { + "type": "function", + "name": "create_item", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "name", + "type": null + }, + { + "name": "index", + "type": null + }, + { + "name": "enable_filter", + "type": null + } + ], + "return_type": "{'name': name, 'filename': full_path, 'shorthash': shorthash, 'preview':\n self.find_preview(path), 'description': self.find_description(path),\n 'search_term': self.search_terms_from_path(path) + ' ' + (sha256 or ''),\n 'prompt': quote_js(f''),\n 'local_preview': f'{path}.preview.{shared.opts.samples_format}',\n 'sort_keys': {'default': index, **self.get_sort_keys(path + ext)}}", + "parent": "ExtraNetworksPageHypernetworks" + }, + { + "type": "function", + "name": "list_items", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "ExtraNetworksPageHypernetworks" + }, + { + "type": "function", + "name": "allowed_directories_for_previews", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "[shared.cmd_opts.hypernetwork_dir]", + "parent": "ExtraNetworksPageHypernetworks" + } + ], + "parent": null + } + ], + "modules/ui_extra_networks_textual_inversion.py": [ + { + "type": "class", + "name": "ExtraNetworksPageTextualInversion", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "ExtraNetworksPageTextualInversion" + }, + { + "type": "function", + "name": "refresh", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "ExtraNetworksPageTextualInversion" + }, + { + "type": "function", + "name": "create_item", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "name", + "type": null + }, + { + "name": "index", + "type": null + }, + { + "name": "enable_filter", + "type": null + } + ], + "return_type": "{'name': name, 'filename': embedding.filename, 'shorthash': embedding.\n shorthash, 'preview': self.find_preview(path), 'description': self.\n find_description(path), 'search_term': self.search_terms_from_path(\n embedding.filename) + ' ' + (embedding.hash or ''), 'prompt': quote_js(\n embedding.name), 'local_preview':\n f'{path}.preview.{shared.opts.samples_format}', 'sort_keys': {'default':\n index, **self.get_sort_keys(embedding.filename)}}", + "parent": "ExtraNetworksPageTextualInversion" + }, + { + "type": "function", + "name": "list_items", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "ExtraNetworksPageTextualInversion" + }, + { + "type": "function", + "name": "allowed_directories_for_previews", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "list(sd_hijack.model_hijack.embedding_db.embedding_dirs)", + "parent": "ExtraNetworksPageTextualInversion" + } + ], + "parent": null + } + ], + "modules/ui_extra_networks_user_metadata.py": [ + { + "type": "class", + "name": "UserMetadataEditor", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "ui", + "type": null + }, + { + "name": "tabname", + "type": null + }, + { + "name": "page", + "type": null + } + ], + "return_type": null, + "parent": "UserMetadataEditor" + }, + { + "type": "function", + "name": "get_user_metadata", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "name", + "type": null + } + ], + "return_type": "user_metadata", + "parent": "UserMetadataEditor" + }, + { + "type": "function", + "name": "create_extra_default_items_in_left_column", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "UserMetadataEditor" + }, + { + "type": "function", + "name": "create_default_editor_elems", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "UserMetadataEditor" + }, + { + "type": "function", + "name": "create_default_buttons", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "UserMetadataEditor" + }, + { + "type": "function", + "name": "get_card_html", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "name", + "type": null + } + ], + "return_type": "preview", + "parent": "UserMetadataEditor" + }, + { + "type": "function", + "name": "relative_path", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "path", + "type": null + } + ], + "return_type": "os.path.basename(path)", + "parent": "UserMetadataEditor" + }, + { + "type": "function", + "name": "get_metadata_table", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "name", + "type": null + } + ], + "return_type": "params", + "parent": "UserMetadataEditor" + }, + { + "type": "function", + "name": "put_values_into_components", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "name", + "type": null + } + ], + "return_type": "(html.escape(name), user_metadata.get('description', ''), table, self.\n get_card_html(name), user_metadata.get('notes', ''))", + "parent": "UserMetadataEditor" + }, + { + "type": "function", + "name": "write_user_metadata", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "name", + "type": null + }, + { + "name": "metadata", + "type": null + } + ], + "return_type": null, + "parent": "UserMetadataEditor" + }, + { + "type": "function", + "name": "save_user_metadata", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "name", + "type": null + }, + { + "name": "desc", + "type": null + }, + { + "name": "notes", + "type": null + } + ], + "return_type": null, + "parent": "UserMetadataEditor" + }, + { + "type": "function", + "name": "setup_save_handler", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "button", + "type": null + }, + { + "name": "func", + "type": null + }, + { + "name": "components", + "type": null + } + ], + "return_type": null, + "parent": "UserMetadataEditor" + }, + { + "type": "function", + "name": "create_editor", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "UserMetadataEditor" + }, + { + "type": "function", + "name": "create_ui", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "UserMetadataEditor" + }, + { + "type": "function", + "name": "save_preview", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "index", + "type": null + }, + { + "name": "gallery", + "type": null + }, + { + "name": "name", + "type": null + } + ], + "return_type": "(self.get_card_html(name), '')", + "parent": "UserMetadataEditor" + }, + { + "type": "function", + "name": "setup_ui", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "gallery", + "type": null + } + ], + "return_type": null, + "parent": "UserMetadataEditor" + } + ], + "parent": null + } + ], + "modules/ui_gradio_extensions.py": [ + { + "type": "function", + "name": "webpath", + "args": [ + { + "name": "fn", + "type": null + } + ], + "return_type": "f\"\"\"file={web_path}?{os.path.getmtime(fn)}\"\"\"", + "parent": null + }, + { + "type": "function", + "name": "javascript_html", + "args": [], + "return_type": "head", + "parent": null + }, + { + "type": "function", + "name": "css_html", + "args": [], + "return_type": "head", + "parent": null + }, + { + "type": "function", + "name": "reload_javascript", + "args": [], + "return_type": "res", + "parent": null + } + ], + "modules/ui_loadsave.py": [ + { + "type": "function", + "name": "radio_choices", + "args": [ + { + "name": "comp", + "type": null + } + ], + "return_type": "[(x[0] if isinstance(x, tuple) else x) for x in getattr(comp, 'choices', [])]", + "parent": null + }, + { + "type": "class", + "name": "UiLoadsave", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "filename", + "type": null + } + ], + "return_type": null, + "parent": "UiLoadsave" + }, + { + "type": "function", + "name": "add_component", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "path", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "(tab_id in tab_ids)", + "parent": "UiLoadsave" + }, + { + "type": "function", + "name": "add_block", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "path", + "type": null + } + ], + "return_type": null, + "parent": "UiLoadsave" + }, + { + "type": "function", + "name": "read_from_file", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "json.load(file)", + "parent": "UiLoadsave" + }, + { + "type": "function", + "name": "write_to_file", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "current_ui_settings", + "type": null + } + ], + "return_type": null, + "parent": "UiLoadsave" + }, + { + "type": "function", + "name": "dump_defaults", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "UiLoadsave" + }, + { + "type": "function", + "name": "iter_changes", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "current_ui_settings", + "type": null + }, + { + "name": "values", + "type": null + } + ], + "return_type": null, + "parent": "UiLoadsave" + }, + { + "type": "function", + "name": "ui_view", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "\"\"\"\"\"\".join(text)", + "parent": "UiLoadsave" + }, + { + "type": "function", + "name": "ui_apply", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "f\"\"\"Wrote {num_changed} changes.\"\"\"", + "parent": "UiLoadsave" + }, + { + "type": "function", + "name": "create_ui", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "UiLoadsave" + }, + { + "type": "function", + "name": "setup_ui", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "UiLoadsave" + } + ], + "parent": null + } + ], + "modules/ui_postprocessing.py": [ + { + "type": "function", + "name": "create_ui", + "args": [], + "return_type": null, + "parent": null + } + ], + "modules/ui_prompt_styles.py": [ + { + "type": "function", + "name": "select_style", + "args": [ + { + "name": "name", + "type": null + } + ], + "return_type": "(prompt, negative_prompt, gr.update(visible=existing), gr.update(visible=\n not empty))", + "parent": null + }, + { + "type": "function", + "name": "save_style", + "args": [ + { + "name": "name", + "type": null + }, + { + "name": "prompt", + "type": null + }, + { + "name": "negative_prompt", + "type": null + } + ], + "return_type": "gr.update(visible=True)", + "parent": null + }, + { + "type": "function", + "name": "delete_style", + "args": [ + { + "name": "name", + "type": null + } + ], + "return_type": "('', '', '')", + "parent": null + }, + { + "type": "function", + "name": "materialize_styles", + "args": [ + { + "name": "prompt", + "type": null + }, + { + "name": "negative_prompt", + "type": null + }, + { + "name": "styles", + "type": null + } + ], + "return_type": "[gr.Textbox.update(value=prompt), gr.Textbox.update(value=negative_prompt),\n gr.Dropdown.update(value=[])]", + "parent": null + }, + { + "type": "function", + "name": "refresh_styles", + "args": [], + "return_type": "(gr.update(choices=list(shared.prompt_styles.styles)), gr.update(choices=\n list(shared.prompt_styles.styles)))", + "parent": null + }, + { + "type": "class", + "name": "UiPromptStyles", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "tabname", + "type": null + }, + { + "name": "main_ui_prompt", + "type": null + }, + { + "name": "main_ui_negative_prompt", + "type": null + } + ], + "return_type": null, + "parent": "UiPromptStyles" + } + ], + "parent": null + } + ], + "modules/ui_settings.py": [ + { + "type": "function", + "name": "get_value_for_setting", + "args": [ + { + "name": "key", + "type": null + } + ], + "return_type": "gr.update(value=value, **args)", + "parent": null + }, + { + "type": "function", + "name": "create_setting_component", + "args": [ + { + "name": "key", + "type": null + }, + { + "name": "is_quicksettings", + "type": null + } + ], + "return_type": "res", + "parent": null + }, + { + "type": "class", + "name": "UiSettings", + "methods": [ + { + "type": "function", + "name": "run_settings", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "(opts.dumpjson(),\n f\"{len(changed)} settings changed{': ' if changed else ''}{', '.join(changed)}.\"\n )", + "parent": "UiSettings" + }, + { + "type": "function", + "name": "run_settings_single", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "value", + "type": null + }, + { + "name": "key", + "type": null + } + ], + "return_type": "(get_value_for_setting(key), opts.dumpjson())", + "parent": "UiSettings" + }, + { + "type": "function", + "name": "create_ui", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "loadsave", + "type": null + }, + { + "name": "dummy_component", + "type": null + } + ], + "return_type": "\"\"\"Invalid\"\"\"", + "parent": "UiSettings" + }, + { + "type": "function", + "name": "add_quicksettings", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "UiSettings" + }, + { + "type": "function", + "name": "add_functionality", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "demo", + "type": null + } + ], + "return_type": "[get_value_for_setting(key) for key in component_keys]", + "parent": "UiSettings" + } + ], + "parent": null + } + ], + "modules/ui_tempdir.py": [ + { + "type": "function", + "name": "register_tmp_file", + "args": [ + { + "name": "gradio", + "type": null + }, + { + "name": "filename", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "check_tmp_file", + "args": [ + { + "name": "gradio", + "type": null + }, + { + "name": "filename", + "type": null + } + ], + "return_type": "(False)", + "parent": null + }, + { + "type": "function", + "name": "save_pil_to_file", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "pil_image", + "type": null + }, + { + "name": "dir", + "type": null + }, + { + "name": "format", + "type": null + } + ], + "return_type": "file_obj.name", + "parent": null + }, + { + "type": "function", + "name": "install_ui_tempdir_override", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "on_tmpdir_changed", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "cleanup_tmpdr", + "args": [], + "return_type": null, + "parent": null + } + ], + "modules/upscaler.py": [ + { + "type": "class", + "name": "Upscaler", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "create_dirs", + "type": null + } + ], + "return_type": null, + "parent": "Upscaler" + }, + { + "type": "function", + "name": "do_upscale", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "img", + "type": "PIL.Image" + }, + { + "name": "selected_model", + "type": "str" + } + ], + "return_type": "img", + "parent": "Upscaler" + }, + { + "type": "function", + "name": "upscale", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "img", + "type": "PIL.Image" + }, + { + "name": "scale", + "type": null + }, + { + "name": "selected_model", + "type": "str" + } + ], + "return_type": "img", + "parent": "Upscaler" + }, + { + "type": "function", + "name": "load_model", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "path", + "type": "str" + } + ], + "return_type": null, + "parent": "Upscaler" + }, + { + "type": "function", + "name": "find_models", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "ext_filter", + "type": null + } + ], + "return_type": "modelloader.load_models(model_path=self.model_path, model_url=self.\n model_url, command_path=self.user_path, ext_filter=ext_filter)", + "parent": "Upscaler" + }, + { + "type": "function", + "name": "update_status", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "prompt", + "type": null + } + ], + "return_type": null, + "parent": "Upscaler" + } + ], + "parent": null + }, + { + "type": "class", + "name": "UpscalerData", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "name", + "type": "str" + }, + { + "name": "path", + "type": "str" + }, + { + "name": "upscaler", + "type": "Upscaler" + }, + { + "name": "scale", + "type": "int" + }, + { + "name": "model", + "type": null + } + ], + "return_type": null, + "parent": "UpscalerData" + } + ], + "parent": null + }, + { + "type": "class", + "name": "UpscalerNone", + "methods": [ + { + "type": "function", + "name": "load_model", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "path", + "type": null + } + ], + "return_type": null, + "parent": "UpscalerNone" + }, + { + "type": "function", + "name": "do_upscale", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "img", + "type": null + }, + { + "name": "selected_model", + "type": null + } + ], + "return_type": "img", + "parent": "UpscalerNone" + }, + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "dirname", + "type": null + } + ], + "return_type": null, + "parent": "UpscalerNone" + } + ], + "parent": null + }, + { + "type": "class", + "name": "UpscalerLanczos", + "methods": [ + { + "type": "function", + "name": "do_upscale", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "img", + "type": null + }, + { + "name": "selected_model", + "type": null + } + ], + "return_type": "img.resize((int(img.width * self.scale), int(img.height * self.scale)),\n resample=LANCZOS)", + "parent": "UpscalerLanczos" + }, + { + "type": "function", + "name": "load_model", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "_", + "type": null + } + ], + "return_type": null, + "parent": "UpscalerLanczos" + }, + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "dirname", + "type": null + } + ], + "return_type": null, + "parent": "UpscalerLanczos" + } + ], + "parent": null + }, + { + "type": "class", + "name": "UpscalerNearest", + "methods": [ + { + "type": "function", + "name": "do_upscale", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "img", + "type": null + }, + { + "name": "selected_model", + "type": null + } + ], + "return_type": "img.resize((int(img.width * self.scale), int(img.height * self.scale)),\n resample=NEAREST)", + "parent": "UpscalerNearest" + }, + { + "type": "function", + "name": "load_model", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "_", + "type": null + } + ], + "return_type": null, + "parent": "UpscalerNearest" + }, + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "dirname", + "type": null + } + ], + "return_type": null, + "parent": "UpscalerNearest" + } + ], + "parent": null + } + ], + "modules/util.py": [ + { + "type": "function", + "name": "natural_sort_key", + "args": [ + { + "name": "s", + "type": null + }, + { + "name": "regex", + "type": null + } + ], + "return_type": "[(int(text) if text.isdigit() else text.lower()) for text in regex.split(s)]", + "parent": null + }, + { + "type": "function", + "name": "listfiles", + "args": [ + { + "name": "dirname", + "type": null + } + ], + "return_type": "[file for file in filenames if os.path.isfile(file)]", + "parent": null + }, + { + "type": "function", + "name": "html_path", + "args": [ + { + "name": "filename", + "type": null + } + ], + "return_type": "os.path.join(script_path, 'html', filename)", + "parent": null + }, + { + "type": "function", + "name": "html", + "args": [ + { + "name": "filename", + "type": null + } + ], + "return_type": "\"\"\"\"\"\"", + "parent": null + }, + { + "type": "function", + "name": "walk_files", + "args": [ + { + "name": "path", + "type": null + }, + { + "name": "allowed_extensions", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "ldm_print", + "args": [], + "return_type": null, + "parent": null + } + ], + "modules/xlmr.py": [ + { + "type": "class", + "name": "BertSeriesConfig", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "vocab_size", + "type": null + }, + { + "name": "hidden_size", + "type": null + }, + { + "name": "num_hidden_layers", + "type": null + }, + { + "name": "num_attention_heads", + "type": null + }, + { + "name": "intermediate_size", + "type": null + }, + { + "name": "hidden_act", + "type": null + }, + { + "name": "hidden_dropout_prob", + "type": null + }, + { + "name": "attention_probs_dropout_prob", + "type": null + }, + { + "name": "max_position_embeddings", + "type": null + }, + { + "name": "type_vocab_size", + "type": null + }, + { + "name": "initializer_range", + "type": null + }, + { + "name": "layer_norm_eps", + "type": null + }, + { + "name": "pad_token_id", + "type": null + }, + { + "name": "position_embedding_type", + "type": null + }, + { + "name": "use_cache", + "type": null + }, + { + "name": "classifier_dropout", + "type": null + }, + { + "name": "project_dim", + "type": null + }, + { + "name": "pooler_fn", + "type": null + }, + { + "name": "learn_encoder", + "type": null + }, + { + "name": "model_type", + "type": null + } + ], + "return_type": null, + "parent": "BertSeriesConfig" + } + ], + "parent": null + }, + { + "type": "class", + "name": "RobertaSeriesConfig", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "pad_token_id", + "type": null + }, + { + "name": "bos_token_id", + "type": null + }, + { + "name": "eos_token_id", + "type": null + }, + { + "name": "project_dim", + "type": null + }, + { + "name": "pooler_fn", + "type": null + }, + { + "name": "learn_encoder", + "type": null + } + ], + "return_type": null, + "parent": "RobertaSeriesConfig" + } + ], + "parent": null + }, + { + "type": "class", + "name": "BertSeriesModelWithTransformation", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "config", + "type": null + } + ], + "return_type": null, + "parent": "BertSeriesModelWithTransformation" + }, + { + "type": "function", + "name": "encode", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "c", + "type": null + } + ], + "return_type": "features['projection_state']", + "parent": "BertSeriesModelWithTransformation" + }, + { + "type": "function", + "name": "forward", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "input_ids", + "type": "Optional[torch.Tensor]" + }, + { + "name": "attention_mask", + "type": "Optional[torch.Tensor]" + }, + { + "name": "token_type_ids", + "type": "Optional[torch.Tensor]" + }, + { + "name": "position_ids", + "type": "Optional[torch.Tensor]" + }, + { + "name": "head_mask", + "type": "Optional[torch.Tensor]" + }, + { + "name": "inputs_embeds", + "type": "Optional[torch.Tensor]" + }, + { + "name": "encoder_hidden_states", + "type": "Optional[torch.Tensor]" + }, + { + "name": "encoder_attention_mask", + "type": "Optional[torch.Tensor]" + }, + { + "name": "output_attentions", + "type": "Optional[bool]" + }, + { + "name": "return_dict", + "type": "Optional[bool]" + }, + { + "name": "output_hidden_states", + "type": "Optional[bool]" + } + ], + "return_type": "{'pooler_output': pooler_output, 'last_hidden_state': outputs.\n last_hidden_state, 'hidden_states': outputs.hidden_states, 'attentions':\n outputs.attentions, 'projection_state': projection_state,\n 'sequence_out': sequence_output}", + "parent": "BertSeriesModelWithTransformation" + } + ], + "parent": null + }, + { + "type": "class", + "name": "RobertaSeriesModelWithTransformation", + "methods": [], + "parent": null + } + ], + "script.js": { + "info": "Detailed JavaScript analysis not implemented in this version." + }, + "scripts/custom_code.py": [ + { + "type": "function", + "name": "convertExpr2Expression", + "args": [ + { + "name": "expr", + "type": null + } + ], + "return_type": "result", + "parent": null + }, + { + "type": "function", + "name": "exec_with_return", + "args": [ + { + "name": "code", + "type": null + }, + { + "name": "module", + "type": null + } + ], + "return_type": "eval(compile(convertExpr2Expression(last_ast.body[0]), '', 'eval'),\n module.__dict__)", + "parent": null + }, + { + "type": "class", + "name": "Script", + "methods": [ + { + "type": "function", + "name": "title", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "\"\"\"Custom code\"\"\"", + "parent": "Script" + }, + { + "type": "function", + "name": "show", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "is_img2img", + "type": null + } + ], + "return_type": "cmd_opts.allow_code", + "parent": "Script" + }, + { + "type": "function", + "name": "ui", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "is_img2img", + "type": null + } + ], + "return_type": "[code, indent_level]", + "parent": "Script" + }, + { + "type": "function", + "name": "run", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": null + }, + { + "name": "code", + "type": null + }, + { + "name": "indent_level", + "type": null + } + ], + "return_type": "Processed(p, *display_result_data)", + "parent": "Script" + } + ], + "parent": null + } + ], + "scripts/img2imgalt.py": [ + { + "type": "function", + "name": "find_noise_for_image", + "args": [ + { + "name": "p", + "type": null + }, + { + "name": "cond", + "type": null + }, + { + "name": "uncond", + "type": null + }, + { + "name": "cfg_scale", + "type": null + }, + { + "name": "steps", + "type": null + } + ], + "return_type": "(x / x.std())", + "parent": null + }, + { + "type": "function", + "name": "find_noise_for_image_sigma_adjustment", + "args": [ + { + "name": "p", + "type": null + }, + { + "name": "cond", + "type": null + }, + { + "name": "uncond", + "type": null + }, + { + "name": "cfg_scale", + "type": null + }, + { + "name": "steps", + "type": null + } + ], + "return_type": "(x / sigmas[-1])", + "parent": null + }, + { + "type": "class", + "name": "Script", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "Script" + }, + { + "type": "function", + "name": "title", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "\"\"\"img2img alternative test\"\"\"", + "parent": "Script" + }, + { + "type": "function", + "name": "show", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "is_img2img", + "type": null + } + ], + "return_type": "is_img2img", + "parent": "Script" + }, + { + "type": "function", + "name": "ui", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "is_img2img", + "type": null + } + ], + "return_type": "[info, override_sampler, override_prompt, original_prompt,\n original_negative_prompt, override_steps, st, override_strength, cfg,\n randomness, sigma_adjustment]", + "parent": "Script" + }, + { + "type": "function", + "name": "run", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": null + }, + { + "name": "_", + "type": null + }, + { + "name": "override_sampler", + "type": null + }, + { + "name": "override_prompt", + "type": null + }, + { + "name": "original_prompt", + "type": null + }, + { + "name": "original_negative_prompt", + "type": null + }, + { + "name": "override_steps", + "type": null + }, + { + "name": "st", + "type": null + }, + { + "name": "override_strength", + "type": null + }, + { + "name": "cfg", + "type": null + }, + { + "name": "randomness", + "type": null + }, + { + "name": "sigma_adjustment", + "type": null + } + ], + "return_type": "processed", + "parent": "Script" + } + ], + "parent": null + } + ], + "scripts/loopback.py": [ + { + "type": "class", + "name": "Script", + "methods": [ + { + "type": "function", + "name": "title", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "\"\"\"Loopback\"\"\"", + "parent": "Script" + }, + { + "type": "function", + "name": "show", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "is_img2img", + "type": null + } + ], + "return_type": "is_img2img", + "parent": "Script" + }, + { + "type": "function", + "name": "ui", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "is_img2img", + "type": null + } + ], + "return_type": "[loops, final_denoising_strength, denoising_curve, append_interrogation]", + "parent": "Script" + }, + { + "type": "function", + "name": "run", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": null + }, + { + "name": "loops", + "type": null + }, + { + "name": "final_denoising_strength", + "type": null + }, + { + "name": "denoising_curve", + "type": null + }, + { + "name": "append_interrogation", + "type": null + } + ], + "return_type": "processed", + "parent": "Script" + } + ], + "parent": null + } + ], + "scripts/outpainting_mk_2.py": [ + { + "type": "function", + "name": "get_matched_noise", + "args": [ + { + "name": "_np_src_image", + "type": null + }, + { + "name": "np_mask_rgb", + "type": null + }, + { + "name": "noise_q", + "type": null + }, + { + "name": "color_variation", + "type": null + } + ], + "return_type": "np.clip(matched_noise, 0.0, 1.0)", + "parent": null + }, + { + "type": "class", + "name": "Script", + "methods": [ + { + "type": "function", + "name": "title", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "\"\"\"Outpainting mk2\"\"\"", + "parent": "Script" + }, + { + "type": "function", + "name": "show", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "is_img2img", + "type": null + } + ], + "return_type": "is_img2img", + "parent": "Script" + }, + { + "type": "function", + "name": "ui", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "is_img2img", + "type": null + } + ], + "return_type": "[info, pixels, mask_blur, direction, noise_q, color_variation]", + "parent": "Script" + }, + { + "type": "function", + "name": "run", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": null + }, + { + "name": "_", + "type": null + }, + { + "name": "pixels", + "type": null + }, + { + "name": "mask_blur", + "type": null + }, + { + "name": "direction", + "type": null + }, + { + "name": "noise_q", + "type": null + }, + { + "name": "color_variation", + "type": null + } + ], + "return_type": "res", + "parent": "Script" + } + ], + "parent": null + } + ], + "scripts/poor_mans_outpainting.py": [ + { + "type": "class", + "name": "Script", + "methods": [ + { + "type": "function", + "name": "title", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "\"\"\"Poor man's outpainting\"\"\"", + "parent": "Script" + }, + { + "type": "function", + "name": "show", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "is_img2img", + "type": null + } + ], + "return_type": "is_img2img", + "parent": "Script" + }, + { + "type": "function", + "name": "ui", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "is_img2img", + "type": null + } + ], + "return_type": "[pixels, mask_blur, inpainting_fill, direction]", + "parent": "Script" + }, + { + "type": "function", + "name": "run", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": null + }, + { + "name": "pixels", + "type": null + }, + { + "name": "mask_blur", + "type": null + }, + { + "name": "inpainting_fill", + "type": null + }, + { + "name": "direction", + "type": null + } + ], + "return_type": "processed", + "parent": "Script" + } + ], + "parent": null + } + ], + "scripts/postprocessing_codeformer.py": [ + { + "type": "class", + "name": "ScriptPostprocessingCodeFormer", + "methods": [ + { + "type": "function", + "name": "ui", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "{'codeformer_visibility': codeformer_visibility, 'codeformer_weight':\n codeformer_weight}", + "parent": "ScriptPostprocessingCodeFormer" + }, + { + "type": "function", + "name": "process", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "pp", + "type": "scripts_postprocessing.PostprocessedImage" + }, + { + "name": "codeformer_visibility", + "type": null + }, + { + "name": "codeformer_weight", + "type": null + } + ], + "return_type": null, + "parent": "ScriptPostprocessingCodeFormer" + } + ], + "parent": null + } + ], + "scripts/postprocessing_gfpgan.py": [ + { + "type": "class", + "name": "ScriptPostprocessingGfpGan", + "methods": [ + { + "type": "function", + "name": "ui", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "{'gfpgan_visibility': gfpgan_visibility}", + "parent": "ScriptPostprocessingGfpGan" + }, + { + "type": "function", + "name": "process", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "pp", + "type": "scripts_postprocessing.PostprocessedImage" + }, + { + "name": "gfpgan_visibility", + "type": null + } + ], + "return_type": null, + "parent": "ScriptPostprocessingGfpGan" + } + ], + "parent": null + } + ], + "scripts/postprocessing_upscale.py": [ + { + "type": "class", + "name": "ScriptPostprocessingUpscale", + "methods": [ + { + "type": "function", + "name": "ui", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "{'upscale_mode': selected_tab, 'upscale_by': upscaling_resize,\n 'upscale_to_width': upscaling_resize_w, 'upscale_to_height':\n upscaling_resize_h, 'upscale_crop': upscaling_crop, 'upscaler_1_name':\n extras_upscaler_1, 'upscaler_2_name': extras_upscaler_2,\n 'upscaler_2_visibility': extras_upscaler_2_visibility}", + "parent": "ScriptPostprocessingUpscale" + }, + { + "type": "function", + "name": "upscale", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "image", + "type": null + }, + { + "name": "info", + "type": null + }, + { + "name": "upscaler", + "type": null + }, + { + "name": "upscale_mode", + "type": null + }, + { + "name": "upscale_by", + "type": null + }, + { + "name": "upscale_to_width", + "type": null + }, + { + "name": "upscale_to_height", + "type": null + }, + { + "name": "upscale_crop", + "type": null + } + ], + "return_type": "image", + "parent": "ScriptPostprocessingUpscale" + }, + { + "type": "function", + "name": "process", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "pp", + "type": "scripts_postprocessing.PostprocessedImage" + }, + { + "name": "upscale_mode", + "type": null + }, + { + "name": "upscale_by", + "type": null + }, + { + "name": "upscale_to_width", + "type": null + }, + { + "name": "upscale_to_height", + "type": null + }, + { + "name": "upscale_crop", + "type": null + }, + { + "name": "upscaler_1_name", + "type": null + }, + { + "name": "upscaler_2_name", + "type": null + }, + { + "name": "upscaler_2_visibility", + "type": null + } + ], + "return_type": null, + "parent": "ScriptPostprocessingUpscale" + }, + { + "type": "function", + "name": "image_changed", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "ScriptPostprocessingUpscale" + } + ], + "parent": null + }, + { + "type": "class", + "name": "ScriptPostprocessingUpscaleSimple", + "methods": [ + { + "type": "function", + "name": "ui", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "{'upscale_by': upscale_by, 'upscaler_name': upscaler_name}", + "parent": "ScriptPostprocessingUpscaleSimple" + }, + { + "type": "function", + "name": "process", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "pp", + "type": "scripts_postprocessing.PostprocessedImage" + }, + { + "name": "upscale_by", + "type": null + }, + { + "name": "upscaler_name", + "type": null + } + ], + "return_type": null, + "parent": "ScriptPostprocessingUpscaleSimple" + } + ], + "parent": null + } + ], + "scripts/prompt_matrix.py": [ + { + "type": "function", + "name": "draw_xy_grid", + "args": [ + { + "name": "xs", + "type": null + }, + { + "name": "ys", + "type": null + }, + { + "name": "x_label", + "type": null + }, + { + "name": "y_label", + "type": null + }, + { + "name": "cell", + "type": null + } + ], + "return_type": "first_processed", + "parent": null + }, + { + "type": "class", + "name": "Script", + "methods": [ + { + "type": "function", + "name": "title", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "\"\"\"Prompt matrix\"\"\"", + "parent": "Script" + }, + { + "type": "function", + "name": "ui", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "is_img2img", + "type": null + } + ], + "return_type": "[put_at_start, different_seeds, prompt_type, variations_delimiter, margin_size]", + "parent": "Script" + }, + { + "type": "function", + "name": "run", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": null + }, + { + "name": "put_at_start", + "type": null + }, + { + "name": "different_seeds", + "type": null + }, + { + "name": "prompt_type", + "type": null + }, + { + "name": "variations_delimiter", + "type": null + }, + { + "name": "margin_size", + "type": null + } + ], + "return_type": "processed", + "parent": "Script" + } + ], + "parent": null + } + ], + "scripts/prompts_from_file.py": [ + { + "type": "function", + "name": "process_string_tag", + "args": [ + { + "name": "tag", + "type": null + } + ], + "return_type": "tag", + "parent": null + }, + { + "type": "function", + "name": "process_int_tag", + "args": [ + { + "name": "tag", + "type": null + } + ], + "return_type": "int(tag)", + "parent": null + }, + { + "type": "function", + "name": "process_float_tag", + "args": [ + { + "name": "tag", + "type": null + } + ], + "return_type": "float(tag)", + "parent": null + }, + { + "type": "function", + "name": "process_boolean_tag", + "args": [ + { + "name": "tag", + "type": null + } + ], + "return_type": "(True if tag == 'true' else False)", + "parent": null + }, + { + "type": "function", + "name": "cmdargs", + "args": [ + { + "name": "line", + "type": null + } + ], + "return_type": "res", + "parent": null + }, + { + "type": "function", + "name": "load_prompt_file", + "args": [ + { + "name": "file", + "type": null + } + ], + "return_type": "(None, gr.update(), gr.update(lines=7))", + "parent": null + }, + { + "type": "class", + "name": "Script", + "methods": [ + { + "type": "function", + "name": "title", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "\"\"\"Prompts from file or textbox\"\"\"", + "parent": "Script" + }, + { + "type": "function", + "name": "ui", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "is_img2img", + "type": null + } + ], + "return_type": "[checkbox_iterate, checkbox_iterate_batch, prompt_txt]", + "parent": "Script" + }, + { + "type": "function", + "name": "run", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": null + }, + { + "name": "checkbox_iterate", + "type": null + }, + { + "name": "checkbox_iterate_batch", + "type": null + }, + { + "name": "prompt_txt", + "type": "str" + } + ], + "return_type": "Processed(p, images, p.seed, '', all_prompts=all_prompts, infotexts=infotexts)", + "parent": "Script" + } + ], + "parent": null + } + ], + "scripts/sd_upscale.py": [ + { + "type": "class", + "name": "Script", + "methods": [ + { + "type": "function", + "name": "title", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "\"\"\"SD upscale\"\"\"", + "parent": "Script" + }, + { + "type": "function", + "name": "show", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "is_img2img", + "type": null + } + ], + "return_type": "is_img2img", + "parent": "Script" + }, + { + "type": "function", + "name": "ui", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "is_img2img", + "type": null + } + ], + "return_type": "[info, overlap, upscaler_index, scale_factor]", + "parent": "Script" + }, + { + "type": "function", + "name": "run", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": null + }, + { + "name": "_", + "type": null + }, + { + "name": "overlap", + "type": null + }, + { + "name": "upscaler_index", + "type": null + }, + { + "name": "scale_factor", + "type": null + } + ], + "return_type": "processed", + "parent": "Script" + } + ], + "parent": null + } + ], + "scripts/xyz_grid.py": [ + { + "type": "function", + "name": "apply_field", + "args": [ + { + "name": "field", + "type": null + } + ], + "return_type": "fun", + "parent": null + }, + { + "type": "function", + "name": "apply_prompt", + "args": [ + { + "name": "p", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "xs", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "apply_order", + "args": [ + { + "name": "p", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "xs", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "confirm_samplers", + "args": [ + { + "name": "p", + "type": null + }, + { + "name": "xs", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "apply_checkpoint", + "args": [ + { + "name": "p", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "xs", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "confirm_checkpoints", + "args": [ + { + "name": "p", + "type": null + }, + { + "name": "xs", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "confirm_checkpoints_or_none", + "args": [ + { + "name": "p", + "type": null + }, + { + "name": "xs", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "apply_clip_skip", + "args": [ + { + "name": "p", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "xs", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "apply_upscale_latent_space", + "args": [ + { + "name": "p", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "xs", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "find_vae", + "args": [ + { + "name": "name", + "type": "str" + } + ], + "return_type": "modules.sd_vae.unspecified", + "parent": null + }, + { + "type": "function", + "name": "apply_vae", + "args": [ + { + "name": "p", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "xs", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "apply_styles", + "args": [ + { + "name": "p", + "type": "StableDiffusionProcessingTxt2Img" + }, + { + "name": "x", + "type": "str" + }, + { + "name": "_", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "apply_uni_pc_order", + "args": [ + { + "name": "p", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "xs", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "apply_face_restore", + "args": [ + { + "name": "p", + "type": null + }, + { + "name": "opt", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "apply_override", + "args": [ + { + "name": "field", + "type": null + }, + { + "name": "boolean", + "type": "bool" + } + ], + "return_type": "fun", + "parent": null + }, + { + "type": "function", + "name": "boolean_choice", + "args": [ + { + "name": "reverse", + "type": "bool" + } + ], + "return_type": "choice", + "parent": null + }, + { + "type": "function", + "name": "format_value_add_label", + "args": [ + { + "name": "p", + "type": null + }, + { + "name": "opt", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "f\"\"\"{opt.label}: {x}\"\"\"", + "parent": null + }, + { + "type": "function", + "name": "format_value", + "args": [ + { + "name": "p", + "type": null + }, + { + "name": "opt", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "x", + "parent": null + }, + { + "type": "function", + "name": "format_value_join_list", + "args": [ + { + "name": "p", + "type": null + }, + { + "name": "opt", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "\"\"\", \"\"\".join(x)", + "parent": null + }, + { + "type": "function", + "name": "do_nothing", + "args": [ + { + "name": "p", + "type": null + }, + { + "name": "x", + "type": null + }, + { + "name": "xs", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "format_nothing", + "args": [ + { + "name": "p", + "type": null + }, + { + "name": "opt", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "\"\"\"\"\"\"", + "parent": null + }, + { + "type": "function", + "name": "format_remove_path", + "args": [ + { + "name": "p", + "type": null + }, + { + "name": "opt", + "type": null + }, + { + "name": "x", + "type": null + } + ], + "return_type": "os.path.basename(x)", + "parent": null + }, + { + "type": "function", + "name": "str_permutations", + "args": [ + { + "name": "x", + "type": null + } + ], + "return_type": "x", + "parent": null + }, + { + "type": "function", + "name": "list_to_csv_string", + "args": [ + { + "name": "data_list", + "type": null + } + ], + "return_type": "o.getvalue().strip()", + "parent": null + }, + { + "type": "function", + "name": "csv_string_to_list_strip", + "args": [ + { + "name": "data_str", + "type": null + } + ], + "return_type": "list(map(str.strip, chain.from_iterable(csv.reader(StringIO(data_str)))))", + "parent": null + }, + { + "type": "class", + "name": "AxisOption", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "label", + "type": null + }, + { + "name": "type", + "type": null + }, + { + "name": "apply", + "type": null + }, + { + "name": "format_value", + "type": null + }, + { + "name": "confirm", + "type": null + }, + { + "name": "cost", + "type": null + }, + { + "name": "choices", + "type": null + } + ], + "return_type": null, + "parent": "AxisOption" + } + ], + "parent": null + }, + { + "type": "class", + "name": "AxisOptionImg2Img", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "AxisOptionImg2Img" + } + ], + "parent": null + }, + { + "type": "class", + "name": "AxisOptionTxt2Img", + "methods": [ + { + "type": "function", + "name": "__init__", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "AxisOptionTxt2Img" + } + ], + "parent": null + }, + { + "type": "function", + "name": "draw_xyz_grid", + "args": [ + { + "name": "p", + "type": null + }, + { + "name": "xs", + "type": null + }, + { + "name": "ys", + "type": null + }, + { + "name": "zs", + "type": null + }, + { + "name": "x_labels", + "type": null + }, + { + "name": "y_labels", + "type": null + }, + { + "name": "z_labels", + "type": null + }, + { + "name": "cell", + "type": null + }, + { + "name": "draw_legend", + "type": null + }, + { + "name": "include_lone_images", + "type": null + }, + { + "name": "include_sub_grids", + "type": null + }, + { + "name": "first_axes_processed", + "type": null + }, + { + "name": "second_axes_processed", + "type": null + }, + { + "name": "margin_size", + "type": null + } + ], + "return_type": "processed_result", + "parent": null + }, + { + "type": "class", + "name": "SharedSettingsStackHelper", + "methods": [ + { + "type": "function", + "name": "__enter__", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": null, + "parent": "SharedSettingsStackHelper" + }, + { + "type": "function", + "name": "__exit__", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "exc_type", + "type": null + }, + { + "name": "exc_value", + "type": null + }, + { + "name": "tb", + "type": null + } + ], + "return_type": null, + "parent": "SharedSettingsStackHelper" + } + ], + "parent": null + }, + { + "type": "class", + "name": "Script", + "methods": [ + { + "type": "function", + "name": "title", + "args": [ + { + "name": "self", + "type": null + } + ], + "return_type": "\"\"\"X/Y/Z plot\"\"\"", + "parent": "Script" + }, + { + "type": "function", + "name": "ui", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "is_img2img", + "type": null + } + ], + "return_type": "[x_type, x_values, x_values_dropdown, y_type, y_values, y_values_dropdown,\n z_type, z_values, z_values_dropdown, draw_legend, include_lone_images,\n include_sub_grids, no_fixed_seeds, margin_size, csv_mode]", + "parent": "Script" + }, + { + "type": "function", + "name": "run", + "args": [ + { + "name": "self", + "type": null + }, + { + "name": "p", + "type": null + }, + { + "name": "x_type", + "type": null + }, + { + "name": "x_values", + "type": null + }, + { + "name": "x_values_dropdown", + "type": null + }, + { + "name": "y_type", + "type": null + }, + { + "name": "y_values", + "type": null + }, + { + "name": "y_values_dropdown", + "type": null + }, + { + "name": "z_type", + "type": null + }, + { + "name": "z_values", + "type": null + }, + { + "name": "z_values_dropdown", + "type": null + }, + { + "name": "draw_legend", + "type": null + }, + { + "name": "include_lone_images", + "type": null + }, + { + "name": "include_sub_grids", + "type": null + }, + { + "name": "no_fixed_seeds", + "type": null + }, + { + "name": "margin_size", + "type": null + }, + { + "name": "csv_mode", + "type": null + } + ], + "return_type": "processed", + "parent": "Script" + } + ], + "parent": null + } + ], + "test/__init__.py": [], + "test/conftest.py": [ + { + "type": "function", + "name": "file_to_base64", + "args": [ + { + "name": "filename", + "type": null + } + ], + "return_type": "('data:image/png;base64,' + base64_str)", + "parent": null + }, + { + "type": "function", + "name": "img2img_basic_image_base64", + "args": [], + "return_type": "file_to_base64(os.path.join(test_files_path, 'img2img_basic.png'))", + "parent": null + }, + { + "type": "function", + "name": "mask_basic_image_base64", + "args": [], + "return_type": "file_to_base64(os.path.join(test_files_path, 'mask_basic.png'))", + "parent": null + } + ], + "test/test_extras.py": [ + { + "type": "function", + "name": "test_simple_upscaling_performed", + "args": [ + { + "name": "base_url", + "type": null + }, + { + "name": "img2img_basic_image_base64", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "test_png_info_performed", + "args": [ + { + "name": "base_url", + "type": null + }, + { + "name": "img2img_basic_image_base64", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "test_interrogate_performed", + "args": [ + { + "name": "base_url", + "type": null + }, + { + "name": "img2img_basic_image_base64", + "type": null + } + ], + "return_type": null, + "parent": null + } + ], + "test/test_img2img.py": [ + { + "type": "function", + "name": "url_img2img", + "args": [ + { + "name": "base_url", + "type": null + } + ], + "return_type": "f\"\"\"{base_url}/sdapi/v1/img2img\"\"\"", + "parent": null + }, + { + "type": "function", + "name": "simple_img2img_request", + "args": [ + { + "name": "img2img_basic_image_base64", + "type": null + } + ], + "return_type": "{'batch_size': 1, 'cfg_scale': 7, 'denoising_strength': 0.75, 'eta': 0,\n 'height': 64, 'include_init_images': False, 'init_images': [\n img2img_basic_image_base64], 'inpaint_full_res': False,\n 'inpaint_full_res_padding': 0, 'inpainting_fill': 0,\n 'inpainting_mask_invert': False, 'mask': None, 'mask_blur': 4, 'n_iter':\n 1, 'negative_prompt': '', 'override_settings': {}, 'prompt':\n 'example prompt', 'resize_mode': 0, 'restore_faces': False, 's_churn': \n 0, 's_noise': 1, 's_tmax': 0, 's_tmin': 0, 'sampler_index': 'Euler a',\n 'seed': -1, 'seed_resize_from_h': -1, 'seed_resize_from_w': -1, 'steps':\n 3, 'styles': [], 'subseed': -1, 'subseed_strength': 0, 'tiling': False,\n 'width': 64}", + "parent": null + }, + { + "type": "function", + "name": "test_img2img_simple_performed", + "args": [ + { + "name": "url_img2img", + "type": null + }, + { + "name": "simple_img2img_request", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "test_inpainting_masked_performed", + "args": [ + { + "name": "url_img2img", + "type": null + }, + { + "name": "simple_img2img_request", + "type": null + }, + { + "name": "mask_basic_image_base64", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "test_inpainting_with_inverted_masked_performed", + "args": [ + { + "name": "url_img2img", + "type": null + }, + { + "name": "simple_img2img_request", + "type": null + }, + { + "name": "mask_basic_image_base64", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "test_img2img_sd_upscale_performed", + "args": [ + { + "name": "url_img2img", + "type": null + }, + { + "name": "simple_img2img_request", + "type": null + } + ], + "return_type": null, + "parent": null + } + ], + "test/test_txt2img.py": [ + { + "type": "function", + "name": "url_txt2img", + "args": [ + { + "name": "base_url", + "type": null + } + ], + "return_type": "f\"\"\"{base_url}/sdapi/v1/txt2img\"\"\"", + "parent": null + }, + { + "type": "function", + "name": "simple_txt2img_request", + "args": [], + "return_type": "{'batch_size': 1, 'cfg_scale': 7, 'denoising_strength': 0, 'enable_hr': \n False, 'eta': 0, 'firstphase_height': 0, 'firstphase_width': 0,\n 'height': 64, 'n_iter': 1, 'negative_prompt': '', 'prompt':\n 'example prompt', 'restore_faces': False, 's_churn': 0, 's_noise': 1,\n 's_tmax': 0, 's_tmin': 0, 'sampler_index': 'Euler a', 'seed': -1,\n 'seed_resize_from_h': -1, 'seed_resize_from_w': -1, 'steps': 3,\n 'styles': [], 'subseed': -1, 'subseed_strength': 0, 'tiling': False,\n 'width': 64}", + "parent": null + }, + { + "type": "function", + "name": "test_txt2img_simple_performed", + "args": [ + { + "name": "url_txt2img", + "type": null + }, + { + "name": "simple_txt2img_request", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "test_txt2img_with_negative_prompt_performed", + "args": [ + { + "name": "url_txt2img", + "type": null + }, + { + "name": "simple_txt2img_request", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "test_txt2img_with_complex_prompt_performed", + "args": [ + { + "name": "url_txt2img", + "type": null + }, + { + "name": "simple_txt2img_request", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "test_txt2img_not_square_image_performed", + "args": [ + { + "name": "url_txt2img", + "type": null + }, + { + "name": "simple_txt2img_request", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "test_txt2img_with_hrfix_performed", + "args": [ + { + "name": "url_txt2img", + "type": null + }, + { + "name": "simple_txt2img_request", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "test_txt2img_with_tiling_performed", + "args": [ + { + "name": "url_txt2img", + "type": null + }, + { + "name": "simple_txt2img_request", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "test_txt2img_with_restore_faces_performed", + "args": [ + { + "name": "url_txt2img", + "type": null + }, + { + "name": "simple_txt2img_request", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "test_txt2img_with_vanilla_sampler_performed", + "args": [ + { + "name": "url_txt2img", + "type": null + }, + { + "name": "simple_txt2img_request", + "type": null + }, + { + "name": "sampler", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "test_txt2img_multiple_batches_performed", + "args": [ + { + "name": "url_txt2img", + "type": null + }, + { + "name": "simple_txt2img_request", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "test_txt2img_batch_performed", + "args": [ + { + "name": "url_txt2img", + "type": null + }, + { + "name": "simple_txt2img_request", + "type": null + } + ], + "return_type": null, + "parent": null + } + ], + "test/test_utils.py": [ + { + "type": "function", + "name": "test_options_write", + "args": [ + { + "name": "base_url", + "type": null + } + ], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "test_get_api_url", + "args": [ + { + "name": "base_url", + "type": null + }, + { + "name": "url", + "type": null + } + ], + "return_type": null, + "parent": null + } + ], + "webui-macos-env.sh": { + "is_launcher_script": false + }, + "webui-user.sh": { + "is_launcher_script": true, + "launcher_for": "Python" + }, + "webui.py": [ + { + "type": "function", + "name": "create_api", + "args": [ + { + "name": "app", + "type": null + } + ], + "return_type": "api", + "parent": null + }, + { + "type": "function", + "name": "api_only", + "args": [], + "return_type": null, + "parent": null + }, + { + "type": "function", + "name": "webui", + "args": [], + "return_type": null, + "parent": null + } + ], + "webui.sh": { + "is_launcher_script": true, + "launcher_for": "Python" + } + } +} \ No newline at end of file diff --git a/modules/cmd_args.py b/modules/cmd_args.py index 32e5fd2d..ed6b333b 100644 --- a/modules/cmd_args.py +++ b/modules/cmd_args.py @@ -18,6 +18,7 @@ parser.add_argument("--skip-install", action='store_true', help="launch.py argument: skip installation of packages") parser.add_argument("--dump-sysinfo", action='store_true', help="launch.py argument: dump limited sysinfo file (without information about extensions, options) to disk and quit") parser.add_argument("--loglevel", type=str, help="log level; one of: CRITICAL, ERROR, WARNING, INFO, DEBUG", default=None) +parser.add_argument("--enable-trace", action='store_true', help="enable python function call tracing. Handy for extending functionality.") parser.add_argument("--do-not-download-clip", action='store_true', help="do not download CLIP model even if it's not included in the checkpoint") parser.add_argument("--data-dir", type=str, default=os.path.dirname(os.path.dirname(os.path.realpath(__file__))), help="base path where all user data is stored") parser.add_argument("--config", type=str, default=sd_default_config, help="path to config which constructs model",) diff --git a/modules/habana.py b/modules/habana.py index 2a514661..e8b3e1e4 100644 --- a/modules/habana.py +++ b/modules/habana.py @@ -1,6 +1,43 @@ +import time import torch import habana_frameworks.torch.hpu.random as htrandom +class DeviceRunner(object): + def __init__(self, device, use_hpu_graph = True): + super().__init__() + self.hpu_cache = {} + self.device = device + if device.type != "hpu": + use_hpu_graph = False + else: + import habana_frameworks.torch.hpu.graphs as hpu_graphs + self.copy_to = hpu_graphs.copy_to + self.CachedParams = hpu_graphs.CachedParams + self.use_hpu_graph = use_hpu_graph + + def run(self, func, arg): + if self.use_hpu_graph: + func_id = hash(func) + if func_id in self.hpu_cache: + self.copy_to(self.hpu_cache[func_id].graph_inputs, arg) + self.hpu_cache[func_id].graph.replay() + return self.hpu_cache[func_id].graph_outputs + str = "Compiling HPU graph {:26s} ".format(func.__name__) + print(str) + t_start = time.time() + import habana_frameworks.torch.hpu as hpu + graph = hpu.HPUGraph() + graph.capture_begin() + out = func(arg) + graph.capture_end() + self.hpu_cache[func_id] = self.CachedParams(arg, out, graph) + print("{} took {:6.2f} sec".format(str, time.time() - t_start)) + return out + elif self.device.type == "hpu": + import habana_frameworks.torch.core as core + core.mark_step() + return func(arg) + class HPUGenerator: def __init__(self): self.state = htrandom.get_rng_state() diff --git a/modules/launch_utils.py b/modules/launch_utils.py index 6e54d063..ddfd2c9a 100644 --- a/modules/launch_utils.py +++ b/modules/launch_utils.py @@ -447,3 +447,12 @@ def dump_sysinfo(): file.write(text) return filename + +def tracefunc(frame, event, arg, indent=[0]): + if event == "call": + indent[0] += 2 + print("-" * indent[0] + "> call function", frame.f_code.co_name) + elif event == "return": + print("<" + "-" * indent[0], "exit function", frame.f_code.co_name) + indent[0] -= 2 + return tracefunc diff --git a/modules/sd_models.py b/modules/sd_models.py index 8d690436..b637ecfd 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -1,4 +1,5 @@ import collections +import os import os.path import sys import gc @@ -18,6 +19,8 @@ from modules.timer import Timer import tomesd +from modules.habana import DeviceRunner + model_dir = "Stable-diffusion" model_path = os.path.abspath(os.path.join(paths.models_path, model_dir)) @@ -130,7 +133,11 @@ def calculate_shorthash(self): def setup_model(): os.makedirs(model_path, exist_ok=True) - + if torch.device() == 'hpu': + device_runner = DeviceRunner(device='hpu', use_hpu_graph=True) + device_runner.setup() + os.environ['PT_HPU_AUTOCAST_LOWER_PRECISION_OPS_LIST'] = model_path + 'ops_fp16.txt' + os.environ['PT_HPU_AUTOCAST_FP32_OPS_LIST'] = model_path + 'ops_bf32.txt' enable_midas_autodownload()