MCPcopy
hub / github.com/KlingAIResearch/ReCamMaster / preprocess_image

Method preprocess_image

diffsynth/pipelines/base.py:30–32  ·  view source on GitHub ↗
(self, image)

Source from the content-addressed store, hash-verified

28
29
30 def preprocess_image(self, image):
31 image = torch.Tensor(np.array(image, dtype=np.float32) * (2 / 255) - 1).permute(2, 0, 1).unsqueeze(0)
32 return image
33
34
35 def preprocess_images(self, images):

Callers 15

preprocess_imagesMethod · 0.95
merge_latentsMethod · 0.95
encode_image_with_vaeMethod · 0.80
encode_video_with_vaeMethod · 0.80
encode_videoMethod · 0.80
encode_imageMethod · 0.80
encode_videoMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected