feat: Implement upscale functionality with ONNX models
- Added upscale operator to handle image upscaling by 4x using AI models. - Introduced new jobs for upscale processing in the server, including debug and standard upscale jobs. - Created a new ONNX model handler for upscale operations, supporting tiled inference and resource management. - Updated tests to cover new upscale functionality, including input validation and output verification. - Added documentation for the upscale feature, detailing usage and model options.
This commit is contained in:
@@ -21,8 +21,8 @@ from .panel import (
|
||||
Da3OutputDebugPanel,
|
||||
DebugPanel,
|
||||
Moge2ApiDebugPanel,
|
||||
RealesrganGeneralX4v3DebugPanel,
|
||||
ServerPanel,
|
||||
UpscaleDebugPanel,
|
||||
)
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ CLASSES = (
|
||||
Moge2ApiDebugPanel,
|
||||
Da3OutputDebugPanel,
|
||||
Ben2RemovalDebugPanel,
|
||||
RealesrganGeneralX4v3DebugPanel,
|
||||
UpscaleDebugPanel,
|
||||
)
|
||||
|
||||
|
||||
@@ -72,8 +72,11 @@ def register():
|
||||
bpy.types.Scene.anyimage_settings = bpy.props.PointerProperty(
|
||||
type=AnyImageSettings,
|
||||
)
|
||||
bpy.types.VIEW3D_MT_object_context_menu.append(draw_image_context_menu)
|
||||
bpy.types.OUTLINER_MT_object.append(draw_image_context_menu)
|
||||
bpy.types.Image.anyimage_upscale_source = bpy.props.PointerProperty(
|
||||
type=bpy.types.Image,
|
||||
)
|
||||
bpy.types.VIEW3D_MT_object_context_menu.prepend(draw_image_context_menu)
|
||||
bpy.types.OUTLINER_MT_object.prepend(draw_image_context_menu)
|
||||
clipboard_image.register_keymaps()
|
||||
runtime.register()
|
||||
|
||||
@@ -91,5 +94,7 @@ def unregister():
|
||||
bpy.types.OUTLINER_MT_object.remove(draw_image_context_menu)
|
||||
if hasattr(bpy.types.Scene, "anyimage_settings"):
|
||||
del bpy.types.Scene.anyimage_settings
|
||||
if hasattr(bpy.types.Image, "anyimage_upscale_source"):
|
||||
del bpy.types.Image.anyimage_upscale_source
|
||||
for class_type in reversed(CLASSES):
|
||||
bpy.utils.unregister_class(class_type)
|
||||
|
||||
Reference in New Issue
Block a user