ComfyUI Node

Chroma_Key_Alpha

A ComfyUI node in FunctionAsTexture with 5 inputs and 1 output.

By CoiiChan·Created about a year ago·Updated about a year ago· 2
Chroma_Key_Alpha
  • imga
  • imgb
  • IMAGE
formula#Choma threshold: pfloat1 #Soft Blend: pfloat2 imgb =imgc + imgb[0, 1, 1, :] chomachannel = np.sum((imga * imgb), axis=-1) softmask = chomachannel - np.sum(imga , axis=-1)/3 result = 1- np.ceil(softmask - pfloat1) - softmask * pfloat2
pfloat10.10
pfloat220.00
CategoryFunctionAsTexture

Inputs (5)

NameTypeDefaultDescription
formulaSTRING#Choma threshold: pfloat1 #Soft Blend: pfloat2 imgb =imgc + imgb[0, 1, 1, :] chomachannel = np.sum((imga * imgb), axis=-1) softmask = chomachannel - np.sum(imga , axis=-1)/3 result = 1- np.ceil(softmask - pfloat1) - softmask * pfloat2
pfloat1FLOAT0.100–1Choma threshold: pfloat1.
pfloat2FLOAT20.000–100Soft Blend: pfloat2.
imgaoptIMAGEimage color
imgboptIMAGEchroma color

Outputs (1)

NameTypeDescription
IMAGEIMAGE