mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
* Bug fixes
This commit is contained in:
parent
93001f48f7
commit
6142cf25cc
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,7 +1,7 @@
|
|||||||
# ignore default image save location and model symbolic link
|
# ignore default image save location and model symbolic link
|
||||||
outputs/
|
outputs/
|
||||||
models/ldm/stable-diffusion-v1/model.ckpt
|
models/ldm/stable-diffusion-v1/model.ckpt
|
||||||
ldm/restoration/codeformer/weights
|
ldm/dream/restoration/codeformer/weights
|
||||||
|
|
||||||
# ignore the Anaconda/Miniconda installer used while building Docker image
|
# ignore the Anaconda/Miniconda installer used while building Docker image
|
||||||
anaconda.sh
|
anaconda.sh
|
||||||
|
@ -27,7 +27,7 @@ class Restoration():
|
|||||||
return CodeFormerRestoration()
|
return CodeFormerRestoration()
|
||||||
|
|
||||||
# Upscale Models
|
# Upscale Models
|
||||||
def load_ersgan(self):
|
def load_esrgan(self):
|
||||||
from ldm.dream.restoration.realesrgan import ESRGAN
|
from ldm.dream.restoration.realesrgan import ESRGAN
|
||||||
esrgan = ESRGAN(self.esrgan_bg_tile)
|
esrgan = ESRGAN(self.esrgan_bg_tile)
|
||||||
print('>> ESRGAN Initialized')
|
print('>> ESRGAN Initialized')
|
||||||
|
@ -163,7 +163,7 @@ class DreamServer(BaseHTTPRequestHandler):
|
|||||||
# is complete. The upscaling replaces the original file, so the second
|
# is complete. The upscaling replaces the original file, so the second
|
||||||
# entry should not be inserted into the image list.
|
# entry should not be inserted into the image list.
|
||||||
# LS: This repeats code in dream.py
|
# LS: This repeats code in dream.py
|
||||||
def image_done(image, seed, upscaled=False):
|
def image_done(image, seed, upscaled=False, first_seed=None):
|
||||||
name = f'{prefix}.{seed}.png'
|
name = f'{prefix}.{seed}.png'
|
||||||
iter_opt = copy.copy(opt)
|
iter_opt = copy.copy(opt)
|
||||||
if opt.variation_amount > 0:
|
if opt.variation_amount > 0:
|
||||||
|
@ -47,14 +47,14 @@ def main():
|
|||||||
# Loading Face Restoration and ESRGAN Modules
|
# Loading Face Restoration and ESRGAN Modules
|
||||||
try:
|
try:
|
||||||
gfpgan, codeformer, esrgan = None, None, None
|
gfpgan, codeformer, esrgan = None, None, None
|
||||||
from ldm.dream.restoration import Restoration
|
from ldm.dream.restoration.base import Restoration
|
||||||
restoration = Restoration(opt.gfpgan_dir, opt.gfpgan_model_path, opt.esrgan_bg_tile)
|
restoration = Restoration(opt.gfpgan_dir, opt.gfpgan_model_path, opt.esrgan_bg_tile)
|
||||||
if opt.restore:
|
if opt.restore:
|
||||||
gfpgan, codeformer = restoration.load_face_restore_models()
|
gfpgan, codeformer = restoration.load_face_restore_models()
|
||||||
else:
|
else:
|
||||||
print('>> Face restoration disabled')
|
print('>> Face restoration disabled')
|
||||||
if opt.esrgan:
|
if opt.esrgan:
|
||||||
esrgan = restoration.load_ersgan()
|
esrgan = restoration.load_esrgan()
|
||||||
else:
|
else:
|
||||||
print('>> Upscaling disabled')
|
print('>> Upscaling disabled')
|
||||||
except (ModuleNotFoundError, ImportError):
|
except (ModuleNotFoundError, ImportError):
|
||||||
|
Loading…
Reference in New Issue
Block a user