MCPcopy Create free account
hub / github.com/ali-vilab/VACE / get_annotator_instance

Function get_annotator_instance

vace/annotators/utils.py:345–352  ·  view source on GitHub ↗
(anno_cfg)

Source from the content-addressed store, hash-verified

343
344
345def get_annotator_instance(anno_cfg):
346 import vace.annotators as annotators
347 anno_cfg = copy.deepcopy(anno_cfg)
348 class_name = anno_cfg.pop("NAME")
349 input_params = anno_cfg.pop("INPUTS")
350 output_params = anno_cfg.pop("OUTPUTS")
351 anno_ins = getattr(annotators, class_name)(cfg=anno_cfg)
352 return {"inputs": input_params, "outputs": output_params, "anno_ins": anno_ins}
353
354def get_annotator(config_type='', config_task='', return_dict=True):
355 anno_dict = None

Callers 1

get_annotatorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected