This commit is contained in:
mike
2026-06-27 23:36:41 +02:00
parent 2ada5fb559
commit bf3773bfd4
3 changed files with 74 additions and 20 deletions

View File

@@ -1456,7 +1456,7 @@ def _batch_worker(job_id: str, filenames: list, prompts: list[str], poses: list,
seed: int, max_area: int, group_id: str | None = None,
wireframe_ref: str | None = None, wireframe_time: float = 0.5,
pad_top: Any = 0, pad_right: Any = 0,
pad_bottom: Any = 0, pad_left: Any = 0, pad_fill: str = "black",
pad_bottom: Any = 0, pad_left: Any = 0, pad_fill: str = "transparent",
pad_outpaint: bool = False):
output_dir = _load_output_dir()
for fname in filenames:
@@ -3571,13 +3571,13 @@ class PadRequest(BaseModel):
bottom: int | float | str = 0
left: int | float | str = 0
as_copy: bool = True
fill: str = "black" # "black", "white", "transparent"
fill: str = "transparent" # "black", "white", "transparent"
outpaint: bool = False
prompt: str | None = None
def _apply_manual_pad(pil: Image.Image, top, right, bottom, left,
fill: str = "black") -> Image.Image:
fill: str = "transparent") -> Image.Image:
"""Expand canvas by padding pixels on each side. Fill with black, white, or transparency.
Supports pixel values (int) or percentages (str like "10%" or float < 1.0).
"""