Complete, OS-agnostic installation guide for DreamLayer AI with GPU/CPU setup instructions.
Windows:
# Download from python.org or use winget
winget install Python.Python.3.11
macOS:
# Using Homebrew
brew install python@3.11
# Or download from python.org
Linux (Ubuntu/Debian):
sudo apt update
sudo apt install python3.11 python3.11-pip python3.11-venv
Windows:
# Download from nodejs.org or use winget
winget install OpenJS.NodeJS
macOS:
# Using Homebrew
brew install node
# Or download from nodejs.org
Linux (Ubuntu/Debian):
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-get install -y nodejs
Windows:
# Download from git-scm.com or use winget
winget install Git.Git
macOS:
# Using Homebrew
brew install git
# Or download from git-scm.com
Linux (Ubuntu/Debian):
sudo apt install git
# Clone the repository
git clone https://github.com/DreamLayer-AI/DreamLayer.git
cd DreamLayer
# Make scripts executable
chmod +x install_mac_dependencies.sh
chmod +x start_dream_layer.sh
# Run installation
./install_mac_dependencies.sh
# Clone the repository
git clone https://github.com/DreamLayer-AI/DreamLayer.git
cd DreamLayer
# Run installation
install_windows_dependencies.bat
git clone https://github.com/DreamLayer-AI/DreamLayer.git
cd DreamLayer
# Create virtual environment
python -m venv venv
# Activate virtual environment
# Windows:
venv\Scripts\activate
# macOS/Linux:
source venv/bin/activate
# Install Python packages
pip install -r requirements.txt
cd dream_layer_frontend
npm install
cd ..
# ComfyUI should be included in the repository
# If not, clone it manually:
git clone https://github.com/comfyanonymous/ComfyUI.git
Create a .env
file in the root directory:
# API Keys (optional - for cloud models)
OPENAI_API_KEY=your_openai_api_key_here
IDEOGRAM_API_KEY=your_ideogram_api_key_here
BFL_API_KEY=your_bfl_api_key_here
# Server Configuration
FLASK_PORT=5000
COMFYUI_PORT=8188
FRONTEND_PORT=8080
Set up your directories in the web interface:
# Create models directory
mkdir -p models/checkpoints
mkdir -p models/loras
mkdir -p models/controlnet
mkdir -p models/upscalers
# Download Stable Diffusion models
# Example: SD 1.5
wget https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned.safetensors -O models/checkpoints/sd15.safetensors
.safetensors
, .ckpt
.safetensors
, .pt
.safetensors
, .pth
.pth
, .bin
macOS/Linux:
./start_dream_layer.sh
Windows:
start_dream_layer.bat
cd ComfyUI
python main.py --listen 0.0.0.0 --port 8188
cd dream_layer_backend
python dream_layer.py
cd dream_layer_frontend
npm run dev
Open your browser and navigate to:
python -c "import torch; print(f'PyTorch: {torch.__version__}')"
python -c "import torch; print(f'CUDA available: {torch.cuda.is_available()}')"
cd dream_layer_frontend
npm list --depth=0
curl http://localhost:5000/api/models
# Reinstall packages
pip install --force-reinstall -r requirements.txt
# Check CUDA installation
nvidia-smi
python -c "import torch; print(torch.cuda.is_available())"
# Reinstall PyTorch with CUDA
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
# Check port usage
netstat -tulpn | grep :8080
netstat -tulpn | grep :5000
netstat -tulpn | grep :8188
# Kill processes using ports
kill -9 <PID>
# Reduce batch size in settings
# Use CPU mode for testing
# Close other applications
# Pull latest changes
git pull origin main
# Reinstall dependencies (if needed)
./install_mac_dependencies.sh # or install_windows_dependencies.bat
# Models are automatically detected on restart
# Or refresh in the web interface
Need help? Check out the Quick Start Guide for a faster setup.