elegant patcher

This commit is contained in:
lllyasviel
2024-02-02 00:34:18 -08:00
parent b944aa9242
commit da6041dd93
2 changed files with 5 additions and 3 deletions

View File

@@ -46,3 +46,6 @@ class DiffusersModelPatcher:
models=[self.patcher],
memory_required=inference_memory
)
def move_tensor_to_current_device(self, x):
return x.to(device=self.patcher.current_device, dtype=self.dtype)