Add BFL image generation script
This commit is contained in:
parent
d6c71e228f
commit
a4382f5bb9
5 changed files with 463 additions and 2 deletions
38
scripts/README.md
Normal file
38
scripts/README.md
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
# Ghostlight Scripts
|
||||
|
||||
## BFL Image Generation
|
||||
|
||||
`generate_bfl_images.py` submits prompts to the Black Forest Labs async image
|
||||
API, polls the returned `polling_url`, downloads the signed `result.sample`
|
||||
image immediately, and writes a metadata receipt beside the image.
|
||||
|
||||
The script reads the API key from `BFL_API_KEY` first. If that is not set, it
|
||||
falls back to `E:\Projects\gamecult-ops\bfl-api.txt`. It never prints the key.
|
||||
|
||||
Dry-run a direct prompt:
|
||||
|
||||
```powershell
|
||||
npm run images:bfl -- --prompt "A maintenance yard in a rotating asteroid habitat" --dry-run
|
||||
```
|
||||
|
||||
Dry-run one Ghostlight visual scene prompt:
|
||||
|
||||
```powershell
|
||||
npm run images:bfl -- --visual-plan examples\visual\pallas-species-strikes.branch-and-fold.v0.visual.json --scene-id pallas_yard_wake --dry-run
|
||||
```
|
||||
|
||||
Submit one paid render:
|
||||
|
||||
```powershell
|
||||
npm run images:bfl -- --visual-plan examples\visual\pallas-species-strikes.branch-and-fold.v0.visual.json --scene-id pallas_yard_wake --width 1536 --height 864 --output-format png --yes
|
||||
```
|
||||
|
||||
Render every base scene from a visual plan:
|
||||
|
||||
```powershell
|
||||
npm run images:bfl -- --visual-plan examples\visual\pallas-species-strikes.branch-and-fold.v0.visual.json --all-scenes --width 1536 --height 864 --output-format png --yes
|
||||
```
|
||||
|
||||
Generated images and receipts go under `experiments/images/`, which is ignored
|
||||
by git. Move curated artifacts elsewhere deliberately if they need to become
|
||||
project assets.
|
||||
Loading…
Reference in a new issue