MCPcopy Create free account
hub / github.com/OpenImagingLab/FlashVSR / __call__

Method __call__

diffsynth/controlnets/processors.py:47–61  ·  view source on GitHub ↗
(self, image, mask=None)

Source from the content-addressed store, hash-verified

45 self.processor.model.to(device)
46
47 def __call__(self, image, mask=None):
48 width, height = image.size
49 if self.processor_id == "openpose":
50 kwargs = {
51 "include_body": True,
52 "include_hand": True,
53 "include_face": True
54 }
55 else:
56 kwargs = {}
57 if self.processor is not None:
58 detect_resolution = self.detect_resolution if self.detect_resolution is not None else min(width, height)
59 image = self.processor(image, detect_resolution=detect_resolution, image_resolution=min(width, height), **kwargs)
60 image = image.resize((width, height))
61 return image
62

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected