MCPcopy Create free account
hub / github.com/cubiq/ComfyUI_IPAdapter_plus / max_

Function max_

utils.py:334–338  ·  view source on GitHub ↗
(tensor_list)

Source from the content-addressed store, hash-verified

332 return torch.clamp(mn, min=0)
333
334def max_(tensor_list):
335 # return the element-wise max of the tensor list.
336 x = torch.stack(tensor_list)
337 mx = x.max(axis=0)[0]
338 return torch.clamp(mx, max=1)
339
340# From https://github.com/Jamy-L/Pytorch-Contrast-Adaptive-Sharpening/
341def contrast_adaptive_sharpening(image, amount):

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected