MCPcopy Create free account
hub / github.com/ShihaoZhaoZSH/Uni-ControlNet / __init__

Method __init__

annotator/content/__init__.py:11–16  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

9
10class ContentDetector:
11 def __init__(self):
12
13 model_name = "openai/clip-vit-large-patch14"
14
15 self.model = CLIPModel.from_pretrained(model_name, cache_dir=annotator_ckpts_path).cuda().eval()
16 self.processor = AutoProcessor.from_pretrained(model_name, cache_dir=annotator_ckpts_path)
17
18 def __call__(self, img):
19 assert img.ndim == 3

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected