Skip to content

Commit

Permalink
fix(api): keep kernel slices within bounds
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Jun 17, 2023
1 parent c1a4484 commit 5713957
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/onnx_web/convert/diffusion/lora.py
Expand Up @@ -79,8 +79,8 @@ def fix_node_name(key: str):

def kernel_slice(x: int, y: int, shape: Tuple[int, int, int, int]) -> Tuple[int, int]:
return (
max(x, shape[2]),
max(y, shape[3]),
min(x, shape[2] - 1),
min(y, shape[3] - 1),
)


Expand Down

0 comments on commit 5713957

Please sign in to comment.