Skip to content

Commit

Permalink
Fix kernel names display
Browse files Browse the repository at this point in the history
Thanks @yuv420p10le for the fix!

Co-Authored-By: smolkitten <[email protected]>
  • Loading branch information
LightArrowsEXE and yuv420p10le committed Nov 8, 2023
1 parent d67747c commit 53a06b2
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions getfscaler/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,16 @@ def get_kernel_name(kernel: KernelT) -> tuple[str, str]:
kernel = Kernel.ensure_obj(kernel)

kernel_name = kernel.__class__.__name__
extended_name = kernel_name

if isinstance(kernel, Bicubic):
kernel_name = f"Bicubic (b={kernel.b:.2f}, c={kernel.c:.2f})"
extended_name += f" (Bicubic b={kernel.b:.2f}, c={kernel.c:.2f})"
elif isinstance(kernel, Lanczos):
kernel_name += f" (taps={kernel.taps})"
extended_name += f" (taps={kernel.taps})"

debug(f"Checking error for {kernel.__class__.__name__} ({kernel_name})...", get_kernel_name)
debug(f"Checking error for {kernel.__class__.__name__} ({extended_name})...", get_kernel_name)

return kernel_name, kernel.__class__.__name__
return kernel_name, extended_name


def get_error(
Expand Down

0 comments on commit 53a06b2

Please sign in to comment.