Skip to content

AI PC starter app for doing AI image creation, image stylizing, and chatbot on a PC powered by an Intel® Arc™ GPU.

License

Notifications You must be signed in to change notification settings

zimm0140/AI-Playground

 
 

Repository files navigation

AI Playground

image

This example is based on the xpu implementation of Intel Arc A-Series dGPU and Ultra iGPU

Welcome to AI Playground beta open source project and AI PC starter app for doing AI image creation, image stylizing, and chatbot on a PC powered by an Intel® Arc™ GPU. AI Playground leverages libraries from GitHub and Huggingface which may not be available in all countries world-wide.

README.md

  • English (readme.md)

Min Specs

AI Playground beta is currently available as a packaged installer, or available as a source code from our Github repository. To run AI Playground you must have a PC that meets the following specifications

  • Windows OS
  • Intel Core Ultra-H Processor (coming soon) OR Intel Arc GPU (discrete) with 8GB of vRAM

Installation - Packaged Installer:

AI Playground has multiple packaged installers, each specific to the hardware.

  1. Choose the correct installer (for Desktop systems with Intel Arc GPUs,or for Intel Core Ultra-H systems), download to your PC then run the installer.
  2. The installer will have two phases. It will first install components and environment from the installer. The second phase will pull in components from their source. This second phase of installation will take several minutes and require a steady internet connection.
  3. On first run, the load screen will take up to a minute
  4. Download the Users Guide for application information

IMPORTANT: We have noticed some systems require the VS C++ redistribution, often already installed on Windows systems. If AI Playground is hanging on the load screen , this may be the issue and can be resolved by installing VS C++ redist https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170

Project Development

Dev Environment Setup (Backend, Python)

  1. Install Intel oneAPI Base Toolkit:

    • Download and install the latest Intel oneAPI Base Toolkit from Intel oneAPI Base Toolkit.
    • Ensure you select all the necessary components, including the Intel® oneAPI DPC++/C++ Compiler and Intel® oneAPI Math Kernel Library (oneMKL).
  2. Create and Activate the Conda Environment:

    • Open a terminal or command prompt and navigate to the project root directory (AI-Playground).

    • Run the following command to create and activate the environment based on your hardware:

      For Core Ultra-H:

      conda env create -f environment-ultra.yml
      conda activate aipg_xpu_ultra

      For Arc A-Series dGPUs:

      conda env create -f environment-arc.yml
      conda activate aipg_xpu_arc
  3. Download and Install the Intel Extension for PyTorch AOT Packages:

    • Important: Ensure you select the correct wheel file corresponding to your hardware and Python version from the Intel Extension for PyTorch releases page.

    • For Core Ultra-H:

      pip install https://github.com/Nuullll/intel-extension-for-pytorch/releases/download/v2.1.20%2Bmtl%2Boneapi/intel_extension_for_pytorch-2.1.20+mtl-cp310-cp310-win_amd64.whl & \
      pip install https://github.com/Nuullll/intel-extension-for-pytorch/releases/download/v2.1.20%2Bmtl%2Boneapi/torch-2.1.0a0+git7bcf7da-cp310-cp310-win_amd64.whl & \
      pip install https://github.com/Nuullll/intel-extension-for-pytorch/releases/download/v2.1.20%2Bmtl%2Boneapi/torchaudio-2.1.0+6ea1133-cp310-cp310-win_amd64.whl & \
      pip install https://github.com/Nuullll/intel-extension-for-pytorch/releases/download/v2.1.20%2Bmtl%2Boneapi/torchvision-0.16.0+fbb4cc5-cp310-cp310-win_amd64.whl
    • For Arc A-Series dGPU:

      pip install https://github.com/Nuullll/intel-extension-for-pytorch/releases/download/v2.1.10%2Bxpu/torch-2.1.0a0+cxx11.abi-cp310-cp310-win_amd64.whl & \
      pip install https://github.com/Nuullll/intel-extension-for-pytorch/releases/download/v2.1.10%2Bxpu/intel_extension_for_pytorch-2.1.10+xpu-cp310-cp310-win_amd64.whl & \
      pip install https://github.com/Nuullll/intel-extension-for-pytorch/releases/download/v2.1.10%2Bxpu/torchvision-0.16.0a0+cxx11.abi-cp310-cp310-win_amd64.whl & \
      pip install https://github.com/Nuullll/intel-extension-for-pytorch/releases/download/v2.1.10%2Bxpu/torchaudio-2.1.0a0+cxx11.abi-cp310-cp310-win_amd64.whl
  4. Verify the XPU Environment Setup:

    python -c "import torch; import intel_extension_for_pytorch as ipex; print(torch.__version__); print(ipex.__version__); [print(f'[{i}]: {torch.xpu.get_device_properties(i)}') for i in range(torch.xpu.device_count())]"

Linking Dev Environment to Project Environment

  1. Switch to the project root directory: (AI-Playground)

    cd AI-Playground 
  2. View the Conda environment path (on Windows):

    conda env list | findstr aipg_xpu

    This command will show the path to your aipg_xpu environment.

  3. Create a symbolic link:

    • Using PowerShell:

      New-Item -ItemType Junction -Path ".\env" -Target "C:\Users\YourUserName\.conda\envs\aipg_xpu"

      (Replace "C:\Users\YourUserName\.conda\envs\aipg_xpu" with the actual path obtained from the previous step.)

    • Using Command Prompt (cmd):

      mklink /J ".\env" "C:\Users\YourUserName\.conda\envs\aipg_xpu"

      (Replace "C:\Users\YourUserName\.conda\envs\aipg_xpu" with the actual path obtained from the previous step.)

WebUI (Node.js + electron)

  1. Install Node.js development environment: Download and install from Node.js download page.
  2. Switch to the WebUI directory and install all Node.js dependencies.
    cd WebUI
    npm install
  3. In the WebUI directory, run the below command to get started with development
    npm run dev

Model Support

AI Playground supports PyTorch LLM, SD1.5, and SDXL models. AI Playground does not ship with any models but does make models available for all features either directly from the interface or indirectly by the users downloading models from HuggingFace.co or CivitAI.com and placing them in the appropriate model folder.

Models currently linked from the application

Model License Background Information/Model Card
Dreamshaper 8 Model license site
Dreamshaper 8 Inpainting Model license site
JuggernautXL v9 Model license site
Phi3-mini-4k-instruct license site
bge-large-en-v1.5 license site
Latent Consistency Model (LCM) LoRA: SD1.5 license site
Latent Consistency Model (LCM) LoRA:SDXL license site

Be sure to check license terms for any model used in AI Playground especially taking note of any restrictions.

Use Alternative Models

Check the User Guide for details or watch this video on how to add alternative Stable Diffusion models to AI Playground

Notices and Disclaimers:

For information on AI Playground terms, license and disclaimers, visit the project and files on GitHub repo:
License | Notices & Disclaimers

The software may include third party components with separate legal notices or governed by other agreements, as may be described in the Third Party Notices file accompanying the software.

About

AI PC starter app for doing AI image creation, image stylizing, and chatbot on a PC powered by an Intel® Arc™ GPU.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 54.8%
  • Vue 28.3%
  • TypeScript 12.4%
  • CSS 3.8%
  • JavaScript 0.5%
  • HTML 0.1%
  • Batchfile 0.1%