diff --git a/ldm/dream/args.py b/ldm/dream/args.py index 7d8f473b4a..db6d963645 100644 --- a/ldm/dream/args.py +++ b/ldm/dream/args.py @@ -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']])