Overview
TheOpenComicAI.__dirname static property stores the base directory used to resolve paths to binary executables.
Type
Default value
Automatically set to the package’s installation directory. Uses__dirname in CommonJS environments or import.meta.dirname in ES modules.
Purpose
This property is used internally to locate platform-specific binary executables (realcugan, waifu2x, upscayl) included with the package.Setting custom dirname
You can override the default directory usingsetDirname():
Example usage
Use cases
Portable applications
Development vs production
Custom binary distribution
How it’s used internally
The__dirname property is used by the binary() method to construct full paths to executables:
Path resolution
Related methods
- setDirname() - Configure the base directory
- binary() - Get path to a model’s binary executable