Update selection_size

This commit is contained in:
lnyan 2022-10-21 23:21:57 +08:00
parent 6e53498660
commit d8e02ead01
2 changed files with 4 additions and 4 deletions

2
app.py
View File

@ -363,6 +363,8 @@ class StableDiffusionInpaint:
process_height = height
if resize_check:
process_width, process_height = my_resize(width, height)
process_width = process_width*8//8
process_height = process_height*8//8
extra_kwargs = {
"num_inference_steps": step,
"guidance_scale": guidance_scale,

View File

@ -332,12 +332,10 @@ class InfCanvas:
def refine_selection(self):
h,w=self.selection_size_h,self.selection_size_w
h=h//8*8
w=w//8*8
h=min(h,self.height)
w=min(w,self.width)
self.selection_size_h=h
self.selection_size_w=w
self.selection_size_h=h*8//8
self.selection_size_w=w*8//8
self.update_cursor(1,0)