Present Best Way to Install MLOPs in Houdini
I had an issue while installing MLOPs just following the tutorial, and to solve the problems, I went to different communities but got no solution, in the end, Bismuth's discord community, I got an answer from @.jaydrake who gave me the best steps for the current time to make MLOPs work. Thank you for saving my project.
Below are the steps that currently work for setting up MLOPs, which are needed to use Open AI API, with the help of one of the users in the BV's discord server @.jaydrake.
Setting up and installing MLOPs:
1. Checking your Python version with Houdini's Python Interpreter by going to the main options bar at the top where Windows -> Python Shell.
3. Then go to https://github.com/Bismuth-Consultancy-BV/MLOPs, and install GitHub Desktop, which is the best way to clone the repository inside your computers. This method of using the MLOPs repository is proposed by the developers themselves. (Choose an option - open with GitHub Desktop)
4. Then copy the MLOPs.json file and paste it to E:\Houdini20.5.487\packages, it showed me this path as I changed the place for installation otherwise, you can even find it in E:\USER\Documents\houdini20.5\packages.
5. Open the MLOPs.json file you pasted and modify the environment variable "MLOPS": "C:/Users/Mo/Documents/GitHub/MLOPs" to your personal path where you installed your MLOPs directory. (Make sure you change your path to forward slashes ('/') in Windows)
6. Run Houdini and add MLOPs by going to the plus icon on shelves and ticking MLOPS.
7. If you are using Houdini version 20.5, you will need to update the /MLOPs/scripts/python/mlops_utils.py file so that lines 281 and 282 read "Environment Variables" with a capital V instead of the lowercase V.
8. You'll want to go ahead and install Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/. I installed the first option and did not mess with the settings. It's labeled as Visual Studio Build Tools 2022 in the application.
9. Now you can open Houdini, I would recommend launching as administrator every time you open from here on during the installation process.
10. Next, you want to open the MLOPs shelf tab and, press the 'Pip install' button and just type pip to install the latest version of pip, restart Houdini once it is finished.
11. Then you'll want to press the 'Pip install' button again and type: "numpy==1.24.4, psutil==5.8.0". These are dependencies I believe are specific to Houdini 20.5. restart Houdini again.
12. Now press the 'Install Dependencies' button. Hopefully, no errors will pop up for you. It actually took about 20 minutes to install all the dependencies on my computer. You may be able to see how far it's gone by opening the Python shell in Houdini before pressing the button, but I neglected to do that when I installed so I just checked the MLOPs\data\dependencies\python and saw it was filling up with files.
13. This step didn't work for me, so I avoided it. (Open your MLOPs.JSON file again and change your PYTHONPATH to explicitly point to your PIP. Here is what mine looked like:
})
14. Next, locate the dynamic_modules_utils.py script. Mine was here: E:\GitHub\MLOPS2\data\dependencies\python\diffusers\utils. Open it and delete cached_download from the import line.
15. Finally, open Houdini and click download model. For me, this took a while. It failed the first time from a crash but worked the second time. Restart Houdini
This step is for those who followed through all the steps :).
16. Adding API key in Houdini: Search for "houdini.env" in directory \USER\Documents\houdini20.5. Add this line in the file "OPENAI_API_KEY=<User's Open AI API key>". You can generate your Open AI API key at "https://platform.openai.com/api-keys", remember to add balance before using otherwise it won't work!
The file looks like this:
All Credits go to:
- Paul Ambrosiussen: https://youtu.be/dX4Fm2a9M_Y?si=5k-MxoHkrK6bH7rD
- Discord Username: @.jaydrake

Comments
Post a Comment