put no_grad decorator on make_image closures (#375)

This commit is contained in:
Kevin Gibbons 2022-09-04 18:59:12 -07:00 committed by GitHub
parent 0f93dadd6a
commit a20113d5a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -474,6 +474,7 @@ class T2I:
sampler = self.sampler
@torch.no_grad()
def make_image(x_T):
uc, c = self._get_uc_and_c(prompt, skip_normalize)
shape = [
@ -528,6 +529,7 @@ class T2I:
t_enc = int(strength * steps)
@torch.no_grad()
def make_image(x_T):
uc, c = self._get_uc_and_c(prompt, skip_normalize)