mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2024-06-07 21:20:49 +00:00
MAde poor man's outpainting do less extra useless work.
This commit is contained in:
parent
e92d4cf747
commit
795d49aa24
@ -47,10 +47,13 @@ class Script(scripts.Script):
|
|||||||
|
|
||||||
if left > 0:
|
if left > 0:
|
||||||
left = left * (target_w - init_img.width) // (left + right)
|
left = left * (target_w - init_img.width) // (left + right)
|
||||||
|
if right > 0:
|
||||||
right = target_w - init_img.width - left
|
right = target_w - init_img.width - left
|
||||||
|
|
||||||
if up > 0:
|
if up > 0:
|
||||||
up = up * (target_h - init_img.height) // (up + down)
|
up = up * (target_h - init_img.height) // (up + down)
|
||||||
|
|
||||||
|
if down > 0:
|
||||||
down = target_h - init_img.height - up
|
down = target_h - init_img.height - up
|
||||||
|
|
||||||
img = Image.new("RGB", (target_w, target_h))
|
img = Image.new("RGB", (target_w, target_h))
|
||||||
|
Loading…
Reference in New Issue
Block a user