chore: black fix

This commit is contained in:
blessedcoolant
2023-09-02 10:51:53 +12:00
parent ba2048dbc6
commit a12fbc7406
8 changed files with 59 additions and 56 deletions

View File

@ -1,7 +1,7 @@
import math
import torch
import diffusers
import diffusers
import torch
if torch.backends.mps.is_available():
torch.empty = torch.zeros
@ -203,7 +203,7 @@ class ChunkedSlicedAttnProcessor:
if attn.upcast_attention:
out_item_size = 4
chunk_size = 2 ** 29
chunk_size = 2**29
out_size = query.shape[1] * key.shape[1] * out_item_size
chunks_count = min(query.shape[1], math.ceil((out_size - 1) / chunk_size))

View File

@ -207,7 +207,7 @@ def parallel_data_prefetch(
return gather_res
def rand_perlin_2d(shape, res, device, fade=lambda t: 6 * t ** 5 - 15 * t ** 4 + 10 * t ** 3):
def rand_perlin_2d(shape, res, device, fade=lambda t: 6 * t**5 - 15 * t**4 + 10 * t**3):
delta = (res[0] / shape[0], res[1] / shape[1])
d = (shape[0] // res[0], shape[1] // res[1])