Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/lllyasviel/sd-forge-layerdiffuse
/ rgba2rgbfp32
Function
rgba2rgbfp32
lib_layerdiffusion/utils.py:16–19 ·
view source on GitHub ↗
(x)
Source
from the content-addressed store, hash-verified
14
15
16
def
rgba2rgbfp32(x):
17
rgb = x[..., :3].astype(np.float32) / 255.0
18
a = x[..., 3:4].astype(np.float32) / 255.0
19
return
0.5 + (rgb - 0.5) * a
20
21
22
def
to255unit8(x):
Callers
1
process_before_every_sampling
Method · 0.90
Calls
no outgoing calls
Tested by
no test coverage detected