Skip to content

Commit

Permalink
apply lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Jul 13, 2023
1 parent 5ecc874 commit eebbd8e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 3 additions & 4 deletions api/onnx_web/diffusers/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion api/onnx_web/server/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit eebbd8e

Please sign in to comment.