Oink
Nodes

Train

Train (Nuke CopyCat / BigCat): connect before (Source) and after (Target) frames, list the frames, press Train.

raw .md

Train (Nuke CopyCat / BigCat): connect before (Source) and after (Target) frames, list the frames, press Train. Our own UNet trains in the AI worker on float frames in a log encoding (ACEScct / log2), so highlights and negatives survive. Modes: fix (learns only the change), direct, matte (Target alpha). Checkpoints are .ocat files; View shows the contact sheet or a preview. Dataset adds more shots (show-level). Training runs in the AI worker, so the app stays usable while it runs.

NodeTrain
Type idOC_N_aitrain
MenuAI › Train
Nuke classnone: saved in .nk files as an Oink node
Codeopencomp_core/nodes/ai/aitrain.py

Train properties

Inputs and outputs

PortNameType
input 0Sourceimage
input 1Targetimage
output 0Imageimage

Knobs

Panel tab Aitrain, in panel order.

KnobLabelTypeDefaultRange / valuesNuke knobDescription
modemodemenufixfix (fix (residual)), direct, matte
presetmodelmenusmallsmall (UNet small), medium (UNet medium), large (UNet large)
encodingencodingmenuacescctacescct (ACEScct), log2 (log2 shaper), linear
framesframestextTraining frames, e.g. 1001-1005, 1020, 1030-1060x10
val_framesvalidation framestextHeld-out frames for the PSNR / IoU readout and the contact sheet
dataset_datadataset (shots)text[]More shots (BigCat): JSON [{"name", "source", "target", "frames", "val_frames"}], source/target = node name or file pattern (####)
stepsstepsfloat20001 to 1000000 (integer)
batch_sizebatchfloat81 to 256 (integer)
patch_sizepatchfloat12832 to 1024 (integer)
learning_ratelearning ratefloat0.0010.000001 to 1
lr_scheduleschedulemenucosinecosine, constant, step
warmupwarmupfloat1000 to 100000 (integer)
losslossmenuautoauto, l1 (L1), charbonnier (Charbonnier), l2 (L2), bce (BCE)
grad_weightgradient loss (-1 auto)float-1-1 to 10Edge (gradient) loss weight; -1 = auto (0.5 matte, 0 otherwise)
focusfocus (-1 auto)float-1-1 to 1Share of patches centred on changed pixels / matte edges; -1 = auto (0.5)
aug_flipflipbooltrue
aug_rotaterotate 90boolfalse
aug_exposureexposure jitter (stops)float00 to 4Stops (sigma), applied in the log encoding to source and target
aug_wbwhite balance jitterfloat00 to 2
precisionprecisionmenufp32fp32 (fp32 (TF32)), bf16 (bf16 mixed)
checkpointcheckpointfileModel file (.ocat). Empty = new file in $OPENCOMP_TRAIN_DIR or /mnt/apps/opencomp/train
overwriteoverwritebooltrueTrain (not Resume) replaces an existing checkpoint
val_everyvalidate everyfloat2001 to 100000 (integer)
save_everysave everyfloat5000 to 100000 (integer)
seedseedfloat00 to 2147483647 (integer)
viewviewmenusourcesource, target, preview, contact (contact sheet)
tile_sizetilefloat102464 to 8192 (integer)
overlapoverlapfloat640 to 512 (integer)

Other knobs (Python, .nk and the assistant; not on the panel)

KnobLabelTypeDefaultRange / valuesNuke knobDescription
gl_colorViewer Controls Colorfloat ×30, 0, 00 to 1
postage_stamp_frameStatic Frameint1-2147483648 to 2147483647
lifetimeStartLifetime Startint0-2147483648 to 2147483647
lifetimeEndLifetime Endint100-2147483648 to 2147483647
useLifetimeUse Lifetimebooleanfalse
cachedCachedbooleanfalse
bookmarkBookmarkbooleanfalse
dope_sheetDope Sheetbooleanfalse
clone_groupClone Groupstring
link_sourceLink Sourcestring
link_overridesLink Overridesstring
split_viewsSplit Viewsstring
generationGenerationint0-2147483648 to 2147483647
trained_stepsTrained Stepsint0-2147483648 to 2147483647

Nuke equivalent

No Nuke class. In a .nk file this node is written as an Oink node that Nuke will not recognise.

On this page