mirror of
https://github.com/kohya-ss/sd-scripts.git
synced 2026-04-09 06:45:09 +00:00
feat: added json support as well
This commit is contained in:
@@ -3303,6 +3303,9 @@ def sample_images(
|
|||||||
with open(args.sample_prompts, 'r') as f:
|
with open(args.sample_prompts, 'r') as f:
|
||||||
data = toml.load(f)
|
data = toml.load(f)
|
||||||
prompts = [dict(**data['prompt'], **subset) for subset in data['prompt']['subset']]
|
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を用意する
|
# schedulerを用意する
|
||||||
sched_init_args = {}
|
sched_init_args = {}
|
||||||
|
|||||||
Reference in New Issue
Block a user