mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix img2img incorrectly loading previous prompt
This commit is contained in:
parent
9b4d328be0
commit
0ab5f2159d
@ -829,7 +829,6 @@ class Generate:
|
||||
return model
|
||||
|
||||
def _load_img(self, path, width, height, fit=False):
|
||||
print(f'DEBUG: path = {path}')
|
||||
assert os.path.exists(path), f'>> {path}: File not found'
|
||||
|
||||
# with Image.open(path) as img:
|
||||
|
@ -170,9 +170,10 @@ def main_loop(gen, opt, infile):
|
||||
|
||||
if opt.init_img:
|
||||
try:
|
||||
oldargs = metadata_from_png(opt.init_img)
|
||||
opt.prompt = oldargs.prompt
|
||||
print(f'>> Retrieved old prompt "{opt.prompt}" from {opt.init_img}')
|
||||
if not opt.prompt:
|
||||
oldargs = metadata_from_png(opt.init_img)
|
||||
opt.prompt = oldargs.prompt
|
||||
print(f'>> Retrieved old prompt "{opt.prompt}" from {opt.init_img}')
|
||||
except AttributeError:
|
||||
pass
|
||||
except KeyError:
|
||||
|
Loading…
Reference in New Issue
Block a user