MCPcopy Index your code
hub / github.com/thygate/stable-diffusion-webui-depthmap-script / enlarge_border

Function enlarge_border

inpaint/mesh_tools.py:504–517  ·  view source on GitHub ↗
(mesh, info_on_pix, depth, image, config)

Source from the content-addressed store, hash-verified

502
503
504def enlarge_border(mesh, info_on_pix, depth, image, config):
505 mesh.graph['hoffset'], mesh.graph['woffset'] = config['extrapolation_thickness'], config['extrapolation_thickness']
506 mesh.graph['bord_up'], mesh.graph['bord_left'], mesh.graph['bord_down'], mesh.graph['bord_right'] = \
507 0, 0, mesh.graph['H'], mesh.graph['W']
508 # new_image = np.pad(image,
509 # pad_width=((config['extrapolation_thickness'], config['extrapolation_thickness']),
510 # (config['extrapolation_thickness'], config['extrapolation_thickness']), (0, 0)),
511 # mode='constant')
512 # new_depth = np.pad(depth,
513 # pad_width=((config['extrapolation_thickness'], config['extrapolation_thickness']),
514 # (config['extrapolation_thickness'], config['extrapolation_thickness'])),
515 # mode='constant')
516
517 return mesh, info_on_pix, depth, image
518
519def fill_missing_node(mesh, info_on_pix, image, depth):
520 for x in range(mesh.graph['bord_up'], mesh.graph['bord_down']):

Callers 1

write_meshFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected