transformers-php
transformers-php copied to clipboard
Error downloading model php 8.2.20
Your question
i have a problem with i want to get a model i have ffi install and enabled in php.ini but when I run the command to download a model i get and error the command is this
./vendor/bin/transformers download briaai/RMBG-1.4
and i get this error
./vendor/bin/transformers download briaai/RMBG-1.4 ✔ Initializing download... ✔ Downloading tokenizer.json : [••••••••••••••••••••••••••••] 100%✔ Downloading tokenizer_config.json : [••••••••••••••••••••••••••••] 100%PHP Fatal error: Uncaught FFI\Exception: Failed loading '/var/www/html/studling/vendor/codewithkyrian/transformers/libs/libonnxruntime.so' in /var/www/html/studling/vendor/codewithkyrian/transformers/src/FFI/OnnxRuntime.php:31 Stack trace: #0 /var/www/html/studling/vendor/codewithkyrian/transformers/src/FFI/OnnxRuntime.php(31): FFI::cdef() #1 /var/www/html/studling/vendor/codewithkyrian/transformers/src/FFI/OnnxRuntime.php(52): Codewithkyrian\Transformers\FFI\OnnxRuntime::ffi() #2 /var/www/html/studling/vendor/codewithkyrian/transformers/src/FFI/OnnxRuntime.php(135): Codewithkyrian\Transformers\FFI\OnnxRuntime::new() #3 /var/www/html/studling/vendor/codewithkyrian/transformers/src/Utils/InferenceSession.php(48): Codewithkyrian\Transformers\FFI\OnnxRuntime::CreateSessionOptions() #4 /var/www/html/studling/vendor/codewithkyrian/transformers/src/Models/Pretrained/PretrainedModel.php(275): Codewithkyrian\Transformers\Utils\InferenceSession->__construct() #5 /var/www/html/studling/vendor/codewithkyrian/transformers/src/Models/Pretrained/PretrainedModel.php(224): Codewithkyrian\Transformers\Models\Pretrained\PretrainedModel::constructSession() #6 /var/www/html/studling/vendor/codewithkyrian/transformers/src/Models/Auto/PretrainedMixin.php(77): Codewithkyrian\Transformers\Models\Pretrained\PretrainedModel::fromPretrained() #7 /var/www/html/studling/vendor/codewithkyrian/transformers/src/Commands/DownloadModelCommand.php(109): Codewithkyrian\Transformers\Models\Auto\PretrainedMixin::fromPretrained() #8 /var/www/html/studling/vendor/symfony/console/Command/Command.php(279): Codewithkyrian\Transformers\Commands\DownloadModelCommand->execute() #9 /var/www/html/studling/vendor/symfony/console/Application.php(1029): Symfony\Component\Console\Command\Command->run() #10 /var/www/html/studling/vendor/symfony/console/Application.php(316): Symfony\Component\Console\Application->doRunCommand() #11 /var/www/html/studling/vendor/symfony/console/Application.php(167): Symfony\Component\Console\Application->doRun() #12 /var/www/html/studling/vendor/codewithkyrian/transformers/bin/transformers(18): Symfony\Component\Console\Application->run() #13 /var/www/html/studling/vendor/bin/transformers(119): include('...') #14 {main} thrown in /var/www/html/studling/vendor/codewithkyrian/transformers/src/FFI/OnnxRuntime.php on line 31
I run this in centos 7 php 8.2.20 laravel 11
i need help ti install this model
Context (optional)
No response
Reference (optional)
No response