Unified command-line wrapper for Topaz Labs AI apps (Gigapixel, Photo AI, Video AI)
pip install topyaz==1.0.1 Copy PIP instructions
topyaz is a powerful Python-based command-line interface (CLI) wrapper that brings Topaz Labs' acclaimed AI-powered image and video enhancement tools—Gigapixel AI, Photo AI, and Video AI—into a single, streamlined interface. It's designed for professionals, content creators, and developers who need to incorporate Topaz AI capabilities into batch processing workflows, automated scripts, or remote processing setups.
Current Status: Local processing works across all three products; remote SSH execution is designed but not yet shipped. See the documentation site for the full command reference.
Topaz Labs' AI products offer exceptional quality but are primarily GUI-driven. topyaz unlocks their power for automated and high-volume tasks by:
Install Topaz Labs Applications: Download and install Gigapixel AI, Photo AI, and Video AI from the Topaz Labs website. Ensure they are licensed and functioning correctly.
Install Python: If you don't have Python 3.9+ and uv (a fast Python package installer), install them.
Install topyaz: Clone the repository and install using uv:
git clone https://github.com/your-username/topyaz.git # Replace with actual repo URL cd topyaz uv pip install . Alternatively, if/when available on PyPI:
topyaz version topyaz info These commands should report version information and details about your system and detected Topaz products. If executables are not found, you might need to configure their paths (see Configuration).
The basic structure of a topyaz command is: topyaz [global_options] [product_options]
These options can be used before the product command (e.g., topyaz --verbose giga ...):
topyaz giga [options...] Common Gigapixel Options:
topyaz giga ./input/image.jpg --scale 4 --model hf --output ./output/image_upscaled.jpg Photo AI (photo) Processes images using Topaz Photo AI.
topyaz photo [options...] Common Photo AI Options:
topyaz photo ./input/raw_image.cr2 --override_autopilot --upscale True --sharpen True --noise False --format_output dng Video AI (video) Processes videos using Topaz Video AI.
topyaz video [options...] Common Video AI Options:
topyaz video ./input/clip.mp4 --model prob-3 --scale 2 --interpolate --fps 60 --codec hevc_nvenc --output ./output/clip_enhanced.mp4 Utility Commands (info, version) topyaz info: Displays system information, detected Topaz products, GPU status, and memory. topyaz version: Shows the version of topyaz and detected Topaz product versions. Programmatic Usage (Python API) You can use topyaz functionalities within your Python scripts.
1. Using TopyazCLI (recommended for simplicity):
from topyaz.cli import TopyazCLI from topyaz.core.types import ProcessingOptions # Configure global options if needed cli_options = { "output_dir": "./processed_media", "verbose": True, "dry_run": False } # Instantiate TopyazCLI. Global options are passed to the constructor. # Product-specific options are passed to the respective methods. cli = TopyazCLI(**cli_options) # Process an image with Gigapixel AI giga_success = cli.giga( input_path="./my_images/photo.jpg", model="hf", scale=2, denoise=50 ) if giga_success: print("Gigapixel AI processing successful!") # Process a video with Video AI video_success = cli.video( input_path="./my_videos/short.mov", model="amq-13", scale=2, interpolate=True, fps=60 ) if video_success: print("Video AI processing successful!") # Process a photo with Photo AI photo_success = cli.photo( input_path="./my_images/portrait.nef", preset="auto", override_autopilot=True, sharpen=True ) if photo_success: print("Photo AI processing successful!") 2. Using individual product classes (for more direct control):
from topyaz.execution.local import LocalExecutor from topyaz.execution.base import ExecutorContext from topyaz.core.types import ProcessingOptions from topyaz.products.gigapixel.api import GigapixelAI from pathlib import Path # Common processing options options = ProcessingOptions( output_dir=Path("./api_output"), verbose=True, timeout=7200 # 2 hours ) # Setup executor executor_context = ExecutorContext(timeout=options.timeout, dry_run=options.dry_run) executor = LocalExecutor(context=executor_context) # Gigapixel AI example gigapixel_processor = GigapixelAI(executor=executor, options=options) result = gigapixel_processor.process( input_path="./my_images/landscape.tiff", output_path="./api_output/landscape_giga.tiff", # Optional, can be auto-generated model="standard", scale=2, sharpen=30 ) if result.success: print(f"Gigapixel processed: {result.output_path}") print(f"Execution time: {result.execution_time:.2f}s") else: print(f"Gigapixel processing failed: {result.error_message}") # Similar instantiation and usage for PhotoAI and VideoAI classes # from topyaz.products.photo_ai.api import PhotoAI # from topyaz.products.video_ai.api import VideoAI Technical Deep Dive Project Structure The topyaz codebase is organized into several key directories under src/topyaz/:
topyaz uses a hierarchical configuration system:
The most important configuration items are the paths to the Topaz product executables. topyaz attempts to find these automatically, but they can be explicitly set in the config.yaml under the paths key if needed:
# Example ~/.topyaz/config.yaml defaults: output_dir: "~/topyaz_output" verbose: true paths: gigapixel: macos: ["/Applications/Topaz Gigapixel AI.app/Contents/Resources/bin/gigapixel"] # windows: ["C:/Program Files/Topaz Labs LLC/Topaz Gigapixel AI/gigapixel.exe"] photo_ai: macos: ["/Applications/Topaz Photo AI.app/Contents/Resources/bin/tpai"] video_ai: macos: ["/Applications/Topaz Video AI.app/Contents/MacOS/ffmpeg"] Execution Flow (Local Processing) User runs a topyaz command (e.g., topyaz giga input.jpg --scale 2). python-fire routes this to the appropriate method in TopyazCLI (e.g., TopyazCLI.giga()). TopyazCLI initializes common ProcessingOptions and the relevant product handler (e.g., GigapixelAI). The product handler (GigapixelAI): Finds the Gigapixel AI executable using configured/default paths. Validates the provided parameters (e.g., scale is within range). Builds the command-line string specific to Gigapixel AI's CLI syntax (e.g., gigapixel --cli -i input.jpg -o output_temp.jpg --scale 2 ...). For Gigapixel/Photo AI, output is typically directed to a temporary directory. Video AI often writes directly. The LocalExecutor runs this command using subprocess.run(). After execution: The product handler parses the stdout and stderr from the Topaz tool for information or errors. If a temporary directory was used, the output file is moved to its final destination. A ProcessingResult object is returned, indicating success/failure and other details. TopyazCLI logs the result and exits. Coding and Contributing Contributions are welcome! Please adhere to the following guidelines.
#!/usr/bin/env -S uv run -s # /// script # dependencies = ["PKG1", "PKG2"] # /// # this_file: path/to/current_file.py File Path Records: Maintain an up-to-date this_file comment near the top of each source file, indicating its path relative to the project root. Commit and Workflow Practices (Summarized from CLAUDE.md)
This project is licensed under the MIT License. Please note that the underlying Topaz Labs products have their own commercial licenses and terms of service.
Both files in this release have provenance metadata.
automation batch-processing cli gigapixel photo-ai topaz upscaling video-ai
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.
Both files in this release have been uploaded with provenance metadata.
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.




