Back to Articles
Fixing Progressively Slower Renders in Nuke
Clear caches before each frame to help with progressively slower frame rendering in Nuke.
In some Nuke projects, each frame takes progressively longer during a continuous render. The first frame renders quickly, but later frames slow down; in extreme cases, the estimated time for one frame can reach 2,000 hours.
When this happens, add the following code under the Write node's Python → Before Each Frame callback to clear caches before rendering each frame.
python
1nukescripts.clearAllCaches()To apply this setting automatically to newly created Write nodes, add the following code to init.py in your .nuke folder.
python
nuke.knobDefault("Write.beforeFrameRender", 'nukescripts.clearAllCaches()')