diff options
author | Buckzor <bucklogos@yahoo.co.uk> | 2022-10-13 16:07:06 +0000 |
---|---|---|
committer | AUTOMATIC1111 <16777216c@gmail.com> | 2022-10-14 13:47:16 +0000 |
commit | b2261b53ae4ad01b3713bc73ff62ab7b6f479e26 (patch) | |
tree | 30ffbffa304e956cbdfa9af31f9d373904fe58af /modules/processing.py | |
parent | 9e5ca5077f43bb3ec1a0ec41b47964cb38d544a6 (diff) | |
download | stable-diffusion-webui-gfx803-b2261b53ae4ad01b3713bc73ff62ab7b6f479e26.tar.gz stable-diffusion-webui-gfx803-b2261b53ae4ad01b3713bc73ff62ab7b6f479e26.tar.bz2 stable-diffusion-webui-gfx803-b2261b53ae4ad01b3713bc73ff62ab7b6f479e26.zip |
Added first_pass_width and height as adjustable inputs to "High Res Fix"
Diffstat (limited to 'modules/processing.py')
-rw-r--r-- | modules/processing.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/processing.py b/modules/processing.py index d5172f00..abbfdf98 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -506,11 +506,13 @@ class StableDiffusionProcessingTxt2Img(StableDiffusionProcessing): firstphase_width_truncated = 0
firstphase_height_truncated = 0
- def __init__(self, enable_hr=False, scale_latent=True, denoising_strength=0.75, **kwargs):
+ def __init__(self, enable_hr=False, scale_latent=True, denoising_strength=0.75, first_pass_width=512, first_pass_height=512, **kwargs):
super().__init__(**kwargs)
self.enable_hr = enable_hr
self.scale_latent = scale_latent
self.denoising_strength = denoising_strength
+ self.first_pass_width = first_pass_width
+ self.first_pass_height = first_pass_height
def init(self, all_prompts, all_seeds, all_subseeds):
if self.enable_hr:
@@ -519,7 +521,7 @@ class StableDiffusionProcessingTxt2Img(StableDiffusionProcessing): else:
state.job_count = state.job_count * 2
- desired_pixel_count = 512 * 512
+ desired_pixel_count = self.first_pass_width * self.first_pass_height
actual_pixel_count = self.width * self.height
scale = math.sqrt(desired_pixel_count / actual_pixel_count)
|