ComfyUI Node

Panner

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

By CoiiChan·Created about a year ago·Updated about a year ago· 2
Panner
  • imga
  • IMAGE
formulax_shift = -pint1 y_shift = -pint2 height, width = imga.shape[1:3] new_x = np.clip(np.arange(width) + x_shift, 0, width - 1) new_y = np.clip(np.arange(height) + y_shift, 0, height - 1) X, Y = np.meshgrid(new_x, new_y) result = imga[:, Y, X, :]
pint10
pint20
CategoryFunctionAsTexture

Inputs (4)

NameTypeDefaultDescription
formulaSTRINGx_shift = -pint1 y_shift = -pint2 height, width = imga.shape[1:3] new_x = np.clip(np.arange(width) + x_shift, 0, width - 1) new_y = np.clip(np.arange(height) + y_shift, 0, height - 1) X, Y = np.meshgrid(new_x, new_y) result = imga[:, Y, X, :]
imgaoptIMAGEOptional ,Reference size ,Default =(1,512,512,3)
pint1optINT0Optional(INT),X-Axis Pixel(s).
pint2optINT0Optional(INT),Y-Axis Pixel(s).

Outputs (1)

NameTypeDescription
IMAGEIMAGE