MCPcopy Create free account
hub / github.com/modelscope/DiffSynth-Studio / process_image

Method process_image

diffsynth/processors/RIFE.py:24–31  ·  view source on GitHub ↗
(self, image)

Source from the content-addressed store, hash-verified

22 return RIFESmoother(model_manager.RIFE, device=model_manager.device, **kwargs)
23
24 def process_image(self, image):
25 width, height = image.size
26 if width % 32 != 0 or height % 32 != 0:
27 width = (width + 31) // 32
28 height = (height + 31) // 32
29 image = image.resize((width, height))
30 image = torch.Tensor(np.array(image, dtype=np.float32)[:, :, [2,1,0]] / 255).permute(2, 0, 1)
31 return image
32
33 def process_images(self, images):
34 images = [self.process_image(image) for image in images]

Callers 6

process_imagesMethod · 0.95
__call__Method · 0.45
__call__Method · 0.45
__call__Method · 0.45
__call__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected