Open hjchen2 opened 2 weeks ago
The changes introduce new functionalities in the onediff_comfy_nodes
package, primarily through the addition of the prestartup_script.py
, gcu.py
, and npu.py
files. The prestartup_script.py
dynamically imports Python and shared object files from a specified directory, while gcu.py
implements error handling for the import of the torch_gcu
module. The npu.py
file checks for NPU availability, conditionally imports components, and defines several patch functions to override existing functionalities in the comfy.model_management
module.
File Path | Change Summary |
---|---|
onediff_comfy_nodes/prestartup_script.py |
Introduced a script for dynamic importing of Python and shared object files from prestartup_scripts . |
onediff_comfy_nodes/prestartup_scripts/gcu.py |
Added a try-except block to handle import errors for torch_gcu gracefully. |
onediff_comfy_nodes/prestartup_scripts/npu.py |
Added functionality to check NPU availability, import related components, and define patch functions. Functions added and signatures updated for comfy.model_management . |
In the burrow where code does play,
New scripts hop in, brightening the day.
With patches and imports, oh what a sight,
NPU and GCU, ready for flight!
So let’s code and create, with joy we’ll embrace,
A world of new features, in our cozy space! 🐇✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit