Merge remote-tracking branch 'upstream/development' into development

This commit is contained in:
psychedelicious 2022-09-22 09:10:15 +10:00
commit 21da4592d1
5 changed files with 10 additions and 7 deletions

View File

@ -19,7 +19,7 @@
[discord badge]: https://flat.badgen.net/discord/members/htRgbc7e?icon=discord
[discord link]: https://discord.gg/ZmtBAhwWhy
[github forks badge]: https://flat.badgen.net/github/forks/invoke-ai/InvokeAI?icon=github
[github forks link]: https://useful-forks.github.io/?repo=lstein%2Fstable-diffusion
[github forks link]: https://useful-forks.github.io/?repo=invoke-ai%2FInvokeAI
[github open issues badge]: https://flat.badgen.net/github/open-issues/invoke-ai/InvokeAI?icon=github
[github open issues link]: https://github.com/invoke-ai/InvokeAI/issues?q=is%3Aissue+is%3Aopen
[github open prs badge]: https://flat.badgen.net/github/open-prs/invoke-ai/InvokeAI?icon=github

View File

@ -1 +1,4 @@
from .base import Restoration
'''
Initialization file for the ldm.dream.restoration package
'''
from .base import Restoration

View File

@ -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:

View File

@ -8,6 +8,7 @@ import shlex
import copy
import warnings
import time
sys.path.append('.') # corrects a weird problem on Macs
import ldm.dream.readline
from ldm.dream.args import Args, metadata_dumps, metadata_from_png
from ldm.dream.pngwriter import PngWriter
@ -36,7 +37,6 @@ def main():
sys.exit(-1)
print('* Initializing, be patient...\n')
sys.path.append('.')
from ldm.generate import Generate
# these two lines prevent a horrible warning message from appearing
@ -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: