From 45feb6cb9cd7c327a79f77bb5da2ed1b0e886078 Mon Sep 17 00:00:00 2001 From: Stephan Auerhahn Date: Wed, 2 Aug 2023 23:14:30 +0000 Subject: [PATCH] Use wrapper correctly in refiner helper --- sgm/inference/api.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sgm/inference/api.py b/sgm/inference/api.py index 12efc06..64c1b02 100644 --- a/sgm/inference/api.py +++ b/sgm/inference/api.py @@ -268,6 +268,12 @@ class SamplingPipeline: "negative_aesthetic_score": 2.5, } + if params.img2img_strength < 1.0: + sampler.discretization = Img2ImgDiscretizationWrapper( + sampler.discretization, + strength=params.img2img_strength, + ) + return do_img2img( image, self.model,