Force GPU rendering python script #54099
Labels
No Label
Good First Issue
Priority
High
Priority
Low
Priority
Normal
Status
Archived
Status
Confirmed
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Job Type
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No Assignees
11 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: studio/flamenco#54099
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
In our quest to get our GPU workers to use all available GPU's we have found a script.
This script doesn't work when added to the script>startup directory. We don't know why.
But, when added to the commandline in the yaml file of the manager it works perfectly.
Add this to the commandline. --enable-autoexec --python "S:/-location script-/gpurender.py"
gpurender.py is below script.
Our request is to have this be added in the flamenco worker code or something. And have a checkbox somewhere to enable this feature..
We hope it helps!
With kind regards,
Dennis Teusink
Added subscriber: @Alientrick
Added subscriber: @nguyenbs
We are urgently need this feature
Added subscriber: @brecht
Something like this should work:
Added subscriber: @joel_nl
This comment was removed by @joel_nl
Thanks @brecht!
@joel_nl I've added Brecht's script to Flamenco Worker, to the blender/blender#53099-gpu-rendering branch, but I haven't created anything around that yet. Can you test that the script works by adding
--enable-autoexec --python "/path/to/flamenco-worker/flamenco_worker/enable_all_gpus.py"
to theblender
variable in yourflamenco-manager.yaml
?Added subscriber: @campino
Adding the script to my blender variable in flamenco-manager.yaml works for me.
@dr.sybren I previously haven't had a chance to test this script properly. For now we are working with Backburner as our main render farm tool. We would like to use Flamenco though. But it is not very compatible with our Windows network. Everytime we try to work with Flamenco we run into strange issues.
I've tested this script though and it works fine. Now we need a checkbox or something in the Flamenco panel to activate it or something. Thanks...
Please make sure that you have the latest Blender Cloud add-on 1.11.0 (just released) as it contains Windows and Blender 2.8 fixes. If you still see issues, please provide us with a proper bug report.
That is good to know.
Why? As @campino said you can just add it to the Flamenco Manager config.
We will.
I think the same problem is occurring as that path resolve thing here Projects on mapped network drives fail .
When i change the script location to a network drive and set the variable in the yaml file
windows: S:/!Apz/Blender/Flamenco Blender 2.79/Blender/Blender.exe --python //rackstation/software/!Apz/Blender/enable_all_gpus.py
it returns this.
OSError: Python file "C:\Users\Administrator\Desktop\flamenco-worker-2.1.0-windows//RACKSTATION/software/!Apz/Blender/enable_all_gpus.py" could not be opened: No such file or directory
It doesn't matter if i use a drive letter, backslashes or forward slashes. If i put it between quotation marks, like in the documentation, the manager won't even run.
I recommend not using any exclamation marks in your path. Also only use mapped network drives (so
S:/
instead of*rackstation/software
), as*
means something else to Blender. That, and of course blender/blender-asset-tracer#60131 should be fixed.That why i tried every which version i know of url. Nothing worked. This version was with the slashes...
Ok... That worked. Which is weird because the path to Blender itself also contains an exclamation mark. Don't know why it works but it does. so i'm happy. We are changing the structure of our Software/Install server anyway. It is a mess. This folder for instance is like 20 years old. :)
Thanks for all the help!
Added subscriber: @dfelinto
Changed status from 'Confirmed' to: 'Archived'
Hi, thanks for your patch.
We are undergoing a Tracker Curfew where we are automatically closing old patches.
If you think the patch is still relevant please update and re-submit it. For new features make sure there is a clear design from the user level perspective.
Added subscriber: @itschrisho
Hi,
I currently have the script that @brecht wrote. Then using the command line on windows im running:
blender.exe blender_scenes\bmw27\bmw27_gpu.blend -b -f 0 -P GPURender.py
I see the python script gets executed as I put print statements to make sure it actually runs. However, looking at my task manager, the cpu usage is still 100%.
Can someone help as to why this is not making my GPU do the rendering?
Thanks for the help!
Added subscriber: @simon-28
Hi, having the same problem...
On a headless Virtual Machine in the cloud running Ubuntu 18.04 installation with CUDA and NVIDIA drivers all installed and showing up correctl.
Using Blender 2.8 but file continues to render on CPU,
Here's the command line
this is the use_gpu.py python file
Any help would be greatly appreciated.
Simon
You can run Blender with
--debug-cycles
to see what it is doing, and also check that there is no Python error in executing that script.The example script I gave was a simple example, for use in production it needs error handling and verification there is actually a CUDA device, and if not abort rendering.
Added subscriber: @seal
looking at my flamenco task logs, it seems like the gpy python script runs AFTER all frames have been rendered:
can that be?
🤨
@horatio_engelmann if you think you found a bug please open a new report, this 5 year old report is not going to be reopened.