mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-04-12 19:42:37 +08:00
Simplify multigpu nodes: default max_gpus=2, remove gpu_options input, disable Options node
Amp-Thread-ID: https://ampcode.com/threads/T-019d3ee9-19d5-767a-9d7a-e50cbbef815b Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
parent
d52dcbc88f
commit
5f4fcd19e7
@ -29,8 +29,7 @@ class MultiGPUWorkUnitsNode(io.ComfyNode):
|
|||||||
description=cleandoc(cls.__doc__),
|
description=cleandoc(cls.__doc__),
|
||||||
inputs=[
|
inputs=[
|
||||||
io.Model.Input("model"),
|
io.Model.Input("model"),
|
||||||
io.Int.Input("max_gpus", default=8, min=1, step=1),
|
io.Int.Input("max_gpus", default=2, min=1, step=1),
|
||||||
io.Custom("GPU_OPTIONS").Input("gpu_options", optional=True),
|
|
||||||
],
|
],
|
||||||
outputs=[
|
outputs=[
|
||||||
io.Model.Output(),
|
io.Model.Output(),
|
||||||
@ -38,8 +37,8 @@ class MultiGPUWorkUnitsNode(io.ComfyNode):
|
|||||||
)
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def execute(cls, model: ModelPatcher, max_gpus: int, gpu_options: comfy.multigpu.GPUOptionsGroup = None) -> io.NodeOutput:
|
def execute(cls, model: ModelPatcher, max_gpus: int) -> io.NodeOutput:
|
||||||
model = comfy.multigpu.create_multigpu_deepclones(model, max_gpus, gpu_options, reuse_loaded=True)
|
model = comfy.multigpu.create_multigpu_deepclones(model, max_gpus, reuse_loaded=True)
|
||||||
return io.NodeOutput(model)
|
return io.NodeOutput(model)
|
||||||
|
|
||||||
|
|
||||||
@ -82,7 +81,7 @@ class MultiGPUExtension(ComfyExtension):
|
|||||||
async def get_node_list(self) -> list[type[io.ComfyNode]]:
|
async def get_node_list(self) -> list[type[io.ComfyNode]]:
|
||||||
return [
|
return [
|
||||||
MultiGPUWorkUnitsNode,
|
MultiGPUWorkUnitsNode,
|
||||||
MultiGPUOptionsNode,
|
# MultiGPUOptionsNode,
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user