mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-10 06:10:50 +08:00
update extra nodes
This commit is contained in:
parent
26e9b67732
commit
a7ef3e04ea
@ -340,7 +340,7 @@ class ModelPatcher(ModelManageable, PatchSupport):
|
||||
def loaded_size(self):
|
||||
return self._memory_measurements.model_loaded_weight_memory
|
||||
|
||||
def clone(self):
|
||||
def clone(self) -> "ModelPatcher":
|
||||
n = self.__class__(self.model, self.load_device, self.offload_device, self.model_size(), weight_inplace_update=self.weight_inplace_update)
|
||||
n._memory_measurements = self._memory_measurements
|
||||
n.ckpt_name = self.ckpt_name
|
||||
|
||||
@ -7,8 +7,8 @@ import torch
|
||||
from PIL import Image
|
||||
from typing_extensions import override
|
||||
|
||||
import folder_paths
|
||||
import node_helpers
|
||||
from comfy.cmd import folder_paths
|
||||
from comfy import node_helpers
|
||||
from comfy_api.latest import ComfyExtension, io
|
||||
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import nodes
|
||||
import node_helpers
|
||||
from comfy.nodes import base_nodes as nodes
|
||||
from comfy import node_helpers
|
||||
import torch
|
||||
import comfy.model_management
|
||||
import comfy.utils
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
from comfy.model_patcher import ModelPatcher
|
||||
from comfy_api.latest import ComfyExtension, io
|
||||
from typing_extensions import override
|
||||
|
||||
@ -29,7 +30,7 @@ class ScaleROPE(io.ComfyNode):
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def execute(cls, model, scale_x, shift_x, scale_y, shift_y, scale_t, shift_t) -> io.NodeOutput:
|
||||
def execute(cls, model: ModelPatcher, scale_x, shift_x, scale_y, shift_y, scale_t, shift_t) -> io.NodeOutput:
|
||||
m = model.clone()
|
||||
m.set_model_rope_options(scale_x, shift_x, scale_y, shift_y, scale_t, shift_t)
|
||||
return io.NodeOutput(m)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user