Complete Guide to Generating Images and Text with AI Locally

Last update: 28/07/2026

  • Open source alternatives for running language models and image generation without relying on the cloud.
  • Versatile tools such as LocalAI, Stable Diffusion, and mobile applications for total privacy.
  • Technical hardware requirements and simplified installation methods using Docker or automatic installers.
How to use Stable Diffusion to generate images locally

You've probably been in the situation where you want to experiment with artificial intelligence, but you're apprehensive about your documents, conversations, or images being processed on remote servers. You might also worry about depending on a service that changes its terms, limits the number of queries, or starts charging a subscription fee that's hard to justify.

In these cases, run artificial intelligence models locally It offers a particularly interesting alternative. The data can remain on the computer, operation doesn't constantly depend on an external platform, and you have much more control over the models, configurations, and tools used.

Having your own AI infrastructure isn't just a matter of privacy. It also allows process confidential documentsExperiment with different models, automate tasks, and generate images without paying for each query. However, the experience will depend considerably on the processor, RAM, graphics card, and model selected.

How to tell if an app is using local AI or sending everything to the cloud
Related article:
How to tell if an app uses local AI or sends everything to the cloud

LocalAI: a local alternative to commercial APIs

LocalAI a local alternative to commercial APIs

If you're looking for a powerful and flexible tool to build your own artificial intelligence service, LocalAI is one of the most comprehensive options. It presents itself as a Replacement compatible with popular APIs, including those used by OpenAI and Anthropic, which allows numerous applications to be adapted to send their requests to their own server.

Instead of using a cloud-hosted API directly, you can configure the program to point to the LocalAI address. This way, requests are processed using the models installed on your computer or server.

This does not mean that LocalAI replicates absolutely all the functions and behaviors of commercial services. Compatibility depends on the API used, the backend selected, and the model's capabilitiesHowever, it is very useful for migrating existing applications without having to rebuild the entire integration from scratch.

LocalAI is free and open source. It allows you to run language models, generate images, transcribe audio, convert text to speech, and work with embeds, among other functions. Its architecture uses different backends, such as llama.cpp, vLLM, MLX, whisper.cpp and broadcast enginesdepending on the task and the available hardware.

It also supports models distributed in GGUF and other formats compatible with its various engines. It's worth clarifying that GGUF is a file formatTransformers and Diffusers, on the other hand, are libraries and ecosystems used to work with different artificial intelligence architectures.

Basic steps to install LocalAI with Docker

The easiest way to try LocalAI is usually through Docker. Before you begin, you need to install Docker Desktop on Windows or macOS, or Docker Engine if you're using Linux.

Exclusive content - Click Here  How to Copy WhatsApp Conversations on iPhone

The general steps are as follows:

  • Install Docker: It allows LocalAI to run within an isolated container and avoids numerous dependency conflicts.
  • Download the appropriate image: There are variants for CPUs and for different GPU acceleration systems.
  • Start the server: The container typically publishes the API and web interface through a port on the machine.
  • Install a model: The LocalAI gallery allows you to add pre-made configurations directly from the interface.
  • Check the API: You can make a request with curl or use a library compatible with the OpenAI API by changing the base address.

A basic command to perform a CPU test would be:

docker run -p 8080:8080 --name local-ai -ti localai/localai:latest

Then you can open the interface using:

http://localhost:8080

If you have a graphics card, you must use an image compatible with your acceleration platform. LocalAI offers different options for NVIDIA, AMD, Intel, Apple Silicon, Vulkan, and other types of hardware, but The correct labeling and settings may vary between versionsThat's why it's advisable to consult its documentation before copying an old command.

From the gallery, you can install one of the available models. The exact selection changes over time, so it's best to choose one based on its size, quantization, and memory requirements rather than simply looking for the most popular model.

Why a GPU isn't always the best option for local AI
Related article:
Why a GPU isn't always the best option for local AI

Limitations of LocalAI and local models

Response speed is directly related to the power of the hardware and the size of the modelA small, quantized model can run reasonably well on a modern CPU, while one with tens of billions of parameters may need a GPU with a considerable amount of VRAM.

Open models don't always offer the same level of reasoning, instruction follow-up, or knowledge as more advanced commercial services. However, they allow users to choose from numerous alternatives and find a balance between privacy, speed, quality, and memory consumption.

Calling it cost-free wouldn't be entirely accurate either. The app and many templates can be downloaded for free, but there are still electricity consumption, storage space, and hardware costs. The advantage is that normally You don't pay for each request, nor are you dependent on a mandatory subscription..

How to use Stable Diffusion to generate images locally

How to use Stable Diffusion to generate images locally

Stable Diffusion is one of the best-known model families for generating images on a computer. Unlike services that operate exclusively in the cloud, its files can be downloaded and run using compatible local interfaces.

