stable-diffusion-webui / modules /sd_hijack_checkpoint.py
nolanaatama's picture
Initial commit
f2a3c57
raw
history blame contribute delete
313 Bytes
from torch.utils.checkpoint import checkpoint
def BasicTransformerBlock_forward(self, x, context=None):
return checkpoint(self._forward, x, context)
def AttentionBlock_forward(self, x):
return checkpoint(self._forward, x)
def ResBlock_forward(self, x, emb):
return checkpoint(self._forward, x, emb)