Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(gui): enable DPI awareness to avoid bad resolution #1125

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/so_vits_svc_fork/gui.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
from __future__ import annotations

import ctypes

Check warning on line 3 in src/so_vits_svc_fork/gui.py

View check run for this annotation

Codecov / codecov/patch

src/so_vits_svc_fork/gui.py#L3

Added line #L3 was not covered by tests
import json
import multiprocessing
import os
import platform

Check warning on line 7 in src/so_vits_svc_fork/gui.py

View check run for this annotation

Codecov / codecov/patch

src/so_vits_svc_fork/gui.py#L7

Added line #L7 was not covered by tests
from copy import copy
from logging import getLogger
from pathlib import Path
Expand All @@ -16,6 +18,9 @@
from . import __version__
from .utils import get_optimal_device

if int(platform.release()) >= 8:
ctypes.windll.shcore.SetProcessDpiAwareness(True)

Check warning on line 22 in src/so_vits_svc_fork/gui.py

View check run for this annotation

Codecov / codecov/patch

src/so_vits_svc_fork/gui.py#L22

Added line #L22 was not covered by tests

GUI_DEFAULT_PRESETS_PATH = Path(__file__).parent / "default_gui_presets.json"
GUI_PRESETS_PATH = Path("./user_gui_presets.json").absolute()

Expand Down
Loading