A modular, high-performance toolkit for LoRA training (via Google Colab/Cloud) and optimized Intel-native inference (via OpenVINO).
src/app.py: Main Streamlit UI entry point.src/engine/: Core inference engines (Standard & Intel-optimized).src/utils/: Shared helper functions and memory management.notebooks/: Jupyter notebooks for quickstart and custom training.scripts/: Setup, installation, and utility scripts.docs/: Guides and walkthroughs.tests/: Unit and integration testing suite.data/: Local storage for training datasets.outputs/: Default directory for generated images and logs.
-
Clone & Setup:
git clone https://github.com/melbinjp/Lora_trainer cd Lora_trainer # Windows .\scripts\setup.bat # Linux/macOS bash scripts/setup.sh
-
Run the App:
streamlit run src/app.py
- Open
colab_quickstart.ipynbin Google Colab. - Run the cells to launch the UI and begin training.
- The UI will be accessible via a secure
trycloudflare.comtunnel.
This project includes specialized support for Intel Core Ultra systems (Meteor Lake/Lunar Lake) using OpenVINO.
- Stable Hybrid Mode: Automatically partitions the Flux.1 model between CPU and iGPU to ensure stability on 16GB RAM systems.
- Real-Time UI Progress: Streamlit UI now displays live progress bars and status updates during inference.
- Dynamic Prompts: Generate images directly from the UI or via CLI:
python src/engine/intel_inference.py STABLE_HYBRID --prompt "your prompt" --output outputs/result.png
A lightweight API is included to allow programmatic access to the inference engine. This is ideal for distributed networks, batch processing, or integrating with other applications.
- Start the API Server:
python src/api.py - Send a Generation Request (example using curl or Postman):
curl -X POST "http://localhost:8000/generate" -H "Content-Type: application/json" -d '{"prompt": "A futuristic city", "model": "OpenVINO/FLUX.1-schnell-int4-ov", "hardware_target": "STABLE_HYBRID"}' --output result.png
- Auto-Captioning: Uses BLIP to automatically generate captions for your training images.
- Export: Packages your dataset into an optimized zip file ready for cloud training.
- Aggressive RAM Flush: Includes utilities to clear system memory before intensive inference runs.
- Resource Detection: Automatically detects available RAM and VRAM to suggest optimal settings.
- Hugging Face: Seamlessly download/upload models using HF Hub integration.
- Cloud Storage: Mount Google Drive, S3, or OneDrive for persistent model storage.
Run the test suite to ensure everything is configured correctly:
pytest tests/unit/test_logic.pyFor more detailed information, see:
Created with ❤️ for AI researchers and enthusiasts.