Skip to content

Config

upscaler.Config dataclass

Global configuration for the upscaler.

Most values can be set via the CLI, YAML configuration file, or programmatically. The to_dict method can be used for YAML export.

Attributes:

Name Type Description
program Optional[List[str]]

Command and arguments to launch before starting to upscale.

select bool

If True, interactively select a window from a list.

daemon bool

If True, run in daemon mode and automatically match profiles.

daemon_exclude bool

If True, exclude the active window from daemon matching.

target_title Optional[str]

Substring to match when selecting a window by title.

target_title_regex Optional[str]

Regular expression to match a window title.

follow_focus bool

If True, follow the currently focused window.

pause_on_focus_loss bool

If True, hide overlay when the target loses focus.

focus_poll_interval float

Seconds between focus checks.

daemon_poll_interval float

Seconds between daemon window scans.

pipeline_poll_interval float

Seconds between pipeline idle checks.

target_delay float

Seconds to wait before capturing the active window.

pid_timeout float

Seconds for PID‑based window detection.

class_timeout float

Seconds for WM_CLASS‑based detection.

total_timeout float

Maximum seconds to wait for a window.

starting_phase int

Which detection phase to try first (1 or 2).

model str

SRCNN model name.

double_upscale bool

If True, chain two 2x passes for 4x upscaling.

upsampler str

Final upsampling filter (lanczos, fsr, nis).

downsampler str

Final downsampling filter (catmull, lanczos).

blur float

Kernel width for final resampling.

antiring_strength float

Anti‑ringing strength.

tight_antiring bool

If True, use tight anti‑ringing.

kernel_radius Optional[int]

Override automatic Lanczos radius.

deband_enabled bool

If True, apply debanding before scaling.

deband_strength float

Debanding intensity.

cas_enabled bool

If True, apply Contrast Adaptive Sharpening.

cas_strength float

CAS intensity.

bloom_enabled bool

If True, apply bloom.

bloom_strength float

Bloom intensity.

bloom_threshold float

Brightness threshold for bloom.

bloom_radius int

Blur radius for bloom in pixels.

vignette_enabled bool

If True, apply vignette.

vignette_strength float

Vignette intensity.

vignette_radius float

Distance from center where vignette starts.

vignette_falloff float

Softness of vignette transition.

lut_enabled bool

If True, apply 3D color LUT.

lut_intensity float

Blend between original and graded image.

lut_preset str

Built‑in LUT preset name.

grain_enabled bool

If True, apply film grain.

grain_strength float

Film grain intensity.

grain_size float

Apparent particle size.

gpu Optional[str]

GPU selection identifier.

monitor str

Monitor to cover ('primary', 'all', name, or index).

scale_factor Optional[float]

Manual scale factor override.

output_geometry str

Output sizing mode (fit, stretch, cover, custom).

crop_top int

Pixels to crop from top.

crop_bottom int

Pixels to crop from bottom.

crop_left int

Pixels to crop from left.

crop_right int

Pixels to crop from right.

background_color BackgroundColor

Color for letterbox bars.

offset_x int

Horizontal content offset in pixels.

offset_y int

Vertical content offset in pixels.

overlay_mode str

Overlay window behavior.

hide_cursor Optional[int]

Milliseconds of inactivity before hiding cursor.

overlay_opacity_min float

Minimum overlay opacity.

overlay_opacity_max float

Maximum overlay opacity.

screenshot_dir str

Directory for screenshots.

screenshot_filename str

Filename template for screenshots.

show_osd bool

If True, show on‑screen display messages.

osd_duration float

How long OSD messages stay visible.

max_fps Optional[int]

Maximum pipeline frames per second.

vulkan_present_mode str

Vulkan presentation mode (fifo, mailbox, immediate).

vulkan_buffer_pool_size int

Number of staging buffers.

frame_timeout int

GPU frame fence timeout in nanoseconds.

use_tile_processing bool

If True, enable tile‑based processing.

use_damage_tracking bool

If True, transfer only damaged regions.

tile_size int

Tile interior size in pixels.

tile_context_margin int

Extra border pixels added to each tile.

max_tile_layers int

Maximum tiles to process per frame.

area_threshold float

Dirty area fraction that forces full‑frame fallback.

max_capture_failures int

Consecutive capture failures before shutdown.

capture_failure_delay float

Seconds to wait after a capture failure.

swapchain_debounce float

Minimum seconds between swapchain recreations.

log_level str

Logging verbosity (DEBUG, INFO, WARNING, ERROR).

log_file Optional[str]

Optional log file path.

config_file Optional[str]

Internal path of loaded config file.

hotkeys Dict[str, str]

Mapping of action names to hotkey strings.

to_dict(diff_only=True)

Convert config to a dict suitable for YAML dump.