1
0
Fork 0

resize tiles before running refinement steps

This commit is contained in:
Sean Sube 2023-03-31 23:39:25 -05:00
parent 66e938f9ab
commit 4ab1b6cc88
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
1 changed files with 13 additions and 11 deletions

View File

@ -87,18 +87,20 @@ def run_txt2img_pipeline(
for image, output in zip(result.images, outputs): for image, output in zip(result.images, outputs):
if highres_scale > 1: if highres_scale > 1:
# load img2img pipeline once
highpipe = load_pipeline(
server,
OnnxStableDiffusionImg2ImgPipeline,
params.model,
params.scheduler,
job.get_device(),
params.lpw,
inversions,
loras,
)
def highres(tile: Image.Image, dims): def highres(tile: Image.Image, dims):
highpipe = load_pipeline( tile = tile.resize((size.height, size.width))
server,
OnnxStableDiffusionImg2ImgPipeline,
params.model,
params.scheduler,
job.get_device(),
params.lpw,
inversions,
loras,
)
progress = job.get_progress_callback()
if params.lpw: if params.lpw:
logger.debug("using LPW pipeline for img2img") logger.debug("using LPW pipeline for img2img")
rng = torch.manual_seed(params.seed) rng = torch.manual_seed(params.seed)