studio-lumiere-cli 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/skills/studio-lumiere-cli/SKILL.md +209 -0
- package/skills/studio-lumiere-cli/agents/openai.yaml +4 -0
- package/.agents/skills/annotate-image/SKILL.md +0 -99
- package/.agents/skills/config-troubleshooting/SKILL.md +0 -97
- package/.agents/skills/generate-video/SKILL.md +0 -328
- package/.agents/skills/image-grid/SKILL.md +0 -96
- package/.agents/skills/image-overlay/SKILL.md +0 -66
- package/.agents/skills/image-overlay/agents/openai.yaml +0 -4
- package/.agents/skills/image-overlay/scripts/overlay-image.js +0 -218
- package/.agents/skills/muse-management/SKILL.md +0 -232
- package/.agents/skills/refine-images/SKILL.md +0 -192
- package/.agents/skills/tired-girl/SKILL.md +0 -131
package/package.json
CHANGED
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: studio-lumiere-cli
|
|
3
|
+
description: Command-line usage for Studio Lumiere. Use when running npx studio-lumiere-cli to generate, refine, upscale, create a Muse, generate video, tired-girl, annotate, grid, or list IDs.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Studio Lumiere CLI
|
|
7
|
+
|
|
8
|
+
## Requirements
|
|
9
|
+
- `GEMINI_API_KEY` must be set in your environment.
|
|
10
|
+
- `LUMIERE_OUTPUT_DIR` is optional (defaults to `outputs`).
|
|
11
|
+
|
|
12
|
+
## Invocation
|
|
13
|
+
`npx studio-lumiere-cli <command> [options]`
|
|
14
|
+
|
|
15
|
+
## list
|
|
16
|
+
Print JSON for valid IDs.
|
|
17
|
+
|
|
18
|
+
Example:
|
|
19
|
+
```bash
|
|
20
|
+
npx studio-lumiere-cli list templates
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Allowed types:
|
|
24
|
+
- `templates`
|
|
25
|
+
- `ethnicities`
|
|
26
|
+
- `skin-tones`
|
|
27
|
+
- `hair-colors`
|
|
28
|
+
- `backgrounds`
|
|
29
|
+
- `background-types`
|
|
30
|
+
- `vibes`
|
|
31
|
+
- `resolutions`
|
|
32
|
+
- `occasions`
|
|
33
|
+
|
|
34
|
+
## generate
|
|
35
|
+
Generate images from input jewelry photos.
|
|
36
|
+
|
|
37
|
+
Example:
|
|
38
|
+
```bash
|
|
39
|
+
npx studio-lumiere-cli generate \
|
|
40
|
+
--images ./inputs/ring.jpg \
|
|
41
|
+
--template hand_model \
|
|
42
|
+
--detail nail_nude \
|
|
43
|
+
--ethnicity mena \
|
|
44
|
+
--skin-tone medium \
|
|
45
|
+
--hair-color brunette \
|
|
46
|
+
--background cream_silk \
|
|
47
|
+
--background-type studio \
|
|
48
|
+
--vibe clean \
|
|
49
|
+
--resolution portrait \
|
|
50
|
+
--quantity 1
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Options:
|
|
54
|
+
- `--images <paths>` (required): Comma-separated input image paths.
|
|
55
|
+
- `--template <id>` (required): Template ID.
|
|
56
|
+
- `--detail <id>`
|
|
57
|
+
- `--secondary-detail <id>`
|
|
58
|
+
- `--tertiary-detail <id>`
|
|
59
|
+
- `--ethnicity <id>`
|
|
60
|
+
- `--skin-tone <id>`
|
|
61
|
+
- `--hair-color <id>`
|
|
62
|
+
- `--background <id>`
|
|
63
|
+
- `--background-type <id>`
|
|
64
|
+
- `--vibe <id>`
|
|
65
|
+
- `--resolution <id>`
|
|
66
|
+
- `--occasion <id>`
|
|
67
|
+
- `--quantity <n>`: Number of outputs (default `1`).
|
|
68
|
+
- `--muse-id <id>`: Use a stored Muse.
|
|
69
|
+
- `--muse-images <paths>`: Comma-separated Muse image paths.
|
|
70
|
+
- `--no-enhance`: Disable prompt enhancement.
|
|
71
|
+
|
|
72
|
+
Outputs:
|
|
73
|
+
Generated files are written to `outputs/generations/<timestamp>/` (or `LUMIERE_OUTPUT_DIR/generations/<timestamp>/`) with `image_#.png` and `generation.json`.
|
|
74
|
+
|
|
75
|
+
## refine
|
|
76
|
+
Refine an existing image.
|
|
77
|
+
|
|
78
|
+
Example:
|
|
79
|
+
```bash
|
|
80
|
+
npx studio-lumiere-cli refine \
|
|
81
|
+
--image ./outputs/image.png \
|
|
82
|
+
--instruction "Reduce glare and smooth background"
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Options:
|
|
86
|
+
- `--image <path>` (required)
|
|
87
|
+
- `--instruction <text>` (required)
|
|
88
|
+
- `--size <percent>`: Resize jewelry to a percentage of current size.
|
|
89
|
+
|
|
90
|
+
Outputs:
|
|
91
|
+
`outputs/refinements/<timestamp>/refined.png` and `refine.json`.
|
|
92
|
+
|
|
93
|
+
## upscale
|
|
94
|
+
Upscale an existing image.
|
|
95
|
+
|
|
96
|
+
Example:
|
|
97
|
+
```bash
|
|
98
|
+
npx studio-lumiere-cli upscale --image ./outputs/image.png --scale 2
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Options:
|
|
102
|
+
- `--image <path>` (required)
|
|
103
|
+
- `--scale <number>`: Scale factor (default `2`).
|
|
104
|
+
|
|
105
|
+
Outputs:
|
|
106
|
+
`outputs/upscales/<timestamp>/upscaled.png` and `upscale.json`.
|
|
107
|
+
|
|
108
|
+
## muse
|
|
109
|
+
Create a Muse from a source portrait.
|
|
110
|
+
|
|
111
|
+
Example:
|
|
112
|
+
```bash
|
|
113
|
+
npx studio-lumiere-cli muse --name "Nadine" --source ./inputs/portrait.jpg --variations 3
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Options:
|
|
117
|
+
- `--name <name>` (required)
|
|
118
|
+
- `--source <path>` (required)
|
|
119
|
+
- `--variations <n>`: Number of variations (default `3`).
|
|
120
|
+
|
|
121
|
+
Outputs:
|
|
122
|
+
`outputs/muses/<timestamp>/variation_#.png`, `muse.json`, and an updated `muses.json` under the output root.
|
|
123
|
+
|
|
124
|
+
## video
|
|
125
|
+
Generate a video from a prompt.
|
|
126
|
+
|
|
127
|
+
Example:
|
|
128
|
+
```bash
|
|
129
|
+
npx studio-lumiere-cli video --prompt "Slow pan over a diamond ring" --aspect 16:9 --duration 5
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Options:
|
|
133
|
+
- `--prompt <text>` (required)
|
|
134
|
+
- `--aspect <ratio>`
|
|
135
|
+
- `--duration <seconds>`
|
|
136
|
+
|
|
137
|
+
Outputs:
|
|
138
|
+
`outputs/videos/<timestamp>/video.mp4` (when available) and `video.json` with the operation name.
|
|
139
|
+
|
|
140
|
+
## tired-girl
|
|
141
|
+
Generate a tired-girl before image.
|
|
142
|
+
|
|
143
|
+
Example:
|
|
144
|
+
```bash
|
|
145
|
+
npx studio-lumiere-cli tired-girl --muse-id muse_1700000000000 --quantity 2
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Options:
|
|
149
|
+
- `--muse-id <id>`: Muse ID (preferred).
|
|
150
|
+
- `--image <path>`: Single reference image (used if no muse-id).
|
|
151
|
+
- `--styles <ids>`: Comma-separated style IDs.
|
|
152
|
+
- `--quantity <n>`: Number of variants (default `1`).
|
|
153
|
+
|
|
154
|
+
Outputs:
|
|
155
|
+
`outputs/tired_girl/<timestamp>/tired_girl_#.png` and `tired_girl.json`.
|
|
156
|
+
|
|
157
|
+
## annotate
|
|
158
|
+
Overlay text on an image.
|
|
159
|
+
|
|
160
|
+
Example:
|
|
161
|
+
```bash
|
|
162
|
+
npx studio-lumiere-cli annotate --input ./in.png --output ./out.png --text "Hello" --banner
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
Options:
|
|
166
|
+
- `--input <path>` (required)
|
|
167
|
+
- `--output <path>` (required)
|
|
168
|
+
- `--text <text>` (required)
|
|
169
|
+
- `--font <name>`
|
|
170
|
+
- `--size <px>`
|
|
171
|
+
- `--weight <n>`
|
|
172
|
+
- `--color <hex>`
|
|
173
|
+
- `--stroke-color <value>`
|
|
174
|
+
- `--stroke-width <px>`
|
|
175
|
+
- `--banner`
|
|
176
|
+
- `--banner-color <value>`
|
|
177
|
+
- `--banner-padding <px>`
|
|
178
|
+
- `--banner-radius <px>`
|
|
179
|
+
- `--position <pos>`: `top-center|top-left|top-right|bottom-center|bottom-center-high|bottom-left|bottom-right|center`
|
|
180
|
+
- `--padding <px>`
|
|
181
|
+
- `--max-width <ratio>`
|
|
182
|
+
|
|
183
|
+
Outputs:
|
|
184
|
+
Writes the image to the provided `--output` path.
|
|
185
|
+
|
|
186
|
+
## grid
|
|
187
|
+
Assemble multiple images into a grid.
|
|
188
|
+
|
|
189
|
+
Example:
|
|
190
|
+
```bash
|
|
191
|
+
npx studio-lumiere-cli grid \
|
|
192
|
+
--inputs ./a.png,./b.png,./c.png,./d.png \
|
|
193
|
+
--output ./grid.png \
|
|
194
|
+
--columns 2 \
|
|
195
|
+
--rows 2
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
Options:
|
|
199
|
+
- `--inputs <paths>` (required): Comma-separated image paths.
|
|
200
|
+
- `--output <path>` (required)
|
|
201
|
+
- `--columns <n>` (default `2`)
|
|
202
|
+
- `--rows <n>` (default `2`)
|
|
203
|
+
- `--padding <px>` (default `20`)
|
|
204
|
+
- `--background <hex>` (default `#000000`)
|
|
205
|
+
- `--tile-width <px>`
|
|
206
|
+
- `--tile-height <px>`
|
|
207
|
+
|
|
208
|
+
Outputs:
|
|
209
|
+
Writes the image to the provided `--output` path.
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: annotate-image
|
|
3
|
-
description: Write text or banners over images with the annotate helper via SDK/CLI; use when you need captioned or labeled outputs.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Skill: Image Annotation (local-lumiere)
|
|
7
|
-
|
|
8
|
-
This skill describes how to write text over an image using the `annotate` helper in local-lumiere. It covers the SDK function, CLI usage, parameters, and defaults.
|
|
9
|
-
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
## Quick Start
|
|
13
|
-
|
|
14
|
-
```
|
|
15
|
-
node dist/cli.js annotate \
|
|
16
|
-
--input path/to/image.png \
|
|
17
|
-
--output path/to/output.png \
|
|
18
|
-
--text "Your text here" \
|
|
19
|
-
--banner
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
---
|
|
23
|
-
|
|
24
|
-
## SDK API
|
|
25
|
-
|
|
26
|
-
```ts
|
|
27
|
-
import { annotateImage } from "./dist/index.js";
|
|
28
|
-
|
|
29
|
-
await annotateImage(
|
|
30
|
-
"path/to/input.png",
|
|
31
|
-
"path/to/output.png",
|
|
32
|
-
"Your text here",
|
|
33
|
-
{
|
|
34
|
-
fontFamily: "Montserrat",
|
|
35
|
-
fontSize: 48,
|
|
36
|
-
fontWeight: 700,
|
|
37
|
-
color: "#FFFFFF",
|
|
38
|
-
strokeColor: "rgba(0,0,0,0.6)",
|
|
39
|
-
strokeWidth: 4,
|
|
40
|
-
banner: true,
|
|
41
|
-
bannerColor: "rgba(0,0,0,0.45)",
|
|
42
|
-
bannerPadding: 24,
|
|
43
|
-
bannerRadius: 16,
|
|
44
|
-
position: "top-center",
|
|
45
|
-
padding: 32,
|
|
46
|
-
maxWidthRatio: 0.85
|
|
47
|
-
}
|
|
48
|
-
);
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
### Options
|
|
52
|
-
|
|
53
|
-
- `fontFamily`: font family name (default `Montserrat`)
|
|
54
|
-
- `fontSize`: size in px (default ~5% of min image dimension)
|
|
55
|
-
- `fontWeight`: font weight (default `700`)
|
|
56
|
-
- `color`: text color (default `#FFFFFF`)
|
|
57
|
-
- `strokeColor`: outline color (default `rgba(0,0,0,0.6)`)
|
|
58
|
-
- `strokeWidth`: outline width (default `fontSize * 0.08`, min 2)
|
|
59
|
-
- `banner`: enable semi-transparent banner (default `false`)
|
|
60
|
-
- `bannerColor`: banner color (default `rgba(0,0,0,0.45)`)
|
|
61
|
-
- `bannerPadding`: inner padding (default `fontSize * 0.6`)
|
|
62
|
-
- `bannerRadius`: corner radius (default `fontSize * 0.4`)
|
|
63
|
-
- `position`: `top-center|top-left|top-right|bottom-center|bottom-center-high|bottom-left|bottom-right|center` (default `top-center`)
|
|
64
|
-
- `padding`: distance from edges (default `fontSize * 0.8`)
|
|
65
|
-
- `maxWidthRatio`: max text width as ratio of image width (default `0.85`)
|
|
66
|
-
|
|
67
|
-
---
|
|
68
|
-
|
|
69
|
-
## CLI Usage
|
|
70
|
-
|
|
71
|
-
```
|
|
72
|
-
node dist/cli.js annotate \
|
|
73
|
-
--input path/to/image.png \
|
|
74
|
-
--output path/to/output.png \
|
|
75
|
-
--text "Your text here" \
|
|
76
|
-
--position top-center \
|
|
77
|
-
--size 48 \
|
|
78
|
-
--color #FFFFFF \
|
|
79
|
-
--banner
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
---
|
|
83
|
-
|
|
84
|
-
## Notes
|
|
85
|
-
|
|
86
|
-
- The helper uses sharp + SVG overlay.
|
|
87
|
-
- If the font is not installed locally, the system falls back to a generic sans-serif.
|
|
88
|
-
|
|
89
|
-
End of skill.
|
|
90
|
-
|
|
91
|
-
## Related Skills
|
|
92
|
-
|
|
93
|
-
- `C:\\Users\\karim\\Documents\\local-lumiere\\.agents\\skills\\generate-images.md`
|
|
94
|
-
- `C:\\Users\\karim\\Documents\\local-lumiere\\.agents\\skills\\generate-video.md`
|
|
95
|
-
- `C:\\Users\\karim\\Documents\\local-lumiere\\.agents\\skills\\refine-images.md`
|
|
96
|
-
- `C:\\Users\\karim\\Documents\\local-lumiere\\.agents\\skills\\muse-management.md`
|
|
97
|
-
- `C:\\Users\\karim\\Documents\\local-lumiere\\.agents\\skills\\tired-girl.md`
|
|
98
|
-
- `C:\\Users\\karim\\Documents\\local-lumiere\\.agents\\skills\\image-grid.md`
|
|
99
|
-
- `C:\\Users\\karim\\Documents\\local-lumiere\\.agents\\skills\\config-troubleshooting.md`
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: config-troubleshooting
|
|
3
|
-
description: Reference for local-lumiere configuration defaults, environment variables, outputs, and troubleshooting; use when setup or runtime issues occur.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Reference: Configuration & Troubleshooting (local-lumiere)
|
|
7
|
-
|
|
8
|
-
This file collects shared configuration guidance and common troubleshooting patterns for all local-lumiere skills.
|
|
9
|
-
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
## 1) Configuration Reference
|
|
13
|
-
|
|
14
|
-
### 1.1 Environment Variables
|
|
15
|
-
|
|
16
|
-
- `GEMINI_API_KEY` (required)
|
|
17
|
-
- `LUMIERE_OUTPUT_DIR` (optional, default `outputs`)
|
|
18
|
-
|
|
19
|
-
### 1.2 Runtime Config Defaults
|
|
20
|
-
|
|
21
|
-
```ts
|
|
22
|
-
models.prompt = "gemini-3-flash-preview"
|
|
23
|
-
models.image = "gemini-3-pro-image-preview"
|
|
24
|
-
models.video = "veo-3.1-generate-preview"
|
|
25
|
-
retry.maxRetries = 3
|
|
26
|
-
retry.baseDelayMs = 1500
|
|
27
|
-
retry.maxDelayMs = 12000
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
### 1.3 Output Structure
|
|
31
|
-
|
|
32
|
-
```
|
|
33
|
-
outputs/
|
|
34
|
-
generations/<timestamp>/
|
|
35
|
-
refinements/<timestamp>/
|
|
36
|
-
upscales/<timestamp>/
|
|
37
|
-
muses/<timestamp>/
|
|
38
|
-
videos/<timestamp>/
|
|
39
|
-
muses.json
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
---
|
|
43
|
-
|
|
44
|
-
## 2) Common Errors and Fixes
|
|
45
|
-
|
|
46
|
-
### 2.1 Missing API Key
|
|
47
|
-
|
|
48
|
-
**Symptom:** `Missing GEMINI_API_KEY in environment.`
|
|
49
|
-
|
|
50
|
-
**Fix:** Add `GEMINI_API_KEY=...` to your `.env` and ensure it’s loaded.
|
|
51
|
-
|
|
52
|
-
### 2.2 Model Overload / 429 / 503
|
|
53
|
-
|
|
54
|
-
**Symptom:** Requests fail intermittently with overload/timeout errors.
|
|
55
|
-
|
|
56
|
-
**Fix:** Retry automatically (built-in). If persistent, lower batch sizes or wait and re-run.
|
|
57
|
-
|
|
58
|
-
### 2.3 Empty Output
|
|
59
|
-
|
|
60
|
-
**Symptom:** `No image data returned from Gemini.`
|
|
61
|
-
|
|
62
|
-
**Fix:** Re-run with simpler prompts, ensure input images are valid and not corrupted.
|
|
63
|
-
|
|
64
|
-
### 2.4 Bad Paths
|
|
65
|
-
|
|
66
|
-
**Symptom:** File not found errors for inputs.
|
|
67
|
-
|
|
68
|
-
**Fix:** Ensure all image paths are absolute or relative to the repo root.
|
|
69
|
-
|
|
70
|
-
---
|
|
71
|
-
|
|
72
|
-
## 3) Prompt Tips
|
|
73
|
-
|
|
74
|
-
- Be explicit about jewelry fidelity (no extra jewelry, no fake sparkles).
|
|
75
|
-
- Use clear lighting/mood cues.
|
|
76
|
-
- Keep instructions scoped to avoid unintended changes.
|
|
77
|
-
|
|
78
|
-
---
|
|
79
|
-
|
|
80
|
-
## 4) When to Disable Prompt Enhancement
|
|
81
|
-
|
|
82
|
-
If the enhanced prompt drifts too far from your intent, set `enhancePrompt: false` and use a precise base prompt via selections and style hints.
|
|
83
|
-
|
|
84
|
-
---
|
|
85
|
-
|
|
86
|
-
End of reference.
|
|
87
|
-
|
|
88
|
-
## Related Skills
|
|
89
|
-
|
|
90
|
-
- `C:\\Users\\karim\\Documents\\local-lumiere\\.agents\\skills\\generate-images.md`
|
|
91
|
-
- `C:\\Users\\karim\\Documents\\local-lumiere\\.agents\\skills\\generate-video.md`
|
|
92
|
-
- `C:\\Users\\karim\\Documents\\local-lumiere\\.agents\\skills\\refine-images.md`
|
|
93
|
-
- `C:\\Users\\karim\\Documents\\local-lumiere\\.agents\\skills\\muse-management.md`
|
|
94
|
-
- `C:\\Users\\karim\\Documents\\local-lumiere\\.agents\\skills\\tired-girl.md`
|
|
95
|
-
- `C:\\Users\\karim\\Documents\\local-lumiere\\.agents\\skills\\image-grid.md`
|
|
96
|
-
- `C:\\Users\\karim\\Documents\\local-lumiere\\.agents\\skills\\config-troubleshooting.md`
|
|
97
|
-
|