User Tools

Site Tools


ai:local

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
ai:local [2025/01/17 14:46] warnaudai:local [2025/01/24 10:24] (current) – [Integration in open-WebUI] warnaud
Line 1: Line 1:
 +====== Local Ai Install ======
  
 +===== All in one =====
 +  * [[https://lmstudio.ai/|LMstudio]] multi platform
 +
 +===== local service install on MacOS =====
 +You need a **__mac Silicon__**
 +==== Ollama ====
 +First, install ollama\\
 +-> [[https://ollama.com/]]\\
 +Unzip et run the .app\\
 +Once installed it proposed to run <code bash>ollama run llama3.2</code>
 +Do it...in a terminal\\
 +Once the model is pulled and command prompt is **>>>** test it (say hi)\\
 +==== Homebrew ====
 +If not already done, install homebrew:
 +<code bash>/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"</code>
 +:!: Don't forget to add homebrew to your PATH as indicated at the end of the install :!:
 +=== git/conda ===
 +<code bash> brew install git</code>
 +grab latest conda for the platform from [[https://github.com/conda-forge/miniforge/releases/]]\\
 +<code bash>cd ~/Downloads && wget https://github.com/conda-forge/miniforge/releases/download/24.11.2-1/Miniforge3-24.11.2-1-MacOSX-arm64.sh
 +sh Miniforge3-24.11.2-1-MacOSX-arm64.sh</code>
 +Read / accept and install by default [enter] ...
 +<code bash>eval "$(/Users/$USER/miniforge3/bin/conda shell.zsh hook)"
 +python --version   #Python 3.12.8
 +pip --version    #pip 24.3.1 from /Users/fortiera/miniforge3/lib/python3.12/site-packages/pip (python 3.12)
 +pip install open-webui</code>
 +</code>
 +=== web server ===
 +<code bash>open-webui serve</code>
 +==== Stable diffusion ====
 +<code bash>
 +eval "$(/Users/$USER/miniforge3/bin/conda shell.zsh hook)"
 +conda create -n stable python=3.10.6
 +conda activate stable
 +python --version #Must be 3.10.6
 +cd ~/git # or wherever you put your git stuff
 +git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
 +cd stable-diffusion-webui/models/Stable-diffusion
 +wget https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/blob/main/v1-5-pruned.safetensors 
 +cd ../..
 +./webui.sh</code>
 +In the web interface select v1-5-pruned.safetensors and check generation
 +**Ctrl+C** to quit after testing
 +==== Integration in open-WebUI ====
 +Let's generate image in our nice local Ai\\
 +relaunch stable-diffusion:
 +<code bash>
 +eval "$(/Users/$USER/miniforge3/bin/conda shell.zsh hook)"
 +conda activate stable
 +cd ~/git/stable-diffusion-webui 
 +./webui.sh --listen --api
 +</code>
 +Click on your account icon then Settings > Admin Settings > Images then:
 +  * Image Generation Engine set to AUTOMATIC1111
 +  * URL to http://127.0.0.1:7860
 +  * Activate "Image Generation (Experimental)"
 +
 +===== Update =====
 +==== Open-WebUI ====
 +<code bash>
 +eval "$(/Users/$USER/miniforge3/bin/conda shell.zsh hook)"
 +conda
 +</code>
 +===== References =====
 +  * https://www.youtube.com/watch?v=6E2-HQMSs5k
 +  * https://github.com/mateo-cogeanu/local-ai-mac-setup
 +  * https://www.youtube.com/watch?v=R0XuVqMSHYk
 +  * https://www.fahdmirza.com/2024/12/magicquill-installation-on-windows.html