MCPcopy Create free account
hub / github.com/aigc3d/LHM / __init__

Method __init__

LHM/utils/preprocess.py:27–30  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

25 """
26
27 def __init__(self):
28 self.rembg_session = rembg.new_session(
29 providers=["CUDAExecutionProvider", "CPUExecutionProvider"],
30 )
31
32 def preprocess(self, image_path: str, save_path: str, rmbg: bool = True, recenter: bool = True, size: int = 512, border_ratio: float = 0.2):
33 image = self.step_load_to_size(image_path=image_path, size=size*2)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected