Gigapixel Command Line Interface

Released in version 7.3.0

Gigapixel's Command Line Interface (CLI) feature, available exclusively to Pro License users, offers advanced functionality for efficient batch processing and integration into automated workflows. Users can leverage this feature to upscale images with precision and speed directly from the command line, ensuring seamless integration with existing software systems and maximizing productivity.


Updated: July 31, 2024

Command line flags subject to change.

After install, you should be able to access it from the command line/powershell/terminal by typing in gigapixel (or gigapixel-alpha/gigapixel-beta depending on release type) as the command.

With no arguments, this should print a usage dialog.


Basics for Usage

  • -m, --model for model. Valid values are specified in json files but should account for common shortenings (e.g., art, cg, and cgi are valid for Art & CGI model)
    • If there is a short code missing that you tried and it didn't work let us know
    • Rescue and Eva are not hooked up

List of AI Models and their Corresponding Aliases

AI Model NamesAliases
Art & CG"art", "cg", "cgi"
Lines"lines", "compression"
Very Compressed"very compressed", "high compression", "vc"
High Fidelity"hf", "high fidelity", "fidelity"
Low Resolution"low", "lowres", "low resolution", "low res"
Standard"std", "standard"
Text & Shapes"text", "txt", "text refine"
  • –mv, --model-version for model version. Valid values are based on the UI model versions, so version 2 is for standard, low res, and high fidelity models
  • --dn/--denoise, --sh/--sharpen, --cm/--compression for the various model options. Accepts values 1-100.
  • --fr, --face-recovery for both enabling and setting face recovery strength. Accepts values 1-100.
  • --scale, --width, --height for setting upscale type/value. All mutually exclusive.
  • --res, --resolution for setting pixel density
    • Valid values are stuff like 300ppi, 150ppcm
  • -i or --input specifies which files or folders to process.
  • -r, --recursive should recurse into subdirectories when finding input files
  • -o, --output to specify output folder
  • --cf, --create-folder will create the output folder if it doesn't exist
  • --prefix adds a prefix to the output file name
  • --suffix adds a suffix to the output file name
  • --overwrite allows overwriting file (CANNOT BE UNDONE)
  • --flatten will flatten folder structure if using recursive mode
    • e.g., input/a/1.png and input/b/2.png would be put in output folder without the a/b directories
  • -f, --image-format specifies the output file type
    • Accepts jpg, jpeg, tif, tiff, png, and preserve (default)
    • jpg/tif vs jpeg/tiff will allow 3 vs 4 character output extensions for flexibility
  • --tc, --tiff-compression sets the tiff compression type
    • Valid values are none, zip (default), and lzw
    • Only used if output type is tiff (either set directly or through preserve)
  • --pc, --png-compression sets compression level for png outputs
    • Valid values are 0-9 (default 4)
    • Only used if output type is png (either set directly or through preserve)
  • --bd, --bit-depth sets the bit depth of the output
    • Valid values are 0 (default), 8, and 16
    • 0 will preserve input bit depth
  • --jq, --jpeg-quality sets output jpeg quality
    • Valid values are 0-100 (default 95)
  • --cs, --colorspace sets what color space to use for output
    • Valid values are preserve (default), sRGB, Pro Photo, Apple, Adobe, Wide, and CMYK
  • --icc specifies a custom color profile to use for output
    • Overrides --colorspace flag except in the case of CMYK
  • --verbose turns on more logging lines
  • --q, --quiet turns off all logging (some logs may still leak through though)
  • -p, --parallel enables reading multiple files at once to save time at the cost of memory
    • Accepts any positive integer. A value of 1 is identical to normal flow, a value of 10 would load 10 images at once.
    • Note that the parallel reading is capped at 8GB estimate file size (image size + upscaled image size estimate)
  • –am, --append-model appends model name and scale to the end of the filename (not implemented yet)

Example Usages

The gigapixel executable should be on the path by default after install, but if not you can add it to your path. The default paths should be:


Windows:

C:\Program Files\Topaz Labs LLC\Topaz Gigapixel AI\bin

Mac:

/Applications/Topaz Gigapixel AI.app/Contents/Resources/bin

Upscale all files in a folder by 2x using auto settings, preserving all aspects of image format (extension, bit depth, etc):

gigapixel --recursive -i ~/Pictures/inputs -o ~/Pictures/outputs --scale 2

Upscale all files inside input directory recursively

gigapixel --recursive -i ~/Pictures/inputs -o ~/Pictures/outputs --scale 2

Upscale a single raw and convert it to a jpg without using autopilot (all model parameters are set)

gigapixel --recursive -i ~/Pictures/input.cr3 -o ~/Pictures/outputs --scale 2 -m std \
--mv 2 --denoise 30 --sharpen 10 --compression 5 --image-format jpg \
--jpeg-quality 95

Upscale using face recovery set to 80 strength

gigapixel --recursive -i ~/Pictures/input.jpg -o ~/Pictures/outputs --scale 2 --face-recovery 80

File List

About Gigaprint™