1
0
Fork 0

apply lint

This commit is contained in:
Sean Sube 2023-07-13 07:35:20 -05:00
parent 5ecc874c70
commit eebbd8e7c7
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
2 changed files with 6 additions and 5 deletions

View File

@ -279,14 +279,13 @@ def get_tile_latents(
xt = x + t
yt = y + t
mx = size.width // LATENT_FACTOR
my = size.height // LATENT_FACTOR
tile_latents = full_latents[:, :, y:yt, x:xt]
if tile_latents.shape[2] < t or tile_latents.shape[3] < t:
extra_latents = get_latents_from_seed(seed, size, batch=tile_latents.shape[0])
extra_latents[:, :, 0:tile_latents.shape[2], 0:tile_latents.shape[3]] = tile_latents
extra_latents[
:, :, 0 : tile_latents.shape[2], 0 : tile_latents.shape[3]
] = tile_latents
tile_latents = extra_latents
return tile_latents

View File

@ -474,7 +474,9 @@ def load_wildcards(server: ServerContext) -> None:
)
for file in wildcard_files:
with open(path.join(server.model_path, "wildcard", file), "r", encoding="utf-8") as f:
with open(
path.join(server.model_path, "wildcard", file), "r", encoding="utf-8"
) as f:
lines = f.read().splitlines()
lines = [line.strip() for line in lines if not line.startswith("#")]
lines = [line for line in lines if len(line) > 0]