> ## Documentation Index
> Fetch the complete documentation index at: https://ollm-opencomic-ai-bin-7.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# setModelsPath()

> Configure a custom path for AI upscaling models

Sets a custom directory path where OpenComic AI models are stored. This is useful when you want to manage models in a different location than the default.

## Syntax

```typescript theme={null}
OpenComicAI.setModelsPath(path: string): void
```

## Parameters

**path** `string` *required*

Absolute or relative path to the models directory. The path must exist or an error will be thrown.

## Returns

`void` - This method does not return a value.

## Behavior

* The path is resolved to an absolute path automatically
* Validates that the directory exists before setting
* Throws an error if the specified path does not exist

## Example

```typescript theme={null}
import OpenComicAI from '@opencomic/ai-bin';

// Set custom models directory
OpenComicAI.setModelsPath('./custom-models');

// Or use an absolute path
OpenComicAI.setModelsPath('/usr/local/opencomic/models');
```

## Error handling

```typescript theme={null}
try {
  OpenComicAI.setModelsPath('/path/to/models');
} catch (error) {
  console.error('Models path does not exist:', error.message);
}
```

## Related

* [setDirname()](https://ollm-opencomic-ai-bin-7.mintlify.site/api/set-dirname.md) - Configure the package root directory
* [Model selection](https://ollm-opencomic-ai-bin-7.mintlify.site/guides/model-selection.md) - Learn about available models

## Source

Defined in index.mts:758-767


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.