GPU render
Hello
So, I'm creating a comic book that requires a bunch of images, which I'm rendering.
But lately, I've noticed that after 1 or 2 renders, Daz Studio just stops using the GPU for rendering and the Post Denoiser.
Looking at the logs, I noticed this happening, and even after using the Scene Optimizer, it's still the same.
Does anyone have any idea what could be causing this? It's super frustrating, and it started happening after the last Daz Studio update
Below, I’ve included the log lines and some images of my settings
2024-12-23 11:51:21.720 Iray [INFO] - IRAY:RENDER :: 1.0 IRAY rend info : Available GPU memory has increased since out-of-memory failure. Re-enabling CUDA device 0 (NVIDIA GeForce RTX 4060)
2024-12-23 11:51:25.623 Iray [INFO] - IRAY:RENDER :: 1.0 IRAY rend info : Rendering...
2024-12-23 11:51:25.624 Iray [INFO] - IRAY:RENDER :: 1.0 IRAY rend info : Received update to 00164 iterations after 11:29.437.
2024-12-23 11:51:25.962 Iray [INFO] - IRAY:RENDER :: 1.12 IRAY rend info : Initializing OptiX for CUDA device 0
2024-12-23 11:51:28.027 [WARNING] :: \src\pluginsource\DzIrayRender\dzneuraymgr.cpp(373): Iray [ERROR] - IRAY:RENDER :: 1.13 IRAY rend error: CUDA device 0 (NVIDIA GeForce RTX 4060): Not enough memory for kernel launches (254.292 MiB (out of 254.855 MiB total) still required, 0 B available). Cannot allocate framebuffer.
2024-12-23 11:51:28.027 [WARNING] :: \src\pluginsource\DzIrayRender\dzneuraymgr.cpp(373): Iray [ERROR] - IRAY:RENDER :: 1.13 IRAY rend error: CUDA device 0 (NVIDIA GeForce RTX 4060): Failed to setup device frame buffer
2024-12-23 11:51:28.027 [WARNING] :: \src\pluginsource\DzIrayRender\dzneuraymgr.cpp(373): Iray [ERROR] - IRAY:RENDER :: 1.13 IRAY rend error: CUDA device 0 (NVIDIA GeForce RTX 4060): Device failed while rendering
2024-12-23 11:51:28.027 [WARNING] :: \src\pluginsource\DzIrayRender\dzneuraymgr.cpp(373): Iray [WARNING] - IRAY:RENDER :: 1.13 IRAY rend warn : CUDA device 0 (NVIDIA GeForce RTX 4060) ran out of memory and is temporarily unavailable for rendering.
2024-12-23 11:51:30.340 Iray [INFO] - IRAY:RENDER :: 1.0 IRAY rend info : Received update to 00165 iterations after 11:34.154
I have:
- RTX 4060
- Ryzen 7 3600
- 32GB of RAM
If anyone has any tips on which settings to use to optimize rendering, I'm all ears.
I'm using "Comic Life 3" to write the speech bubbles and everything else...
@edit
Every time this issue happens, I have to close Daz Studio and reopen it to get the GPU to work again
Comments
What is your nVidia driver version?
last one, december 10
Yes, you ran out of VRAM... 4060 only has 8GB VRAM. With a rough calculation, DS consumes 0.5GB, iray Engine reserves 2.2GB at least with latest driver, your scene consumes certain GB (let's conservativly say, 0.8GB), you only have 4.5GB VRAM availabe for being used for rendering with GPU.
After a couple of round rendering, you'd have such issue... i.e. it was approaching the threshold of "not enough VRAM" .In your DS log, it just happened to be short of 0.25GB VRAM ...
So, better check VRAM Usage with GPU-Z. If the issue constantly persists, further try optimizing your scenes BY:
1) downgrading render SubD level, giving more setting in terms of texture compressing, avoid using HD morphs / HD textures, yada yada ~
2) using Scene Optimizer.
Try rolling back to the minimum version required for this version of Iray, or as close as possible (but do bear in mind that there was a serious security issue with older drivers).
You're saying that GPU rendering works for the first couple of times, but then fails due to insufficient VRAM, right?
I think the root cause is that Daz Studio isn't releasing VRAM properly.
When this happens, I also give up and restart Daz Studio.
Richard and crosswind, do you know of any way to properly release VRAM without restarting Daz Studio?
already used the Scene Optimizer, you know any guide about this settings you mentioned?
You're right ! Besides the way you mentioned, I'm not aware of any other way, haha ~~
But throughout the experiments I've ever done before, after saving the render or closing the render window, appr. 99% consumed VRAM will be released except for the 2.2G+ buffer that iray Engine reserves. This buffer can be only released after DS is fully closed.
And, AFAIK, NVIDIA Iray drawstyle may leave residual used VRAM that cannot be fully released. So, after a couple of Rendering / Previewing, boom ! fall back to CPU.
I have a threshold of appr. 21GB, I also have the fallback when rendering BIG SCENES.
Try optimization by further cranking up the Level in settings... Here's a nice tutorial from Jay : https://youtu.be/dBz_8zHufDk?si=rI53VwPpGXZFIjwO
Oh, that's a shame.
I'll try to optimize my scene to reduce its resource demands so I can do the required times of GPU rendering without running out of VRAM.
I use Render Queue a lot and have the exact same problem where 3-4 renders go quickly then it drops the GPU to CPU and takes forever to render the next picture. I'm using a GTX-3070, 8 Gb VRAM. I just ordered a GTX-4070 with 16 Gb VRAM. Will that solve this annoying issue?
I have this same issue. I have 8Gigs of VRAM and a biggish scene. I can do do 2-3 renders and then I need to restart Daz to completely free up all the VRAM. It's really frustrating.
I'm sorry to say but proposed solutions/ideas, like using scene optimizers or throwing money into more expensive GPUs, are in my opinion, no good at all. They only carry you a bit further when the real problem is wasted resources because of a bug in either Iray or in Daz Studio. It would be really intresting to hear Daz devs point of view where the problem really lies, because it seems this problem is not new.
Searching this forum one can see that this problem, or something very similar, has been around already since 2017. Many pages of wondering and pondering about scene optimizers and nvidia driver updates but no solution.
I have my own "fix" to share though. Not perfect but it addresses the problem itself which is about purging the VRAM memory: If you install iRay Server and use the iRay bridge to connect Daz to it (Render Setting -> Bridge), all it takes to clear VRAM memory is toggle GPU Enabled switch OFF and back ON in the Iray Server admin console. At the instant you toggle it off you see all the VRAM memory purged. It's a lot faster and easier to do than to restart Daz Studio. You can also just restart iRay Server itself between renders which is also fast to do, but then you need to reconnect to it in Daz. But that is still way easier and faster than rebooting whole Daz.
I have tested this solution with 2 different setups: Running Daz in my Mac and Iray Server in my Windows machine with the GPU and then running both apps my Windows machine. It makes no difference, VRAM memory problem is real in both setups but this "fix" seems also work with both.