ComfyUI Node
if (FuncAsTexture)
A ComfyUI node in FunctionAsTexture with 5 inputs and 1 output.
if (FuncAsTexture)
- imga
- imgb
- imgc
- IMAGE
◄formula#if function info: if imga < constant pfloat1: use imgc else: use imgb
#equalthreshold = 0.01
#lessweight = np.floor(1- imga + pfloat1- equalthreshold)
lessweight = np.floor(1- imga + pfloat1)
largeweight = np.ceil(imga - pfloat1)
result = imgb*largeweight + imgc*lessweight►
◄pfloat10.50►
CategoryFunctionAsTexture
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| formula | STRING | #if function info: if imga < constant pfloat1: use imgc else: use imgb #equalthreshold = 0.01 #lessweight = np.floor(1- imga + pfloat1- equalthreshold) lessweight = np.floor(1- imga + pfloat1) largeweight = np.ceil(imga - pfloat1) result = imgb*largeweight + imgc*lessweight | — |
| imgaopt | IMAGE | Optional ,Reference size ,Default =(1,512,512,3) | |
| imgbopt | IMAGE | Defined OutPut1,When imga >= constant pfloat1 | |
| imgcopt | IMAGE | Defined OutPut2,When imga < constant pfloat1 | |
| pfloat1opt | FLOAT | 0.500–1 | imga compare with constant pfloat1. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |