MCPcopy Create free account
hub / github.com/thygate/stable-diffusion-webui-depthmap-script / to_base64_PIL

Function to_base64_PIL

scripts/depthmap_api.py:38–39  ·  view source on GitHub ↗
(encoding: str)

Source from the content-addressed store, hash-verified

36
37
38def to_base64_PIL(encoding: str):
39 return Image.fromarray(np.array(api.decode_base64_to_image(encoding)).astype('uint8'))
40
41
42def depth_api(_: gr.Blocks, app: FastAPI):

Callers 2

processFunction · 0.85
process_videoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected