Implement BiRefNet and HAT Sharper models with background removal capabilities
- Added validation documentation for AI model tiers. - Introduced `background.py` for background removal logic, including inference functions for alpha and foreground extraction. - Created `onnx_birefnet.py` to handle BiRefNet model sessions and alpha inference. - Developed tests for background models, ensuring proper dispatch and session reuse. - Added tests for BiRefNet ONNX model to validate alpha output and error handling for invalid values. - Implemented model export scripts for BiRefNet and HAT Sharper, ensuring proper weight compression and licensing. - Created `deform_sampling.py` for deformable convolution operations used in BiRefNet. - Added utility functions for compressing ONNX weights without altering graph arithmetic. - Introduced a reference plane node for depth field adjustments in geometry processing.
This commit is contained in:
@@ -164,6 +164,12 @@ class BlenderTestCase(unittest.TestCase):
|
||||
|
||||
|
||||
def setUp(self):
|
||||
timer_callbacks = set()
|
||||
self.fake_bpy.app.timers = SimpleNamespace(
|
||||
is_registered=timer_callbacks.__contains__,
|
||||
register=lambda callback, **options: timer_callbacks.add(callback),
|
||||
unregister=timer_callbacks.remove,
|
||||
)
|
||||
preferences = SimpleNamespace(
|
||||
storage_root="",
|
||||
device="CUDA",
|
||||
|
||||
Reference in New Issue
Block a user