MCPcopy Create free account
hub / github.com/thygate/stable-diffusion-webui-depthmap-script / depth_resize

Function depth_resize

inpaint/utils.py:974–986  ·  view source on GitHub ↗
(depth, origin_size, image_size)

Source from the content-addressed store, hash-verified

972 return depth
973
974def depth_resize(depth, origin_size, image_size):
975 if origin_size[0] != 0:
976 max_depth = depth.max()
977 depth = depth / max_depth
978 depth = resize(depth, origin_size, order=1, mode='edge')
979 depth = depth * max_depth
980 else:
981 max_depth = depth.max()
982 depth = depth / max_depth
983 depth = resize(depth, image_size, order=1, mode='edge')
984 depth = depth * max_depth
985
986 return depth
987
988def filter_irrelevant_edge(self_edge, other_edges, other_edges_with_id, current_edge_id, context, edge_ccs, mesh, anchor):
989 other_edges = other_edges.squeeze()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected