|
|
|
from modules import sd_models, sd_samplers, sd_vae, shared |
|
|
|
|
|
from sd_advanced_grid.grid_settings import AxisModel, AxisNothing, AxisOption, AxisReplace, AxisVae |
|
|
|
|
|
|
|
|
|
|
|
axis_options: list[AxisOption] = [ |
|
|
|
|
|
AxisNothing("Nothing"), |
|
AxisModel("Checkpoint", type=str, field="sd_model_checkpoint", choices=lambda: sorted(sd_models.checkpoints_list, key=str.casefold)), |
|
AxisVae("VAE", type=str, field="sd_vae", choices=lambda: ["None", "Automatic"] + sorted(sd_vae.vae_dict, key=str.casefold)), |
|
AxisOption("Seed", type=int, field="seed"), |
|
AxisOption("Steps", type=int, max=200, field="steps"), |
|
AxisOption("ClipSkip", type=int, min=1, max=12, field="CLIP_stop_at_last_layers"), |
|
AxisOption("Sampler", type=str, field="sampler_name", choices=lambda: [x.name for x in sd_samplers.all_samplers]), |
|
AxisOption("CFG Scale", type=float, max=30, field="cfg_scale"), |
|
|
|
AxisOption("Restore Faces", type=str, field="face_restoration_model", toggles="restore_faces", choices=lambda: ["None", "Default"] + [model.name() for model in shared.face_restorers]), |
|
AxisOption("CodeFormer Weight", type=float, field="code_former_weight", toggles="restore_faces"), |
|
AxisOption("Tiling", type=bool, field="tiling"), |
|
|
|
|
|
|
|
AxisReplace("Replace TAG", type=str), |
|
|
|
|
|
|
|
AxisOption("Var Seed", type=int, field="subseed"), |
|
AxisOption("Var Strength", type=float, field="subseed_strength"), |
|
|
|
|
|
AxisOption("ETA", type=float, field="eta"), |
|
AxisOption("ETA Noise Seed Delta", type=int, field="eta_noise_seed_delta"), |
|
AxisOption("Sigma Churn", type=float, field="s_churn"), |
|
AxisOption("Sigma TMin", type=float, field="s_tmin"), |
|
AxisOption("Sigma TMax", type=float, field="s_tmax"), |
|
AxisOption("Sigma Noise", type=float, field="s_noise"), |
|
AxisOption("UniPC Order", type=int, field="uni_pc_order", cost=0.5), |
|
|
|
|
|
AxisOption("HighRes Upscaler", type=str, field="hr_upscaler", toggles="enable_hr", choices=lambda: [*shared.latent_upscale_modes, *[x.name for x in shared.sd_upscalers]] + ["None"]), |
|
AxisOption("HighRes Scale", type=float, min=1, max=4, field="hr_scale", toggles="enable_hr"), |
|
AxisOption("HighRes Steps", type=int, max=200, field="hr_second_pass_steps", toggles="enable_hr"), |
|
AxisOption("Denoising", type=float, field="denoising_strength", toggles="enable_hr"), |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
] |
|
|