mirror of
https://github.com/vladmandic/automatic
synced 2026-09-20 01:31:13 +02:00
Merge branch 'dev' of https://github.com/vladmandic/sdnext into dev
This commit is contained in:
@@ -213,6 +213,7 @@ class OffloadHook(accelerate.hooks.ModelHook):
|
||||
return False
|
||||
return True
|
||||
|
||||
@torch.compiler.disable
|
||||
def pre_forward(self, module, *args, **kwargs):
|
||||
_id = id(module)
|
||||
|
||||
@@ -261,6 +262,7 @@ class OffloadHook(accelerate.hooks.ModelHook):
|
||||
self.last_pre = _id
|
||||
return args, kwargs
|
||||
|
||||
@torch.compiler.disable
|
||||
def post_forward(self, module, output):
|
||||
if self.last_post != id(module):
|
||||
self.last_post = id(module)
|
||||
|
||||
Reference in New Issue
Block a user