Merge branch 'development' into development

This commit is contained in:
Peter Baylies 2022-09-19 07:22:03 -04:00 committed by GitHub
commit 37c44ced1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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']])