4.0 KiB
DiaryML Setup Guide
Step-by-Step Installation
Step 1: Download Model Files
You need to download two GGUF model files. Go to: https://huggingface.co/huihui-ai/Huihui-Qwen3-VL-2B-Instruct-abliterated/tree/main/GGUF
Download these files:
ggml-model-f16.gguf(~3.6 GB) - Main language modelmmproj-model-f16.gguf(~300 MB) - Vision projection model
Alternative (if you have limited RAM/VRAM):
huihui-qwen3-vl-2b-instruct-abliterated-q4_k_m.gguf(~1.5 GB) - Smaller quantized version
Place the downloaded files in the DiaryML/models/ folder.
Step 2: Install Python Dependencies
Open a terminal/command prompt in the DiaryML directory and run:
cd backend
pip install -r requirements.txt
This will install:
- FastAPI (web framework)
- SQLCipher (encrypted database)
- ChromaDB (vector database)
- llama-cpp-python (GGUF model runner)
- sentence-transformers (embeddings)
- transformers + torch (emotion detection)
Installation may take 5-10 minutes.
GPU Acceleration (Optional)
If you have an NVIDIA GPU and want faster AI inference:
# Uninstall CPU version
pip uninstall llama-cpp-python
# Install CUDA version
CMAKE_ARGS="-DLLAMA_CUBLAS=on" pip install llama-cpp-python
Step 3: Verify Installation
Run this to check everything is ready:
python -c "import fastapi, chromadb, transformers; print('All dependencies installed!')"
Step 4: Start DiaryML
On Windows:
start.bat
On Mac/Linux:
cd backend
python main.py
The server will start on http://localhost:8000
Step 5: First Launch
- Open your browser to
http://localhost:8000 - You'll see the unlock screen
- Enter a password (this creates your encrypted diary)
- Wait for the AI model to load (~30 seconds)
- Start journaling!
Troubleshooting
Error: "sqlcipher3" module not found
SQLCipher can be tricky on Windows. Try:
pip install pysqlcipher3
If that fails, you can temporarily disable encryption by modifying database.py:
# Comment out this line in get_connection():
# conn.execute(f"PRAGMA key = '{self.password}'")
Note: This removes encryption! Only use for testing.
Error: Model file not found
Make sure:
- Files are named exactly
ggml-model-f16.ggufandmmproj-model-f16.gguf - They are in the
DiaryML/models/folder - The files are fully downloaded (not partial)
Error: "CUDA out of memory"
The model is trying to use your GPU but running out of memory. Edit qwen_interface.py:
# Change this line (around line 37):
n_gpu_layers=-1, # Change to 0 for CPU-only
Or use a smaller quantized model (q4_k_m).
Server won't start
Make sure port 8000 is not already in use:
# Windows
netstat -ano | findstr :8000
# Mac/Linux
lsof -i :8000
To use a different port, edit main.py at the bottom:
uvicorn.run(
"main:app",
host="127.0.0.1",
port=8080, # Change this
reload=True
)
System Requirements
Minimum
- CPU: 4-core processor
- RAM: 4GB free
- Disk: 5GB (3GB models + 2GB for dependencies)
- OS: Windows 10+, macOS 10.15+, Linux
Recommended
- CPU: 8-core processor
- RAM: 8GB free
- GPU: NVIDIA GPU with 4GB+ VRAM (for faster inference)
- Disk: 10GB+
Performance Tips
- Use GPU acceleration if available (5-10x faster)
- Use quantized models (q4_k_m) if RAM is limited
- Close other applications when using DiaryML
- Reduce context window in
qwen_interface.pyif needed:n_ctx=2048, # Instead of 4096
Next Steps
Once DiaryML is running:
- Create your first journal entry
- Try attaching an image
- Chat with the AI about your entries
- Check the mood timeline after a few entries
- See daily suggestions each morning
Getting Help
If you encounter issues:
- Check the console/terminal for error messages
- Review the troubleshooting section above
- Check the README.md for more details
- Open an issue on GitHub with your error logs
Enjoy your private creative companion!