With these tools it is possible Generate images from text, modify parts of a scene, expand compositions, use custom models, and apply LoRAThe available functions depend on the interface and model installed.

Exclusive content - Click Here  How to identify and manage people at Immich

For a smooth experience, it is recommended to have a dedicated graphics card with sufficient VRAM or video memoryThe requirements vary considerably between models. An older version of Stable Diffusion can run on relatively modest resources, while SDXL and later generations typically require more memory.

Amuse 3.1
Related article:
AMD and Stability AI revolutionize local AI rendering on laptops with Amuse 3.1

AUTOMATIC1111, ComfyUI and other available interfaces

One of the best-known interfaces is Stable Diffusion WebUI by AUTOMATIC1111It offers text generation, image transformation, inpainting, extensions, and numerous advanced options.

Its installation can be more complicated than that of a conventional application because it depends on Python, PyTorch, graphics card drivers, and other components. However, it's usually not necessary to manually install all the libraries, much less reinstall the operating system: the official scripts create a virtual environment and download most of the necessary dependencies.

On systems with limited video memory, options such as the following can be used:

  • --medvram to reduce VRAM consumption in exchange for some loss of speed.
  • --lowvram for even more limited equipment, although the process will be considerably slower.
  • --xformers when the card, system and installation are compatible with this optimization.

A GPU with only 2 GB of VRAM imposes significant limitations and may not run current models correctly. In these cases, it will be necessary to use lighter models, reduced resolutions, or specially optimized interfaces.

Another alternative is ComfyUIwhich organizes generation through connected nodes. Its learning curve is steeper, but it allows for very precise control of each stage of the process and the reuse of complex workflows.

For those who prefer a more guided installation, there are applications such as Easy DiffusionThese tools automate much of the environment setup. It's important to download any installer from its repository or official website and verify that it continues to receive updates.

Local addresses, ports, and installation steps vary between tools. Therefore, it should not be assumed that all interfaces will be open in each tool. localhost:9000 nor that they use the same BAT file.

Other tools for running artificial intelligence locally

If you don't want to manage a platform as extensive as LocalAI, there are more straightforward solutions. Ollama allows you to download and run language models on Windows, macOS and Linux using very simple commands.

LM Studio offers a more accessible graphical interface to find compatible models, communicate with them, and set up a local server with a compatible API. It can also be used in conjunction with applications capable of querying documents, although file handling will depend on the tool or RAG flow used.

Exclusive content - Click Here  How to find my iCloud password

For their part, ComfyUI is one of the go-to options for building visual workflows for image generation.Its nodes allow you to combine models, prompts, ControlNet, LoRA, scaling systems and other tools within the same process.

Ollam is going slowly
Related article:
How to speed up Ollama: A complete guide to optimizing your local AI

How to run local models on an iPhone

How to run local models on an iPhone

Local AI has also arrived on mobile devices. Some iPhone and iPad apps allow you to download compatible models and run queries directly on the device once the download is complete.

One of them is Private AI: Local ChatThis feature allows you to import certain GGUF models, analyze PDF files and photos, and use local image generation models. Exact functions and supported models may change with application updates.

Thanks to these types of tools, it is possible consult the content of certain documents, converse with language models or analyze images without continuously sending information to an external server.

However, several limitations must be taken into account. The models take up several gigabytes of space, consume battery power, and can cause an increase in temperature. Furthermore, The available memory on the phone determines which models can be loaded.A multimodal model or image generator can run much slower than on a computer with a dedicated GPU.

It's also advisable to review the privacy policy and the specific functionality of each application. Just because an app allows models to run locally doesn't guarantee that... All its functions, statistics, and downloads work without communicating with the internet..

Which local artificial intelligence option should you choose?

The right tool depends mainly on what you want to do:

  • LocalAI: It is useful for setting up your own server compatible with different APIs and model types.
  • Ollama: simplifies the downloading and execution of language models.
  • LM Studio: It offers a user-friendly graphical experience for testing models and publishing a local API.
  • AUTOMATIC1111: It provides a very complete interface for working with Stable Diffusion.
  • ComfyUI: It allows you to build advanced visual workflows to generate and edit images.
  • Mobile applications: They facilitate the use of small models directly on a phone or tablet.

Whether you opt for a home server with Docker or a desktop or mobile application, the goal is similar: regain control over the models and reduce dependence on external services.

Local AI doesn't eliminate all limitations or turn any computer into an unlimited workstation. However, by choosing models suited to the available hardware, it allows for combining language, vision, audio, and image generation while keeping a much larger portion of the processing and data under the user's control.

Gemma 4 AI
Related article:
Gemma 4 AI: Google's new open model that drives local AI on mobile and computers