1
0
Fork 0

remove panorama denoise stage

This commit is contained in:
Sean Sube 2024-01-14 21:36:54 -06:00
parent 374efca776
commit d7af93c34a
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
3 changed files with 30 additions and 7 deletions

View File

@ -628,6 +628,11 @@ class OnnxStableDiffusionPanoramaPipeline(DiffusionPipeline):
# reset the scheduler's internal timestep # reset the scheduler's internal timestep
if prev_step_index is not None: if prev_step_index is not None:
logger.debug(
"resetting scheduler internal step index from %s to %s",
self.scheduler._step_index,
prev_step_index,
)
self.scheduler._step_index = prev_step_index self.scheduler._step_index = prev_step_index
value[:, :, h_start:h_end, w_start:w_end] += latents_view_denoised value[:, :, h_start:h_end, w_start:w_end] += latents_view_denoised
@ -711,6 +716,11 @@ class OnnxStableDiffusionPanoramaPipeline(DiffusionPipeline):
# reset the scheduler's internal timestep # reset the scheduler's internal timestep
if prev_step_index is not None: if prev_step_index is not None:
logger.debug(
"resetting scheduler internal step index from %s to %s",
self.scheduler._step_index,
prev_step_index,
)
self.scheduler._step_index = prev_step_index self.scheduler._step_index = prev_step_index
if feather[0] > 0.0: if feather[0] > 0.0:
@ -1061,6 +1071,11 @@ class OnnxStableDiffusionPanoramaPipeline(DiffusionPipeline):
# reset the scheduler's internal timestep # reset the scheduler's internal timestep
if prev_step_index is not None: if prev_step_index is not None:
logger.debug(
"resetting scheduler internal step index from %s to %s",
self.scheduler._step_index,
prev_step_index,
)
self.scheduler._step_index = prev_step_index self.scheduler._step_index = prev_step_index
value[:, :, h_start:h_end, w_start:w_end] += latents_view_denoised value[:, :, h_start:h_end, w_start:w_end] += latents_view_denoised

View File

@ -470,6 +470,11 @@ class StableDiffusionXLPanoramaPipelineMixin(StableDiffusionXLImg2ImgPipelineMix
# reset the scheduler's internal timestep # reset the scheduler's internal timestep
if prev_step_index is not None: if prev_step_index is not None:
logger.debug(
"resetting scheduler internal step index from %s to %s",
self.scheduler._step_index,
prev_step_index,
)
self.scheduler._step_index = prev_step_index self.scheduler._step_index = prev_step_index
value[:, :, h_start:h_end, w_start:w_end] += latents_view_denoised value[:, :, h_start:h_end, w_start:w_end] += latents_view_denoised
@ -562,6 +567,11 @@ class StableDiffusionXLPanoramaPipelineMixin(StableDiffusionXLImg2ImgPipelineMix
# reset the scheduler's internal timestep # reset the scheduler's internal timestep
if prev_step_index is not None: if prev_step_index is not None:
logger.debug(
"resetting scheduler internal step index from %s to %s",
self.scheduler._step_index,
prev_step_index,
)
self.scheduler._step_index = prev_step_index self.scheduler._step_index = prev_step_index
if feather[0] > 0.0: if feather[0] > 0.0:
@ -912,6 +922,11 @@ class StableDiffusionXLPanoramaPipelineMixin(StableDiffusionXLImg2ImgPipelineMix
# reset the scheduler's internal timestep # reset the scheduler's internal timestep
if prev_step_index is not None: if prev_step_index is not None:
logger.debug(
"resetting scheduler internal step index from %s to %s",
self.scheduler._step_index,
prev_step_index,
)
self.scheduler._step_index = prev_step_index self.scheduler._step_index = prev_step_index
value[:, :, h_start:h_end, w_start:w_end] += latents_view_denoised value[:, :, h_start:h_end, w_start:w_end] += latents_view_denoised

View File

@ -5,7 +5,6 @@ from typing import Any, List, Optional
from PIL import Image, ImageOps from PIL import Image, ImageOps
from ..chain import ( from ..chain import (
BlendDenoiseFastNLMeansStage,
BlendImg2ImgStage, BlendImg2ImgStage,
BlendMaskStage, BlendMaskStage,
ChainPipeline, ChainPipeline,
@ -130,12 +129,6 @@ def run_txt2img_pipeline(
# apply upscaling and correction, before highres # apply upscaling and correction, before highres
highres_size = get_highres_tile(server, params, highres, tile_size) highres_size = get_highres_tile(server, params, highres, tile_size)
if params.is_panorama():
chain.stage(
BlendDenoiseFastNLMeansStage(),
StageParams(tile_size=highres_size),
)
first_upscale, after_upscale = split_upscale(upscale) first_upscale, after_upscale = split_upscale(upscale)
if first_upscale: if first_upscale:
stage_upscale_correction( stage_upscale_correction(