Ways to improve GPU utilization of Fusion in Resolve 17?

Get answers to your questions about color grading, editing and finishing with DaVinci Resolve.
  • Author
  • Message
Offline

ShutterlabCreative

  • Posts: 44
  • Joined: Tue Aug 27, 2019 2:45 am
  • Real Name: Michael Garske

Ways to improve GPU utilization of Fusion in Resolve 17?

PostSun Sep 19, 2021 11:04 pm

*operating on the Desktop referenced in my signature

Davinci Resolve tech spec requirements: https://www.richardlackey.com/davinci-resolve-system-requirements/#GPU

Source footage: 5.9k, h.264, 29.97p, 4:2:0 10-bit - shot with a Panasonic S1
Proxy Settings: Half Resolution, DnXHR SQ
Timeline: 1 timeline, 1080x1080 resolution, ~90 seconds in length, use proxy files is enabled
Problemed asset: 1, 147 frame-long Fusion Composition, sky replacement using ~4k-resolution jpg sky image.
Cache Files: All timeline footage is graded and cached with the exception of the above Fusion Composition, which, won't Color or Fusion cache.

Problem: GPU RAM is maxing out on my 2 GTX 1080 8Gbs at 7.6Gb when play previewing problemed sky replacement asset (in Edit or Fusion Tab), rendering in place in Edit Tab, or outputting timeline via the Deliver Tab (bypassing proxies and proxy cache). When attempting to play preview/render in place/output in Deliver Tab, Resolve crashes completely. this is a simple timeline with all straight cuts. Other than the 2 of the above-mentioned Fusion comps, there are no effects used beyond a color pass.

Question 1: What steps can I take to help Resolve Fusion Page function for this, and other, modest tasks?

Question 2: It appears my computer's specs are adequate to use Fusion within Resolve 17 based on the minimum system requirements. Especially for something as seemingly benign as the cited sky replacement. Based on your experience, are the minimum requirements not functionally accurate for work in the Fusion Tab?

I am in awe that something that seems so simple would consume the entirety of my computer's resources consistently crashing Resolve. As I haven't used Fusion Tab all that much, I assume there are some custom settings to help with GPU RAM utilization.
Attachments
Fusion sky replacement node tree.png
This is the node structure/method of combining source shot and jpg image
Fusion sky replacement node tree.png (733.54 KiB) Viewed 2915 times
Studio 18.5b3
LAPTOP- Win10 Home - i7-9750H@2.6 -- 64GB RAM
- RTX2070 8Gb
- System - 1Tb NVMe - Work Drive ext. 2Tb NVMe
DESKTOP- Win10 Pro - i7-3930K@3.2 - 64GB RAM
- RTX 4090 (Latest Firmware)
- System - 1Tb SSD | Cache - 2Tb SSD | Work Drive 4Tb SSD
Offline
User avatar

TheBloke

  • Posts: 1905
  • Joined: Sat Nov 02, 2019 11:49 pm
  • Location: UK
  • Real Name: Tom Jobbins

Re: Ways to improve GPU utilization of Fusion in Resolve 17?

PostMon Sep 20, 2021 6:19 am

A Fusion composition placed directly on a clip on a timeline will see the full resolution of that clip. You can see that in the top right corner of the viewer in your screenshot - 5952 x 3968.

To force Fusion to see a clip at Timeline resolution - 1080x1080 in your case - you can make a Fusion Clip or Compound Clip out of it, then create the Fusion composition on top of that. The clip will then be scaled by Resolve to the timeline resolution (using the Scaling method defined in Project Settings, or set individually inside the Fusion/Compound Clip in the Inspector), and then passed to Fusion at that resolution.

Processing 1080x1080 will make a massive difference to performance and RAM/VRAM requirements versus processing 5952 x 3968. In your current arrangement, you're sending your clip at full 5952 x 3968 resolution to Fusion, it's processing all those millions of pixels, then Resolve is scaling the result down to 1080x1080 for display on the Timeline and Deliver. If you do it the other way around, a massive amount of Fusion processing will be avoided.

Secondly, Fusion only uses a single GPU, so your second 1080 is doing nothing in Fusion. A 1080 is quite a weak GPU for processing 5K clips, so it's not surprising it would be slow.

Thirdly, just checking you're not loading the sky or any other still image via a MediaIn? I don't think you are, based on your screenshot, but just to be sure. If a MediaIn node is used to load a still image, it will not be cached in RAM, but rather be sent over and over to the GPU on every single frame, like it was video footage. This can kill performance and greatly increase VRAM usage. More info on that here: Fusion page: Major performance issue with MediaIn v Loader. Using a Loader node instead will solve those problems.

Fourthly, yeah Resolve + Fusion crashes or freezes quite a lot I'm afraid. Especially in low resource situations.

Finally, if you experience situations where Fusion's playback/rendering speed gradually or quickly degrades over time, try adding the following line of code to the Frame Render Script of the MediaOut node. This will work around bugs in RAM and VRAM caching that cause Fusion performance to tank unless the cache is regularly cleared out:
Code: Select all
if time % 20 == 0 then fu:PurgeCache() end
More info on that issue in these threads:
- viewtopic.php?f=21&t=146819
- https://www.steakunderwater.com/wesuckl ... p?p=38547&

In conclusion: you should find that enclosing the clip in a Fusion or Compound Clip makes a massive difference because it'll change Fusion's processing to 1080x1080 which is 20x fewer pixels than 5952*3968. It should then render OK then I would hope. On top of that change, double check you're not using any MediaIn nodes for still images, and if you get performance degradation, try adding the Frame Render Script.
Resolve Studio 17.4.3 and Fusion Studio 17.4.3 on macOS 11.6.1

