outcropping improvements

- catch syntax errors in the outcrop coordinates
- work (after a fashion) on non-Invoke generated images
This commit is contained in:
Lincoln Stein
2022-10-21 20:47:57 -04:00
parent d8c1b78d83
commit 7308022bc7
3 changed files with 22 additions and 16 deletions

View File

@ -973,17 +973,17 @@ def sha256(path):
return sha.hexdigest()
def legacy_metadata_load(meta,pathname) -> Args:
opt = Args()
if 'Dream' in meta and len(meta['Dream']) > 0:
dream_prompt = meta['Dream']
opt = Args()
opt.parse_cmd(dream_prompt)
return opt
else: # if nothing else, we can get the seed
match = re.search('\d+\.(\d+)',pathname)
if match:
seed = match.groups()[0]
opt = Args()
opt.seed = seed
return opt
return None
else:
opt.prompt = ''
opt.seed = 0
return opt