Automate SAM download and fix database path issues
- Fix database path mismatch: download_sample_eyes.py now uses ai_photo_edit.db instead of photoedit.db - Add init_database.py script to initialize DB before eye import - Add AUTO_DOWNLOAD_SAM=true environment variable (default: enabled) - Update entrypoint.sh to: 1. Initialize database first 2. Auto-download SAM model (~375MB) on first startup 3. Then import eyes (now works since DB exists) - Update path detection to work in both Docker and local environments
This commit is contained in:
+6
-1
@@ -116,7 +116,12 @@ SECRET_KEY=change-this-to-a-long-random-string-in-production
|
||||
CORS_ORIGINS=http://localhost:5173,http://localhost:3000,http://localhost:3080,http://localhost
|
||||
|
||||
# Database path
|
||||
DATABASE_URL=sqlite:///./data/photoedit.db
|
||||
DATABASE_URL=sqlite:///./data/ai_photo_edit.db
|
||||
|
||||
# Auto-download SAM model on startup (true/false)
|
||||
# When true (default): Downloads SAM model (~375MB) on first startup for offline Smart Select
|
||||
# When false: Skips download, Smart Select uses Replicate API (requires REPLICATE_API_KEY)
|
||||
AUTO_DOWNLOAD_SAM=true
|
||||
|
||||
# Allow users to select model per-edit
|
||||
ALLOW_MODEL_OVERRIDE=true
|
||||
|
||||
Reference in New Issue
Block a user