MCPcopy Create free account
hub / github.com/YesianRohn/TextSSR / clamp_rect

Function clamp_rect

diffusers/examples/community/tiled_upscaling.py:56–62  ·  view source on GitHub ↗
(rect: [int], min: [int], max: [int])

Source from the content-addressed store, hash-verified

54
55
56def clamp_rect(rect: [int], min: [int], max: [int]):
57 return (
58 clamp(rect[0], min[0], max[0]),
59 clamp(rect[1], min[1], max[1]),
60 clamp(rect[2], min[0], max[0]),
61 clamp(rect[3], min[1], max[1]),
62 )
63
64
65def add_overlap_rect(rect: [int], overlap: int, image_size: [int]):

Callers 1

add_overlap_rectFunction · 0.85

Calls 1

clampFunction · 0.85

Tested by

no test coverage detected