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:
@ -829,7 +829,6 @@ class Generate:
|
|||||||
return model
|
return model
|
||||||
|
|
||||||
def _load_img(self, path, width, height, fit=False):
|
def _load_img(self, path, width, height, fit=False):
|
||||||
print(f'DEBUG: path = {path}')
|
|
||||||
assert os.path.exists(path), f'>> {path}: File not found'
|
assert os.path.exists(path), f'>> {path}: File not found'
|
||||||
|
|
||||||
# with Image.open(path) as img:
|
# with Image.open(path) as img:
|
||||||
|
@ -170,9 +170,10 @@ def main_loop(gen, opt, infile):
|
|||||||
|
|
||||||
if opt.init_img:
|
if opt.init_img:
|
||||||
try:
|
try:
|
||||||
oldargs = metadata_from_png(opt.init_img)
|
if not opt.prompt:
|
||||||
opt.prompt = oldargs.prompt
|
oldargs = metadata_from_png(opt.init_img)
|
||||||
print(f'>> Retrieved old prompt "{opt.prompt}" from {opt.init_img}')
|
opt.prompt = oldargs.prompt
|
||||||
|
print(f'>> Retrieved old prompt "{opt.prompt}" from {opt.init_img}')
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
pass
|
pass
|
||||||
except KeyError:
|
except KeyError:
|
||||||
|
Reference in New Issue
Block a user