ok
This commit is contained in:
206
docs/QUICKSTART_AUTONOMOUS.md
Normal file
206
docs/QUICKSTART_AUTONOMOUS.md
Normal file
@@ -0,0 +1,206 @@
|
||||
# 🚀 QUICK START GUIDE - Autonomous Generation
|
||||
|
||||
**Created:** 30.12.2025 03:37
|
||||
**Purpose:** Run overnight batch generation WITHOUT Antigravity
|
||||
|
||||
---
|
||||
|
||||
## ⚡ QUICK SETUP (15 minutes)
|
||||
|
||||
### Step 1: Install Dependencies
|
||||
```bash
|
||||
cd /Users/davidkotnik/repos/novafarma
|
||||
pip3 install google-cloud-aiplatform Pillow
|
||||
```
|
||||
|
||||
### Step 2: Google Cloud Setup
|
||||
|
||||
#### 2a. Create Project (if needed)
|
||||
1. Go to: https://console.cloud.google.com/
|
||||
2. Click "Select Project" → "New Project"
|
||||
3. Name: `dolinasmrti-assets`
|
||||
4. Click "Create"
|
||||
|
||||
#### 2b. Enable Vertex AI API
|
||||
1. In Cloud Console, go to: **APIs & Services** → **Library**
|
||||
2. Search for: `Vertex AI API`
|
||||
3. Click **Enable**
|
||||
|
||||
#### 2c. Create Service Account
|
||||
1. Go to: **IAM & Admin** → **Service Accounts**
|
||||
2. Click **Create Service Account**
|
||||
3. Name: `asset-generator`
|
||||
4. Click **Create and Continue**
|
||||
5. Grant role: **Vertex AI User**
|
||||
6. Click **Done**
|
||||
|
||||
#### 2d. Download Credentials
|
||||
1. Click on the service account you just created
|
||||
2. Go to **Keys** tab
|
||||
3. **Add Key** → **Create new key**
|
||||
4. Choose **JSON**
|
||||
5. Save file as: `/Users/davidkotnik/.config/dolinasmrti-credentials.json`
|
||||
|
||||
---
|
||||
|
||||
## 🎯 USAGE
|
||||
|
||||
### Option A: Generate 50 Test Assets
|
||||
```bash
|
||||
export GOOGLE_APPLICATION_CREDENTIALS="/Users/davidkotnik/.config/dolinasmrti-credentials.json"
|
||||
export GOOGLE_CLOUD_PROJECT="dolinasmrti-assets"
|
||||
|
||||
python3 scripts/autonomous_generation.py --batch 50
|
||||
```
|
||||
|
||||
### Option B: Generate ALL 422 Base Assets (Overnight)
|
||||
```bash
|
||||
export GOOGLE_APPLICATION_CREDENTIALS="/Users/davidkotnik/.config/dolinasmrti-credentials.json"
|
||||
export GOOGLE_CLOUD_PROJECT="dolinasmrti-assets"
|
||||
|
||||
# Run in background
|
||||
nohup python3 scripts/autonomous_generation.py > generation.log 2>&1 &
|
||||
|
||||
# Script will run overnight while you sleep!
|
||||
```
|
||||
|
||||
### Option C: Check Progress
|
||||
```bash
|
||||
# Watch live progress
|
||||
tail -f generation_log.txt
|
||||
|
||||
# Check errors
|
||||
cat generation_errors.txt
|
||||
|
||||
# Count generated assets
|
||||
find assets/images -name "*.png" -newer REALISTIC_PLAN.md | wc -l
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 📊 WHAT HAPPENS
|
||||
|
||||
**Script will:**
|
||||
1. ✅ Generate images one by one (60s delay between each)
|
||||
2. ✅ Save to `assets/images/{category}/{name}.png`
|
||||
3. ✅ Log progress to `generation_log.txt`
|
||||
4. ✅ Log errors to `generation_errors.txt`
|
||||
5. ✅ Create git commit every 20 assets
|
||||
6. ✅ Run completely autonomously
|
||||
|
||||
**Timeline:**
|
||||
- **50 assets:** ~50 minutes
|
||||
- **422 assets:** ~7 hours (overnight!)
|
||||
|
||||
---
|
||||
|
||||
## 💰 COSTS
|
||||
|
||||
**Google Cloud Pricing:**
|
||||
- **Free Tier:** 1,000 images/month FREE (if eligible)
|
||||
- **Paid Tier:** ~$0.02 per image
|
||||
|
||||
**For 422 assets:**
|
||||
- Free tier: **$0** ✅
|
||||
- Paid tier: **~$8.44**
|
||||
|
||||
**To check your free tier status:**
|
||||
https://console.cloud.google.com/billing
|
||||
|
||||
---
|
||||
|
||||
## ⚠️ TROUBLESHOOTING
|
||||
|
||||
### Error: "No credentials"
|
||||
→ Set `GOOGLE_APPLICATION_CREDENTIALS` environment variable
|
||||
|
||||
### Error: "Quota exceeded"
|
||||
→ You hit free tier limit, wait 24 hours or enable billing
|
||||
|
||||
### Error: "Permission denied"
|
||||
→ Service account needs "Vertex AI User" role
|
||||
|
||||
### Script stops unexpectedly
|
||||
→ Check `generation_errors.txt` for details
|
||||
|
||||
---
|
||||
|
||||
## 🎯 RECOMMENDED WORKFLOW
|
||||
|
||||
### Night 1: Test Run (50 assets)
|
||||
```bash
|
||||
python3 scripts/autonomous_generation.py --batch 50
|
||||
```
|
||||
→ Wake up, review quality
|
||||
→ If good, proceed to full run
|
||||
|
||||
### Night 2: Full Run (422 assets)
|
||||
```bash
|
||||
nohup python3 scripts/autonomous_generation.py > generation.log 2>&1 &
|
||||
```
|
||||
→ Go to sleep
|
||||
→ Wake up to 422 new assets! ☕
|
||||
|
||||
### Day 3: Background Removal
|
||||
```bash
|
||||
python3 scripts/remove_background.py assets/images/ --recursive
|
||||
```
|
||||
→ All backgrounds removed in batch!
|
||||
|
||||
---
|
||||
|
||||
## 📁 OUTPUT STRUCTURE
|
||||
|
||||
```
|
||||
assets/images/
|
||||
├── buildings/
|
||||
│ ├── tent.png
|
||||
│ ├── shack.png
|
||||
│ ├── farmhouse_basic.png
|
||||
│ └── ...
|
||||
├── crops/
|
||||
│ ├── wheat_seed.png
|
||||
│ ├── wheat_growing.png
|
||||
│ └── ...
|
||||
├── npcs/
|
||||
│ ├── npc_trader.png
|
||||
│ ├── npc_blacksmith.png
|
||||
│ └── ...
|
||||
└── animals/
|
||||
├── cow.png
|
||||
├── fire_sheep.png
|
||||
└── ...
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## ✅ SUCCESS CRITERIA
|
||||
|
||||
**After successful run, you should have:**
|
||||
- ✅ ~422 new PNG files in `assets/images/`
|
||||
- ✅ All with white backgrounds (ready for removal)
|
||||
- ✅ Git commits every 20 assets
|
||||
- ✅ Complete generation log
|
||||
- ✅ Gritty Noir style consistent
|
||||
|
||||
---
|
||||
|
||||
## 🆘 NEED HELP?
|
||||
|
||||
**If setup fails:**
|
||||
1. Share error message from terminal
|
||||
2. Check `generation_errors.txt`
|
||||
3. Verify credentials file exists
|
||||
4. Confirm Vertex AI API is enabled
|
||||
|
||||
**Alternative:** Continue using me (Antigravity) for semi-automated batches!
|
||||
|
||||
---
|
||||
|
||||
**Ready to run?** Choose your command above! 🚀
|
||||
|
||||
---
|
||||
|
||||
**Created:** 30.12.2025 03:37
|
||||
**Script:** `scripts/autonomous_generation.py`
|
||||
**Documentation:** `AUTONOMOUS_SETUP.md`
|
||||
Reference in New Issue
Block a user