# AIMaterials

> Analyze runs Cosmos DiffusionRenderer 7B (NVIDIA Open Model License, optional: accept the licence first, ~29 GB download) over the frames in overlapping 57-frame windows and outputs layers albedo (lin

Analyze runs Cosmos DiffusionRenderer 7B (NVIDIA Open Model License, optional: accept the licence first, ~29 GB download) over the frames in overlapping 57-frame windows and outputs layers albedo (linear base colour), N (camera-space normals like AINormals), roughness, metallic and depth (relative). The model runs at 1280x704; the result is upsampled to the plate guided by the plate (spatial / range sigma). A frame takes about 18 s on the test GPU. Tick which layers to make (out_*); keep loaded keeps the model ready for the next Analyze. Feed it to Relight (materials / generative).

| Node | AIMaterials |
|---|---|
| Menu | AI › AIMaterials |
| **Names in each format** | |
| .oink comp (JSON) | `"type": "OC_N_aimaterials"` |
| .nk script | none: written as an Oink node |
| Python | `nuke.createNode("OC_N_aimaterials")` |
| Assistant (MCP) | `create_node(type="AIMaterials")` |
| Tab search | `aimaterials`, or its initials `aim` |

![AIMaterials properties](/shots/nodes/aimaterials@2x.webp)

## Inputs and outputs

| Port | Name | Type |
|---|---|---|
| input 0 | Image | image |
| input 1 | cam | scene |
| output 0 | Image | image |

## Knobs

Panel tab **Aimaterials**, in panel order.

| Knob | Label | Type | Default | Range / values | .nk knob | Description |
|---|---|---|---|---|---|---|
| `out_albedo` | albedo | bool | `true` |  |  |  |
| `out_normals` | normals (N) | bool | `true` |  |  |  |
| `out_roughness` | roughness | bool | `true` |  |  |  |
| `out_metallic` | metallic | bool | `true` |  |  |  |
| `out_depth` | depth (relative) | bool | `true` |  |  |  |
| `encode` | input | menu | `srgb` | srgb (scene linear), gamma (linear (gamma 2.2)), none (display) |  |  |
| `steps` | steps | float | `15` | 1 to 50 (integer) |  | Diffusion steps per pass (DPM-Solver++ 2M; 8 is closer to a 40-step solution than the reference's 15 Euler steps) |
| `chunk` | window | menu | `57` | 57 (57 frames), 25 (25 frames), 1 (per frame) |  |  |
| `overlap` | overlap | float | `9` | 0 to 24 (integer) |  | Frames shared by consecutive windows (matched + cross-faded) |
| `seed` | seed | float | `1000` | 0 to 100000 (integer) |  |  |
| `precision` | precision | menu | `auto` | auto, bf16 (bf16 (~19 GB)), fp8 (fp8 (~12 GB)) |  |  |
| `spatial_sigma` | upsample spatial | float | `1` | 0.1 to 4 |  |  |
| `range_sigma` | upsample edge | float | `0.08` | 0.005 to 2 |  |  |
| `keep_other_frames` | keep other frames | bool | `false` |  |  |  |
| `keep_loaded` | keep model loaded | bool | `true` |  |  | Keep the model on the GPU after a run so the next one starts warm; the AI worker still unloads it after 5 idle minutes or when another GPU job needs the card |

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

| Knob | Label | Type | Default | Range / values | .nk knob | Description |
|---|---|---|---|---|---|---|
| `gl_color` | Viewer Controls Color | float ×3 | `0, 0, 0` | 0 to 1 |  |  |
| `postage_stamp_frame` | Static Frame | int | `1` | -2147483648 to 2147483647 |  |  |
| `lifetimeStart` | Lifetime Start | int | `0` | -2147483648 to 2147483647 |  |  |
| `lifetimeEnd` | Lifetime End | int | `100` | -2147483648 to 2147483647 |  |  |
| `useLifetime` | Use Lifetime | boolean | `false` |  |  |  |
| `cached` | Cached | boolean | `false` |  |  |  |
| `bookmark` | Bookmark | boolean | `false` |  |  |  |
| `dope_sheet` | Dope Sheet | boolean | `false` |  |  |  |
| `clone_group` | Clone Group | string |  |  |  |  |
| `link_source` | Link Source | string |  |  |  |  |
| `link_overrides` | Link Overrides | string |  |  |  |  |
| `split_views` | Split Views | string |  |  |  |  |
| `results_data` | Results | string | `{}` |  |  |  |
| `analysed_first` | Analysed First | int | `0` | -2147483648 to 2147483647 |  |  |
| `analysed_last` | Analysed Last | int | `-1` | -2147483648 to 2147483647 |  |  |
| `seconds_per_frame` | Seconds / Frame | float | `0` | -3.4028234663852886e+38 to 3.4028234663852886e+38 |  |  |
| `peak_vram` | Peak VRAM (GB) | float | `0` | -3.4028234663852886e+38 to 3.4028234663852886e+38 |  |  |


---
Sources: opencomp_core/nodes/ai/aimaterials.py, opencomp_electron/src/components/properties/knobSchema.ts, opencomp_core/nodes/help/aimaterials.md
