mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
close Issue #165
This commit is contained in:
parent
ac02a775e4
commit
8bbe7936bd
@ -63,13 +63,14 @@ class DreamServer(BaseHTTPRequestHandler):
|
||||
initimg = initimg.split(",")[1] # Ignore mime type
|
||||
f.write(base64.b64decode(initimg))
|
||||
|
||||
# Run img2img
|
||||
outputs = self.model.img2img(prompt,
|
||||
init_img = "./img2img-tmp.png",
|
||||
iterations = iterations,
|
||||
cfg_scale = cfgscale,
|
||||
seed = seed,
|
||||
steps = steps)
|
||||
# Run img2img
|
||||
outputs = self.model.img2img(prompt,
|
||||
init_img = "./img2img-tmp.png",
|
||||
iterations = iterations,
|
||||
cfg_scale = cfgscale,
|
||||
seed = seed,
|
||||
gfpgan_strength=gfpgan_strength,
|
||||
steps = steps)
|
||||
# Remove the temp file
|
||||
os.remove("./img2img-tmp.png")
|
||||
|
||||
|
@ -208,7 +208,7 @@ class T2I:
|
||||
# these are specific to img2img
|
||||
init_img=None,
|
||||
strength=None,
|
||||
gfpgan_strength=None,
|
||||
gfpgan_strength=0,
|
||||
save_original=False,
|
||||
upscale=None,
|
||||
variants=None,
|
||||
@ -592,6 +592,7 @@ class T2I:
|
||||
return model
|
||||
|
||||
def _load_img(self, path):
|
||||
print(f'image path = {path}, cwd = {os.getcwd()}')
|
||||
with Image.open(path) as img:
|
||||
image = img.convert('RGB')
|
||||
|
||||
|
@ -95,9 +95,6 @@ def main():
|
||||
log.close()
|
||||
|
||||
def main_loop(t2i, outdir, parser, log_path, infile):
|
||||
print(
|
||||
"\n* Initialization done! Awaiting your command (-h for help, 'q' to quit, 'cd' to change output dir, 'pwd' to print output dir)..."
|
||||
)
|
||||
"""prompt/read/execute loop"""
|
||||
done = False
|
||||
last_seeds = []
|
||||
|
Loading…
Reference in New Issue
Block a user