Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/ollm/opencomic-ai-models/llms.txt

Use this file to discover all available pages before exploring further.

opencomic-ai-models is published directly on GitHub and is not available on the public npm registry. You install it by pointing your package manager at the GitHub repository using the github: protocol shorthand. This means no npm publish step is needed on the maintainer’s side — the package is always fetched straight from source, including the bundled model weights in models/.

Install the Package

npm install github:ollm/opencomic-ai-models
Your package manager will clone the repository, run the prepare script (which invokes Rollup to produce dist/index.mjs, dist/index.cjs, and dist/index.d.ts), and place the result under node_modules/opencomic-ai-models/.

Verify the Installation

After installation, confirm that the model weight files are present by listing the bundled models/ directory:
ls node_modules/opencomic-ai-models/models/
You should see subdirectories such as realesrgan-x4plus-anime, opencomic-ai-artifact-removal, opencomic-ai-descreen-hard, and so on. If the directory exists and is populated, the installation is complete.

ESM and CJS Support

The package’s exports field in package.json registers separate entry points for both module systems, so no additional configuration is needed:
{
  "exports": {
    "import": "./dist/index.mjs",
    "require": "./dist/index.cjs"
  }
}
Node.js automatically selects dist/index.mjs when you use import and dist/index.cjs when you use require. Both resolve the same models/ path — the behaviour is identical regardless of which module system your project uses.
opencomic-ai-models is built targeting ESNext and is tested on modern versions of Node.js. Use Node.js 18 or later to ensure full compatibility with import.meta.dirname (used internally to resolve the models path at runtime) and the exports field resolution algorithm.

TypeScript Types

The package ships pre-generated TypeScript declaration files — no @types/opencomic-ai-models package is required. The types field in package.json points directly to the bundled declarations:
{
  "types": "./dist/index.d.ts"
}
The exported type reflects the single-property API:
// dist/index.d.ts (generated)
declare const _default: {
    path: string;
};
export default _default;
TypeScript will infer OpenComicAIModels.path as string automatically when you import the default export.

Build docs developers (and LLMs) love