MCPcopy Create free account
hub / github.com/YesianRohn/TextSSR / save_image

Function save_image

diffusers/scripts/convert_consistency_decoder.py:181–189  ·  view source on GitHub ↗
(image, name)

Source from the content-addressed store, hash-verified

179
180
181def save_image(image, name):
182 import numpy as np
183 from PIL import Image
184
185 image = image[0].cpu().numpy()
186 image = (image + 1.0) * 127.5
187 image = image.clip(0, 255).astype(np.uint8)
188 image = Image.fromarray(image.transpose(1, 2, 0))
189 image.save(name)
190
191
192def load_image(uri, size=None, center_crop=False):

Callers 2

dps_pipeline.pyFile · 0.85

Calls 1

transposeMethod · 0.80

Tested by

no test coverage detected