feat: added json support as well

This commit is contained in:
Linaqruf
2023-05-14 19:49:54 +07:00
parent 774c4059fb
commit 8ab5c8cb28

View File

@@ -3303,6 +3303,9 @@ def sample_images(
with open(args.sample_prompts, 'r') as f:
data = toml.load(f)
prompts = [dict(**data['prompt'], **subset) for subset in data['prompt']['subset']]
elif args.sample_prompts.endswith('.json'):
with open(args.sample_prompts, 'r') as f:
prompts = json.load(f)
# schedulerを用意する
sched_init_args = {}