make highres work with SDXL and use a full-size txt2img stage
This commit is contained in:
parent
ee430a962b
commit
2c8ba67ecb
|
@ -57,7 +57,7 @@ class BlendImg2ImgStage(BaseStage):
|
||||||
pipe_params["strength"] = strength
|
pipe_params["strength"] = strength
|
||||||
elif params.is_panorama():
|
elif params.is_panorama():
|
||||||
pipe_params["strength"] = strength
|
pipe_params["strength"] = strength
|
||||||
elif pipe_type == "img2img":
|
elif pipe_type == "img2img" or pipe_type == "img2img-sdxl":
|
||||||
pipe_params["strength"] = strength
|
pipe_params["strength"] = strength
|
||||||
elif pipe_type == "pix2pix":
|
elif pipe_type == "pix2pix":
|
||||||
pipe_params["image_guidance_scale"] = strength
|
pipe_params["image_guidance_scale"] = strength
|
||||||
|
@ -83,7 +83,7 @@ class BlendImg2ImgStage(BaseStage):
|
||||||
pipe, prompt_pairs, params.batch, params.do_cfg()
|
pipe, prompt_pairs, params.batch, params.do_cfg()
|
||||||
)
|
)
|
||||||
|
|
||||||
if not params.xl():
|
if not params.is_xl():
|
||||||
pipe.unet.set_prompts(prompt_embeds)
|
pipe.unet.set_prompts(prompt_embeds)
|
||||||
|
|
||||||
rng = np.random.RandomState(params.seed)
|
rng = np.random.RandomState(params.seed)
|
||||||
|
|
|
@ -43,7 +43,7 @@ def run_txt2img_pipeline(
|
||||||
highres: HighresParams,
|
highres: HighresParams,
|
||||||
) -> None:
|
) -> None:
|
||||||
# if using panorama, the pipeline will tile itself (views)
|
# if using panorama, the pipeline will tile itself (views)
|
||||||
if params.is_panorama():
|
if params.is_panorama() or params.is_xl():
|
||||||
tile_size = max(params.tiles, size.width, size.height)
|
tile_size = max(params.tiles, size.width, size.height)
|
||||||
else:
|
else:
|
||||||
tile_size = params.tiles
|
tile_size = params.tiles
|
||||||
|
|
|
@ -261,6 +261,8 @@ class ImageParams:
|
||||||
if group == "img2img":
|
if group == "img2img":
|
||||||
if pipeline in ["controlnet", "img2img-sdxl", "lpw", "panorama", "pix2pix"]:
|
if pipeline in ["controlnet", "img2img-sdxl", "lpw", "panorama", "pix2pix"]:
|
||||||
return pipeline
|
return pipeline
|
||||||
|
elif pipeline == "txt2img-sdxl":
|
||||||
|
return "img2img-sdxl"
|
||||||
elif group == "inpaint":
|
elif group == "inpaint":
|
||||||
if pipeline in ["controlnet", "lpw", "panorama"]:
|
if pipeline in ["controlnet", "lpw", "panorama"]:
|
||||||
return pipeline
|
return pipeline
|
||||||
|
|
Loading…
Reference in New Issue