Enable users to set sampler using prompts

This commit is contained in:
blessedcoolant
2022-08-28 16:05:00 +12:00
parent 38ed6393fa
commit d1551b1bd4
2 changed files with 63 additions and 36 deletions

View File

@ -52,7 +52,8 @@ def main():
weights=weights,
full_precision=opt.full_precision,
config=config,
latent_diffusion_weights=opt.laion400m, # this is solely for recreating the prompt
# this is solely for recreating the prompt
latent_diffusion_weights=opt.laion400m,
embedding_path=opt.embedding_path,
device=opt.device,
)
@ -508,6 +509,23 @@ def create_cmd_parser():
action='store_true',
help='skip subprompt weight normalization',
)
parser.add_argument(
'-m',
'--user_sampler',
default=None,
type=str,
choices=[
'ddim',
'k_dpm_2_a',
'k_dpm_2',
'k_euler_a',
'k_euler',
'k_heun',
'k_lms',
'plms',
],
help='Change to another supported sampler using this command',
)
return parser