1
0
Fork 0

persist to output dir, do not tile output

This commit is contained in:
Sean Sube 2023-01-28 09:15:02 -06:00
parent 779457b546
commit d89437b11e
2 changed files with 6 additions and 4 deletions

View File

@ -6,6 +6,7 @@ from ..params import (
StageParams, StageParams,
) )
from ..utils import ( from ..utils import (
base_join,
ServerContext, ServerContext,
) )
@ -18,6 +19,7 @@ def persist_disk(
*, *,
output: str, output: str,
) -> Image.Image: ) -> Image.Image:
source_image.save(output) dest = base_join(ctx.output_path, output)
print('saved image to %s' % (output,)) source_image.save(dest)
print('saved image to %s' % (dest,))
return source_image return source_image

View File

@ -552,7 +552,7 @@ def chain():
(upscale_outpaint, StageParams(outscale=4), { (upscale_outpaint, StageParams(outscale=4), {
'expand': Border(256, 256, 256, 256), 'expand': Border(256, 256, 256, 256),
}), }),
(persist_disk, StageParams(), { (persist_disk, StageParams(tile_size=8192), {
'output': output, 'output': output,
}) })
]) ])
@ -563,7 +563,7 @@ def chain():
return jsonify({ return jsonify({
'output': output, 'output': output,
'params': params.tojson(), 'params': params.tojson(),
'size': upscale.resize(size).tojson(), 'size': size.tojson(),
}) })