mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Fixes metadata_loads() #686
This commit is contained in:
parent
6bf19cd897
commit
682d74754c
@ -681,7 +681,10 @@ def metadata_loads(metadata):
|
|||||||
'''
|
'''
|
||||||
results = []
|
results = []
|
||||||
try:
|
try:
|
||||||
images = metadata['sd-metadata']['images']
|
if 'grid' in metadata['sd-metadata']:
|
||||||
|
images = metadata['sd-metadata']['images']
|
||||||
|
else:
|
||||||
|
images = [metadata['sd-metadata']['image']]
|
||||||
for image in images:
|
for image in images:
|
||||||
# repack the prompt and variations
|
# repack the prompt and variations
|
||||||
image['prompt'] = ','.join([':'.join([x['prompt'], str(x['weight'])]) for x in image['prompt']])
|
image['prompt'] = ','.join([':'.join([x['prompt'], str(x['weight'])]) for x in image['prompt']])
|
||||||
|
Loading…
Reference in New Issue
Block a user