Files
smthemex-ComfyUI_CustomNet/gradio_utils.py
T
2024-05-21 15:27:39 +08:00

13 lines
380 B
Python

from .customnet_util import create_carvekit_interface, load_and_preprocess
def load_preprocess_model():
carvekit = create_carvekit_interface()
return carvekit
def preprocess_image(models, input_im):
'''
:param input_im (PIL Image).
:return input_im (H, W, 3) array.
'''
input_im = load_and_preprocess(models, input_im)
return input_im