Merge branch 'main' of https://github.com/BaristaLabs/stable-diffusion-dream into add-gfpgan-option

This commit is contained in:
Sean McLellan
2022-08-25 23:19:17 -04:00
4 changed files with 136 additions and 163 deletions

View File

@ -301,7 +301,7 @@ def create_argv_parser():
'-o',
type=str,
default="outputs/img-samples",
help="directory in which to place generated images and a log of prompts and seeds")
help="directory in which to place generated images and a log of prompts and seeds (outputs/img-samples")
parser.add_argument('--embedding_path',
type=str,
help="Path to a pre-trained embedding manager checkpoint - can only be set on command line")

View File

@ -85,6 +85,12 @@ class DreamServer(BaseHTTPRequestHandler):
print(f"Prompt generated with output: {outputs}")
post_data['initimg'] = '' # Don't send init image back
# Append post_data to log
with open("./outputs/img-samples/dream_web_log.txt", "a") as log:
for output in outputs:
log.write(f"{output[0]}: {json.dumps(post_data)}\n")
outputs = [x + [post_data] for x in outputs] # Append config to each output
result = {'outputs': outputs}
self.wfile.write(bytes(json.dumps(result), "utf-8"))