Fixes metadata_loads() #686

This commit is contained in:
psychedelicious 2022-09-19 11:53:47 +10:00 committed by Lincoln Stein
parent 6bf19cd897
commit 682d74754c

View File

@ -681,7 +681,10 @@ def metadata_loads(metadata):
'''
results = []
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:
# repack the prompt and variations
image['prompt'] = ','.join([':'.join([x['prompt'], str(x['weight'])]) for x in image['prompt']])