Skip to content

Commit

Permalink
Move the onnx subfolder for model files to be defaulted on the argu…
Browse files Browse the repository at this point in the history
…ment
  • Loading branch information
CodeWithKyrian committed May 15, 2024
1 parent d83ca9b commit 115a397
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Models/Pretrained/PretrainedModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -236,13 +236,13 @@ public static function constructSession(
string $fileName,
?string $cacheDir = null,
string $revision = 'main',
string $subFolder = '',
string $subFolder = 'onnx',
bool $fatal = true,
?callable $onProgress = null,
...$sessionOptions
): ?InferenceSession
{
$modelFileName = sprintf('onnx/%s.onnx', $fileName);
$modelFileName = "$fileName.onnx";

$file = Hub::getFile($modelNameOrPath, $modelFileName, $cacheDir, $revision, $subFolder, $fatal, $onProgress);

Expand Down

0 comments on commit 115a397

Please sign in to comment.