v6 8 AI tasks, 100% local

Run AI models locally from plain PHP.

Generate images, text, speech and video with small Hugging Face models — right inside your Laravel or PHP app.

No Python. No API bills. No data leaving your server.

$ composer require php-loves-ai/multimodal-ai-runner
PHP 8.2+ No Python needed MIT licensed
~/my-app — loves-ai
A cat by the fireplace, generated locally with stabilityai/sd-turbo

“a cozy cat by the fireplace”

cat.png · 512×512

sd-turbo 1 step on-device

Works with models from the Hugging Face Hub

stabilityai/sd-turbo Qwen/Qwen2.5-0.5B-Instruct openai/whisper-tiny facebook/mms-tts-eng HuggingFaceTB/SmolVLM-256M-Instruct Wan-AI/Wan2.1-T2V-1.3B-Diffusers caidas/swin2SR-classical-sr-x2-64 openai-community/gpt2 nlpconnect/vit-gpt2-image-captioning openai/whisper-small
// developer experience

Feels like native PHP.
Because it is.

Named arguments, typed exceptions, zero config. The runner finds pulled models in your project by itself.

app/Jobs/GenerateImageJob.php
use PhpLovesAi\Runner\TextToImage;

// Finds the runner and the pulled model by itself.
$image = (new TextToImage())->generate(
    model: 'stabilityai/sd-turbo',
    prompt: 'a cozy cat by the fireplace',
    outputPath: storage_path('app/cat.png'),
    steps: 1,
    guidanceScale: 0.0,
);
// how it works

From zero to inference in three commands.

The Composer package is tiny. Prebuilt runner binaries and model weights live in your project's .local directory — never in Git.

01

Install

Add the package and download the runners for your platform.

composer require php-loves-ai/multimodal-ai-runner
vendor/bin/loves-ai setup text-to-image
02

Pull a model

Only the PyTorch files the runners can read — often half the size.

vendor/bin/loves-ai pull stabilityai/sd-turbo
03

Run it

Call it from a controller, a command or a queued job — or straight from the terminal.

// PHP
(new TextToImage())->generate(...);
# CLI
vendor/bin/loves-ai text-to-image stabilityai/sd-turbo "a cozy cat by the fireplace"
// built for production

Private, predictable, yours.

Data stays on your server

Inference runs locally. Nothing is sent to a cloud AI service.

No per-token bills

Pull a model once and run it as often as you like.

No Python to install

Runners ship as self-contained binaries, called via Symfony Process.

Queue-friendly

Fits naturally into Laravel jobs, workers and Docker containers.

Typed exceptions

Know exactly what went wrong: missing runner, model or gated access.

Zero path config

Everything lives in .local/ — CLI, php-fpm and workers all agree.

// ready when you are

Give your PHP app a brain today.

One Composer command and your app can see, hear, speak, write and imagine.

$ composer require php-loves-ai/multimodal-ai-runner