Hackintosh:: X299, Intel i9-10980XE, 128GB DDR4, AMD 6900XT 16GB
Monitors: 1 x 3840x2160 & 3 x 1920x1200
Disk: 2TB NVMe + 4TB RAID0 NVMe; NAS: 36TB RAID6
BMD Speed Editor
Offline
User avatar

TheBloke

  • Posts: 1905
  • Joined: Sat Nov 02, 2019 11:49 pm
  • Location: UK
  • Real Name: Tom Jobbins

Re: Ways to improve GPU utilization of Fusion in Resolve 17?

PostMon Sep 20, 2021 6:29 am

PS. As a Resolve Studio user, you have free access to Fusion Studio. If you're having performance problems in Resolve - or even if you're not - you could try doing your Fusion compositions in Fusion Studio.

This still has many of the same performance limitations and bugs, but it can access more of your RAM, doesn't have MediaIn nodes so you can't be crippled by accidentally loading a still image via a MediaIn, and historically has often performed better and more reliably than Resolve. It also has a slightly more flexible (less crippled) UI.

Here's a video explaining the differences and some methods for interchanging between Resolve and Fusion Studio:
Resolve Studio 17.4.3 and Fusion Studio 17.4.3 on macOS 11.6.1

Hackintosh:: X299, Intel i9-10980XE, 128GB DDR4, AMD 6900XT 16GB
Monitors: 1 x 3840x2160 & 3 x 1920x1200
Disk: 2TB NVMe + 4TB RAID0 NVMe; NAS: 36TB RAID6
BMD Speed Editor
Offline

ZRGARDNE

  • Posts: 697
  • Joined: Sun May 16, 2021 12:32 am
  • Real Name: Zeb Gardner

Re: Ways to improve GPU utilization of Fusion in Resolve 17?

PostThu Sep 23, 2021 9:26 pm

TheBloke wrote: you can make a Fusion Clip or Compound Clip out of it, then create the Fusion composition on top of that. The clip will then be scaled by Resolve to the timeline resolution (using the Scaling method defined in Project Settings, or set individually inside the Fusion/Compound Clip in the Inspector), and then passed to Fusion at that resolution.


I always make fusion clips before editing in fusion. Is there a case where this would be a bad idea?
Offline
User avatar

TheBloke

  • Posts: 1905
  • Joined: Sat Nov 02, 2019 11:49 pm
  • Location: UK
  • Real Name: Tom Jobbins

Re: Ways to improve GPU utilization of Fusion in Resolve 17?

PostFri Sep 24, 2021 5:01 pm

ZRGARDNE wrote:I always make fusion clips before editing in fusion. Is there a case where this would be a bad idea?
Two situations:

- Where you want Fusion to access the full resolution of the source clip, not have it be scaled to timeline resolution. For example because the source media is higher resolution and you wish to do the cropping/scaling yourself. Or where you're doing tracking and want to use the full resolution of the clip to get better results.

- Where the source media is higher resolution than the Timeline and you wish to use the "Center Crop with no resize" scaling method. A similar point to the first one, but for a very different reason: higher resolution media that's nested, ie in a Compound Clip, Fusion Clip, Multicam Clip, or nested timeline, will be cropped to the timeline resolution, and does not support panning around or zooming in/out at the full resolution.

Simple example: You have a 1080p timeline and some UHD clips. You plan to pan around the UHD clip, like a Ken Burns style effect. If you make a Fusion Clip of this clip, you will not be able to do that. As soon as you try to pan, you'll get black bars. This is because container clips do not properly support higher resolution media.


Other than that, no it's fine to make Fusion Clips and it may be more convenient as it standardises the frame range so that the comp always starts at frame 0.

Also, Fusion Clips are very powerful in situations where you want to composite multiple layers. If you make a Fusion Clip containing multiple video layers (one or more clips above another), you will get multiple MediaIn nodes in the Fusion Clip and can control how the layers are composited.
Resolve Studio 17.4.3 and Fusion Studio 17.4.3 on macOS 11.6.1

Hackintosh:: X299, Intel i9-10980XE, 128GB DDR4, AMD 6900XT 16GB
Monitors: 1 x 3840x2160 & 3 x 1920x1200
Disk: 2TB NVMe + 4TB RAID0 NVMe; NAS: 36TB RAID6
BMD Speed Editor
Offline

TheRealTomHM

  • Posts: 3
  • Joined: Fri Jan 13, 2023 12:13 pm
  • Real Name: Tom Holder

Re: Ways to improve GPU utilization of Fusion in Resolve 17?

PostTue Jan 17, 2023 5:27 pm

TheBloke wrote:Thirdly, just checking you're not loading the sky or any other still image via a MediaIn? I don't think you are, based on your screenshot, but just to be sure. If a MediaIn node is used to load a still image, it will not be cached in RAM, but rather be sent over and over to the GPU on every single frame, like it was video footage. This can kill performance and greatly increase VRAM usage. More info on that here: Apparently I'm not allowed to quote/post URLsFusion page: Major performance issue with MediaIn v Loader[/url]. Using a Loader node instead will solve those problems.


I appreciate that this is an old thread but the MediaIn v Loader revelation that you investigated and shared has been a godsend. I'm using Resolve 18 and the issue still applies. I've been making Fusion compositions with numerous images loaded into a 3D environment. Switching the MediaIns to Loaders has been an absolute game-changer. My project was instantly using all 8Gb VRAM and grinding to a halt before crashing. Using loaders has halved (at least, presumably Resolve was asking for more than 8Gb) this demand and sped up everything else in the process.

I'm so grateful for internet heroes like yourself. Thank you. 8-)

Return to DaVinci Resolve

Who is online

Users browsing this forum: Bing [Bot], Cupless, Exabot [Bot], Krynox, Philipp Walz and 280 guests