studio-lumiere-cli 0.1.4 → 0.1.6
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/README.md +482 -46
- package/dist/config/constants.d.ts +1 -63
- package/dist/config/constants.js +3 -1004
- package/dist/config/constants.js.map +1 -1
- package/dist/pipelines/generateImages.js +10 -4
- package/dist/pipelines/generateImages.js.map +1 -1
- package/dist/storage/files.js +4 -1
- package/dist/storage/files.js.map +1 -1
- package/dist/studio/constants.d.ts +71 -0
- package/dist/studio/constants.js +1082 -0
- package/dist/studio/constants.js.map +1 -0
- package/dist/studio/promptBuilder.d.ts +4 -0
- package/dist/studio/promptBuilder.js +348 -0
- package/dist/studio/promptBuilder.js.map +1 -0
- package/dist/studio/types.d.ts +155 -0
- package/dist/studio/types.js +2 -0
- package/dist/studio/types.js.map +1 -0
- package/dist/types.d.ts +2 -49
- package/package.json +9 -3
- package/scripts/sync-studio.mjs +16 -0
- package/.agents/skills/generate-images/SKILL.md +0 -121
- package/.env.example +0 -2
- package/AGENTS.md +0 -66
- package/examples/generate.d.ts +0 -1
- package/examples/generate.js +0 -28
- package/examples/generate.js.map +0 -1
- package/examples/generate.ts +0 -30
- package/examples/muse.d.ts +0 -1
- package/examples/muse.js +0 -18
- package/examples/muse.js.map +0 -1
- package/examples/muse.ts +0 -20
- package/examples/video.d.ts +0 -1
- package/examples/video.js +0 -18
- package/examples/video.js.map +0 -1
- package/examples/video.ts +0 -20
- package/logo-round.png +0 -0
- package/logo.jpeg +0 -0
- package/skills/studio-lumiere-cli/SKILL.md +0 -212
- package/skills/studio-lumiere-cli/agents/openai.yaml +0 -4
- package/src/cli.ts +0 -259
- package/src/clients/geminiClient.ts +0 -168
- package/src/config/constants.ts +0 -1105
- package/src/config/options.ts +0 -15
- package/src/config/templates.ts +0 -4
- package/src/config/tiredGirl.ts +0 -11
- package/src/image/annotate.ts +0 -139
- package/src/image/grid.ts +0 -58
- package/src/index.ts +0 -27
- package/src/pipelines/createMuse.ts +0 -76
- package/src/pipelines/generateImages.ts +0 -203
- package/src/pipelines/generateTiredGirl.ts +0 -86
- package/src/pipelines/generateVideo.ts +0 -36
- package/src/pipelines/refineImage.ts +0 -36
- package/src/pipelines/resolve.ts +0 -88
- package/src/pipelines/upscaleImage.ts +0 -30
- package/src/prompt/buildPrompt.ts +0 -380
- package/src/prompt/tiredGirlPrompt.ts +0 -35
- package/src/storage/files.ts +0 -44
- package/src/storage/museStore.ts +0 -31
- package/src/types.ts +0 -198
- package/tsconfig.json +0 -15
package/package.json
CHANGED
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "studio-lumiere-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "Local SDK + CLI for Studio Lumiere image and video generation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"lumiere": "dist/cli.js"
|
|
8
8
|
},
|
|
9
|
+
"files": [
|
|
10
|
+
"dist",
|
|
11
|
+
"scripts"
|
|
12
|
+
],
|
|
9
13
|
"scripts": {
|
|
10
|
-
"
|
|
11
|
-
"
|
|
14
|
+
"sync": "node scripts/sync-studio.mjs",
|
|
15
|
+
"build": "npm run sync && tsc",
|
|
16
|
+
"prepublishOnly": "npm run build",
|
|
17
|
+
"dev": "npm run sync && tsx src/cli.ts",
|
|
12
18
|
"generate": "tsx examples/generate.ts",
|
|
13
19
|
"muse": "tsx examples/muse.ts",
|
|
14
20
|
"video": "tsx examples/video.ts"
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { cpSync, mkdirSync } from "node:fs";
|
|
2
|
+
import { resolve, dirname } from "node:path";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
|
|
5
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
6
|
+
const studioRoot = resolve(__dirname, "../../studio-lumiere");
|
|
7
|
+
const destDir = resolve(__dirname, "../src/studio");
|
|
8
|
+
|
|
9
|
+
mkdirSync(destDir, { recursive: true });
|
|
10
|
+
|
|
11
|
+
const files = ["types.ts", "constants.ts", "promptBuilder.ts"];
|
|
12
|
+
for (const file of files) {
|
|
13
|
+
cpSync(resolve(studioRoot, file), resolve(destDir, file));
|
|
14
|
+
console.log(` synced ${file}`);
|
|
15
|
+
}
|
|
16
|
+
console.log("studio sync complete");
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: generate-images
|
|
3
|
-
description: Generate images with the Studio Lumiere CLI (npx studio-lumiere-cli); inputs, outputs, and parameters.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Skill: Generate Images (CLI)
|
|
7
|
-
|
|
8
|
-
This skill covers **CLI usage only** for image generation with Studio Lumiere.
|
|
9
|
-
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
## Requirements
|
|
13
|
-
|
|
14
|
-
- Set `GEMINI_API_KEY` in your environment.
|
|
15
|
-
- Optional: set `LUMIERE_OUTPUT_DIR` to change the default output folder (defaults to `outputs`).
|
|
16
|
-
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
## Quick Start
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
npx studio-lumiere-cli generate \
|
|
23
|
-
--images ./inputs/ring.jpg \
|
|
24
|
-
--template hand_model \
|
|
25
|
-
--detail nail_nude \
|
|
26
|
-
--ethnicity mena \
|
|
27
|
-
--skin-tone medium \
|
|
28
|
-
--hair-color brunette \
|
|
29
|
-
--background cream_silk \
|
|
30
|
-
--background-type studio \
|
|
31
|
-
--vibe clean \
|
|
32
|
-
--resolution portrait \
|
|
33
|
-
--quantity 1
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
---
|
|
37
|
-
|
|
38
|
-
## Inputs
|
|
39
|
-
|
|
40
|
-
- `--images` (required): Comma-separated local file paths to jewelry images.
|
|
41
|
-
- `--template` (required): Template ID.
|
|
42
|
-
- Optional style/scene parameters (see below).
|
|
43
|
-
- Optional Muse reference (either `--muse-id` or `--muse-images`).
|
|
44
|
-
|
|
45
|
-
---
|
|
46
|
-
|
|
47
|
-
## Outputs
|
|
48
|
-
|
|
49
|
-
- Generated images are written under:
|
|
50
|
-
- `outputs/generations/<timestamp>/` by default, or
|
|
51
|
-
- `LUMIERE_OUTPUT_DIR/generations/<timestamp>/` if configured.
|
|
52
|
-
- Each run writes a `generation.json` log alongside the images.
|
|
53
|
-
- The CLI prints a JSON result containing `outputImages` and `logPath`.
|
|
54
|
-
|
|
55
|
-
---
|
|
56
|
-
|
|
57
|
-
## Parameters (generate)
|
|
58
|
-
|
|
59
|
-
Required:
|
|
60
|
-
- `--images <paths>`: Comma-separated list of input image paths.
|
|
61
|
-
- `--template <id>`: Template ID.
|
|
62
|
-
|
|
63
|
-
Optional:
|
|
64
|
-
- `--detail <id>`
|
|
65
|
-
- `--secondary-detail <id>`
|
|
66
|
-
- `--tertiary-detail <id>`
|
|
67
|
-
- `--ethnicity <id>`
|
|
68
|
-
- `--skin-tone <id>`
|
|
69
|
-
- `--hair-color <id>`
|
|
70
|
-
- `--background <id>`
|
|
71
|
-
- `--background-type <id>`
|
|
72
|
-
- `--vibe <id>`
|
|
73
|
-
- `--resolution <id>`
|
|
74
|
-
- `--occasion <id>`
|
|
75
|
-
- `--quantity <n>`: Number of outputs (default `1`).
|
|
76
|
-
- `--muse-id <id>`: Use a stored Muse.
|
|
77
|
-
- `--muse-images <paths>`: Comma-separated Muse image paths.
|
|
78
|
-
- `--no-enhance`: Disable prompt enhancement.
|
|
79
|
-
|
|
80
|
-
---
|
|
81
|
-
|
|
82
|
-
## Find Valid IDs (templates/options)
|
|
83
|
-
|
|
84
|
-
Use the `list` command to see allowed IDs:
|
|
85
|
-
|
|
86
|
-
```bash
|
|
87
|
-
npx studio-lumiere-cli list templates
|
|
88
|
-
npx studio-lumiere-cli list ethnicities
|
|
89
|
-
npx studio-lumiere-cli list skin-tones
|
|
90
|
-
npx studio-lumiere-cli list hair-colors
|
|
91
|
-
npx studio-lumiere-cli list backgrounds
|
|
92
|
-
npx studio-lumiere-cli list background-types
|
|
93
|
-
npx studio-lumiere-cli list vibes
|
|
94
|
-
npx studio-lumiere-cli list resolutions
|
|
95
|
-
npx studio-lumiere-cli list occasions
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
---
|
|
99
|
-
|
|
100
|
-
## Example (multiple images + muse)
|
|
101
|
-
|
|
102
|
-
```bash
|
|
103
|
-
npx studio-lumiere-cli generate \
|
|
104
|
-
--images ./inputs/ring.jpg,./inputs/bracelet.jpg \
|
|
105
|
-
--template hand_model \
|
|
106
|
-
--detail nail_nude \
|
|
107
|
-
--resolution portrait \
|
|
108
|
-
--quantity 2 \
|
|
109
|
-
--muse-images ./muses/m1.png,./muses/m2.png
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
End of skill.
|
|
113
|
-
|
|
114
|
-
## Related Skills
|
|
115
|
-
|
|
116
|
-
- `C:\Users\karim\Documents\local-lumiere\.agents\skills\generate-video.md`
|
|
117
|
-
- `C:\Users\karim\Documents\local-lumiere\.agents\skills\refine-images.md`
|
|
118
|
-
- `C:\Users\karim\Documents\local-lumiere\.agents\skills\muse-management.md`
|
|
119
|
-
- `C:\Users\karim\Documents\local-lumiere\.agents\skills\tired-girl.md`
|
|
120
|
-
- `C:\Users\karim\Documents\local-lumiere\.agents\skills\image-grid.md`
|
|
121
|
-
- `C:\Users\karim\Documents\local-lumiere\.agents\skills\config-troubleshooting.md`
|
package/.env.example
DELETED
package/AGENTS.md
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
# AI Agent Workflow & Standards
|
|
2
|
-
|
|
3
|
-
This document outlines the mandatory workflow for all AI agents collaborating on this project. Strictly adhere to these procedures for every brand-new feature or significant task.
|
|
4
|
-
|
|
5
|
-
## Image Overlay Defaults
|
|
6
|
-
|
|
7
|
-
- Logo file: `logo-round.png`
|
|
8
|
-
- Placement: `top-left`
|
|
9
|
-
- Scale: `0.08`
|
|
10
|
-
- Margin: `24`
|
|
11
|
-
- Opacity: `0.75`
|
|
12
|
-
- Script: `node .agents/skills/image-overlay/scripts/overlay-image.js`
|
|
13
|
-
|
|
14
|
-
## 1. Workspace Preparation
|
|
15
|
-
|
|
16
|
-
* **Stories Directory:** All documentation and state tracking for a task must reside in the `stories/` folder.
|
|
17
|
-
* *Action:* Check if the `stories/` folder exists. If not, create it immediately.
|
|
18
|
-
* **Git Branching:** All work must be performed on a dedicated feature branch.
|
|
19
|
-
* *Naming Convention:* `story/<name-of-story>` (e.g., `story/mobile-ui-fix`).
|
|
20
|
-
* *Action:* Create and switch to the new branch before writing any code.
|
|
21
|
-
* *IMPORTANT:* all git commands should be executed one at a time. Don't try to chain them in one command.
|
|
22
|
-
|
|
23
|
-
## 2. The 5-Step Development Process
|
|
24
|
-
|
|
25
|
-
We follow a strict iterative cycle. All outputs from these steps must be documented in a **single file** within the `stories/` folder.
|
|
26
|
-
|
|
27
|
-
**Documentation File Details:**
|
|
28
|
-
* **Location:** `stories/`
|
|
29
|
-
* **Naming Convention:** `YYYY-MM-DD-short-descriptive-name.md` (e.g., `2026-01-25-mobile-ui-refactor.md`).
|
|
30
|
-
* **Format:** Markdown.
|
|
31
|
-
|
|
32
|
-
### Step 1: Spec
|
|
33
|
-
* Analyze the user's request and requirements.
|
|
34
|
-
* Define the scope, goals, and technical constraints.
|
|
35
|
-
* Write this into the documentation file under a `## Spec` header.
|
|
36
|
-
|
|
37
|
-
### Step 2: Plan
|
|
38
|
-
* Break down the implementation into actionable steps.
|
|
39
|
-
* Identify necessary file changes, dependencies, and architectural impacts.
|
|
40
|
-
* Write this into the documentation file under a `## Plan` header.
|
|
41
|
-
|
|
42
|
-
### Step 3: Implement
|
|
43
|
-
* Write the code according to the approved plan.
|
|
44
|
-
* Adhere to existing project patterns, style guides, and tech stack conventions.
|
|
45
|
-
* Log significant actions or decisions in the documentation file under a `## Implementation Log` header.
|
|
46
|
-
|
|
47
|
-
### Step 4: Review
|
|
48
|
-
* Self-critique the code.
|
|
49
|
-
* Run builds, linters, and tests (`npm run build`, `npx tsc --noEmit`, etc.) to verify correctness.
|
|
50
|
-
* Present the results and any findings to the user.
|
|
51
|
-
* Write findings in the documentation file under a `## Review` header.
|
|
52
|
-
|
|
53
|
-
### Step 5: Fix (Iterative Loop)
|
|
54
|
-
* Address issues found in the Review step or feedback provided by the user.
|
|
55
|
-
* **Loop:** Repeat Steps 4 (Review) and 5 (Fix) until the user explicitly confirms the code works and is approved.
|
|
56
|
-
* Log fixes and subsequent reviews in the documentation file.
|
|
57
|
-
|
|
58
|
-
## 3. Completion & Git Workflow
|
|
59
|
-
|
|
60
|
-
Once the work is approved by the user (after the Review/Fix loop):
|
|
61
|
-
|
|
62
|
-
1. **Stage Files:** `git add` all relevant code files and the story documentation file.
|
|
63
|
-
2. **Review Changes:** Use the command `/git:review` to generate a summary of staged changes.
|
|
64
|
-
3. **Commit:** Use the command `/git:commit` to create the commit.
|
|
65
|
-
4. **Push & PR:** Use the command `/git:commit-push-pr` to push the branch and automatically create/open a Pull Request.
|
|
66
|
-
5. **Cleanup:** Use the command `/git:clean-gone` to clean up local branches and synchronize with the remote.
|
package/examples/generate.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "dotenv/config";
|
package/examples/generate.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import "dotenv/config";
|
|
2
|
-
import { generateImages } from "../src/pipelines/generateImages";
|
|
3
|
-
const config = {
|
|
4
|
-
apiKey: process.env.GEMINI_API_KEY || "",
|
|
5
|
-
outputDir: process.env.LUMIERE_OUTPUT_DIR || "outputs"
|
|
6
|
-
};
|
|
7
|
-
const run = async () => {
|
|
8
|
-
if (!config.apiKey)
|
|
9
|
-
throw new Error("Missing GEMINI_API_KEY");
|
|
10
|
-
const result = await generateImages(config, {
|
|
11
|
-
inputImages: ["./inputs/ring.jpg"],
|
|
12
|
-
quantity: 1,
|
|
13
|
-
selections: {
|
|
14
|
-
templateId: "hand_model",
|
|
15
|
-
detailId: "nail_nude",
|
|
16
|
-
ethnicityId: "mena",
|
|
17
|
-
skinToneId: "medium",
|
|
18
|
-
hairColorId: "brunette",
|
|
19
|
-
backgroundId: "cream_silk",
|
|
20
|
-
backgroundTypeId: "studio",
|
|
21
|
-
vibeId: "clean",
|
|
22
|
-
resolutionId: "portrait"
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
console.log(result);
|
|
26
|
-
};
|
|
27
|
-
run();
|
|
28
|
-
//# sourceMappingURL=generate.js.map
|
package/examples/generate.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generate.js","sourceRoot":"","sources":["generate.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAC;AACvB,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAGjE,MAAM,MAAM,GAAkB;IAC5B,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,cAAc,IAAI,EAAE;IACxC,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,kBAAkB,IAAI,SAAS;CACvD,CAAC;AAEF,MAAM,GAAG,GAAG,KAAK,IAAI,EAAE;IACrB,IAAI,CAAC,MAAM,CAAC,MAAM;QAAE,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAC;IAC9D,MAAM,MAAM,GAAG,MAAM,cAAc,CAAC,MAAM,EAAE;QAC1C,WAAW,EAAE,CAAC,mBAAmB,CAAC;QAClC,QAAQ,EAAE,CAAC;QACX,UAAU,EAAE;YACV,UAAU,EAAE,YAAY;YACxB,QAAQ,EAAE,WAAW;YACrB,WAAW,EAAE,MAAM;YACnB,UAAU,EAAE,QAAQ;YACpB,WAAW,EAAE,UAAU;YACvB,YAAY,EAAE,YAAY;YAC1B,gBAAgB,EAAE,QAAQ;YAC1B,MAAM,EAAE,OAAO;YACf,YAAY,EAAE,UAAU;SACzB;KACF,CAAC,CAAC;IACH,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACtB,CAAC,CAAC;AAEF,GAAG,EAAE,CAAC"}
|
package/examples/generate.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import "dotenv/config";
|
|
2
|
-
import { generateImages } from "../src/pipelines/generateImages";
|
|
3
|
-
import { LumiereConfig } from "../src/types";
|
|
4
|
-
|
|
5
|
-
const config: LumiereConfig = {
|
|
6
|
-
apiKey: process.env.GEMINI_API_KEY || "",
|
|
7
|
-
outputDir: process.env.LUMIERE_OUTPUT_DIR || "outputs"
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
const run = async () => {
|
|
11
|
-
if (!config.apiKey) throw new Error("Missing GEMINI_API_KEY");
|
|
12
|
-
const result = await generateImages(config, {
|
|
13
|
-
inputImages: ["./inputs/ring.jpg"],
|
|
14
|
-
quantity: 1,
|
|
15
|
-
selections: {
|
|
16
|
-
templateId: "hand_model",
|
|
17
|
-
detailId: "nail_nude",
|
|
18
|
-
ethnicityId: "mena",
|
|
19
|
-
skinToneId: "medium",
|
|
20
|
-
hairColorId: "brunette",
|
|
21
|
-
backgroundId: "cream_silk",
|
|
22
|
-
backgroundTypeId: "studio",
|
|
23
|
-
vibeId: "clean",
|
|
24
|
-
resolutionId: "portrait"
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
console.log(result);
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
run();
|
package/examples/muse.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "dotenv/config";
|
package/examples/muse.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import "dotenv/config";
|
|
2
|
-
import { createMuse } from "../src/pipelines/createMuse";
|
|
3
|
-
const config = {
|
|
4
|
-
apiKey: process.env.GEMINI_API_KEY || "",
|
|
5
|
-
outputDir: process.env.LUMIERE_OUTPUT_DIR || "outputs"
|
|
6
|
-
};
|
|
7
|
-
const run = async () => {
|
|
8
|
-
if (!config.apiKey)
|
|
9
|
-
throw new Error("Missing GEMINI_API_KEY");
|
|
10
|
-
const result = await createMuse(config, {
|
|
11
|
-
name: "Editorial Muse",
|
|
12
|
-
sourceImage: "./inputs/muse_source.jpg",
|
|
13
|
-
variations: 3
|
|
14
|
-
});
|
|
15
|
-
console.log(result);
|
|
16
|
-
};
|
|
17
|
-
run();
|
|
18
|
-
//# sourceMappingURL=muse.js.map
|
package/examples/muse.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"muse.js","sourceRoot":"","sources":["muse.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAC;AACvB,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAGzD,MAAM,MAAM,GAAkB;IAC5B,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,cAAc,IAAI,EAAE;IACxC,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,kBAAkB,IAAI,SAAS;CACvD,CAAC;AAEF,MAAM,GAAG,GAAG,KAAK,IAAI,EAAE;IACrB,IAAI,CAAC,MAAM,CAAC,MAAM;QAAE,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAC;IAC9D,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,MAAM,EAAE;QACtC,IAAI,EAAE,gBAAgB;QACtB,WAAW,EAAE,0BAA0B;QACvC,UAAU,EAAE,CAAC;KACd,CAAC,CAAC;IACH,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACtB,CAAC,CAAC;AAEF,GAAG,EAAE,CAAC"}
|
package/examples/muse.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import "dotenv/config";
|
|
2
|
-
import { createMuse } from "../src/pipelines/createMuse";
|
|
3
|
-
import { LumiereConfig } from "../src/types";
|
|
4
|
-
|
|
5
|
-
const config: LumiereConfig = {
|
|
6
|
-
apiKey: process.env.GEMINI_API_KEY || "",
|
|
7
|
-
outputDir: process.env.LUMIERE_OUTPUT_DIR || "outputs"
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
const run = async () => {
|
|
11
|
-
if (!config.apiKey) throw new Error("Missing GEMINI_API_KEY");
|
|
12
|
-
const result = await createMuse(config, {
|
|
13
|
-
name: "Editorial Muse",
|
|
14
|
-
sourceImage: "./inputs/muse_source.jpg",
|
|
15
|
-
variations: 3
|
|
16
|
-
});
|
|
17
|
-
console.log(result);
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
run();
|
package/examples/video.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "dotenv/config";
|
package/examples/video.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import "dotenv/config";
|
|
2
|
-
import { generateVideo } from "../src/pipelines/generateVideo";
|
|
3
|
-
const config = {
|
|
4
|
-
apiKey: process.env.GEMINI_API_KEY || "",
|
|
5
|
-
outputDir: process.env.LUMIERE_OUTPUT_DIR || "outputs"
|
|
6
|
-
};
|
|
7
|
-
const run = async () => {
|
|
8
|
-
if (!config.apiKey)
|
|
9
|
-
throw new Error("Missing GEMINI_API_KEY");
|
|
10
|
-
const result = await generateVideo(config, {
|
|
11
|
-
prompt: "A cinematic close-up of a model gently turning her head, earrings catching soft light. High-end jewelry commercial aesthetic.",
|
|
12
|
-
aspectRatio: "9:16",
|
|
13
|
-
durationSeconds: 5
|
|
14
|
-
});
|
|
15
|
-
console.log(result);
|
|
16
|
-
};
|
|
17
|
-
run();
|
|
18
|
-
//# sourceMappingURL=video.js.map
|
package/examples/video.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"video.js","sourceRoot":"","sources":["video.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAC;AACvB,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAG/D,MAAM,MAAM,GAAkB;IAC5B,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,cAAc,IAAI,EAAE;IACxC,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,kBAAkB,IAAI,SAAS;CACvD,CAAC;AAEF,MAAM,GAAG,GAAG,KAAK,IAAI,EAAE;IACrB,IAAI,CAAC,MAAM,CAAC,MAAM;QAAE,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAC;IAC9D,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,MAAM,EAAE;QACzC,MAAM,EAAE,+HAA+H;QACvI,WAAW,EAAE,MAAM;QACnB,eAAe,EAAE,CAAC;KACnB,CAAC,CAAC;IACH,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACtB,CAAC,CAAC;AAEF,GAAG,EAAE,CAAC"}
|
package/examples/video.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import "dotenv/config";
|
|
2
|
-
import { generateVideo } from "../src/pipelines/generateVideo";
|
|
3
|
-
import { LumiereConfig } from "../src/types";
|
|
4
|
-
|
|
5
|
-
const config: LumiereConfig = {
|
|
6
|
-
apiKey: process.env.GEMINI_API_KEY || "",
|
|
7
|
-
outputDir: process.env.LUMIERE_OUTPUT_DIR || "outputs"
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
const run = async () => {
|
|
11
|
-
if (!config.apiKey) throw new Error("Missing GEMINI_API_KEY");
|
|
12
|
-
const result = await generateVideo(config, {
|
|
13
|
-
prompt: "A cinematic close-up of a model gently turning her head, earrings catching soft light. High-end jewelry commercial aesthetic.",
|
|
14
|
-
aspectRatio: "9:16",
|
|
15
|
-
durationSeconds: 5
|
|
16
|
-
});
|
|
17
|
-
console.log(result);
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
run();
|
package/logo-round.png
DELETED
|
Binary file
|
package/logo.jpeg
DELETED
|
Binary file
|
|
@@ -1,212 +0,0 @@
|
|
|
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
|
-
## Timing
|
|
16
|
-
Image and video generation can take time: expect ~1-2 minutes per image and ~4-5 minutes per video.
|
|
17
|
-
|
|
18
|
-
## list
|
|
19
|
-
Print JSON for valid IDs.
|
|
20
|
-
|
|
21
|
-
Example:
|
|
22
|
-
```bash
|
|
23
|
-
npx studio-lumiere-cli list templates
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
Allowed types:
|
|
27
|
-
- `templates`
|
|
28
|
-
- `ethnicities`
|
|
29
|
-
- `skin-tones`
|
|
30
|
-
- `hair-colors`
|
|
31
|
-
- `backgrounds`
|
|
32
|
-
- `background-types`
|
|
33
|
-
- `vibes`
|
|
34
|
-
- `resolutions`
|
|
35
|
-
- `occasions`
|
|
36
|
-
|
|
37
|
-
## generate
|
|
38
|
-
Generate images from input jewelry photos.
|
|
39
|
-
|
|
40
|
-
Example:
|
|
41
|
-
```bash
|
|
42
|
-
npx studio-lumiere-cli generate \
|
|
43
|
-
--images ./inputs/ring.jpg \
|
|
44
|
-
--template hand_model \
|
|
45
|
-
--detail nail_nude \
|
|
46
|
-
--ethnicity mena \
|
|
47
|
-
--skin-tone medium \
|
|
48
|
-
--hair-color brunette \
|
|
49
|
-
--background cream_silk \
|
|
50
|
-
--background-type studio \
|
|
51
|
-
--vibe clean \
|
|
52
|
-
--resolution portrait \
|
|
53
|
-
--quantity 1
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
Options:
|
|
57
|
-
- `--images <paths>` (required): Comma-separated input image paths.
|
|
58
|
-
- `--template <id>` (required): Template ID.
|
|
59
|
-
- `--detail <id>`
|
|
60
|
-
- `--secondary-detail <id>`
|
|
61
|
-
- `--tertiary-detail <id>`
|
|
62
|
-
- `--ethnicity <id>`
|
|
63
|
-
- `--skin-tone <id>`
|
|
64
|
-
- `--hair-color <id>`
|
|
65
|
-
- `--background <id>`
|
|
66
|
-
- `--background-type <id>`
|
|
67
|
-
- `--vibe <id>`
|
|
68
|
-
- `--resolution <id>`
|
|
69
|
-
- `--occasion <id>`
|
|
70
|
-
- `--quantity <n>`: Number of outputs (default `1`).
|
|
71
|
-
- `--muse-id <id>`: Use a stored Muse.
|
|
72
|
-
- `--muse-images <paths>`: Comma-separated Muse image paths.
|
|
73
|
-
- `--no-enhance`: Disable prompt enhancement.
|
|
74
|
-
|
|
75
|
-
Outputs:
|
|
76
|
-
Generated files are written to `outputs/generations/<timestamp>/` (or `LUMIERE_OUTPUT_DIR/generations/<timestamp>/`) with `image_#.png` and `generation.json`.
|
|
77
|
-
|
|
78
|
-
## refine
|
|
79
|
-
Refine an existing image.
|
|
80
|
-
|
|
81
|
-
Example:
|
|
82
|
-
```bash
|
|
83
|
-
npx studio-lumiere-cli refine \
|
|
84
|
-
--image ./outputs/image.png \
|
|
85
|
-
--instruction "Reduce glare and smooth background"
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
Options:
|
|
89
|
-
- `--image <path>` (required)
|
|
90
|
-
- `--instruction <text>` (required)
|
|
91
|
-
- `--size <percent>`: Resize jewelry to a percentage of current size.
|
|
92
|
-
|
|
93
|
-
Outputs:
|
|
94
|
-
`outputs/refinements/<timestamp>/refined.png` and `refine.json`.
|
|
95
|
-
|
|
96
|
-
## upscale
|
|
97
|
-
Upscale an existing image.
|
|
98
|
-
|
|
99
|
-
Example:
|
|
100
|
-
```bash
|
|
101
|
-
npx studio-lumiere-cli upscale --image ./outputs/image.png --scale 2
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
Options:
|
|
105
|
-
- `--image <path>` (required)
|
|
106
|
-
- `--scale <number>`: Scale factor (default `2`).
|
|
107
|
-
|
|
108
|
-
Outputs:
|
|
109
|
-
`outputs/upscales/<timestamp>/upscaled.png` and `upscale.json`.
|
|
110
|
-
|
|
111
|
-
## muse
|
|
112
|
-
Create a Muse from a source portrait.
|
|
113
|
-
|
|
114
|
-
Example:
|
|
115
|
-
```bash
|
|
116
|
-
npx studio-lumiere-cli muse --name "Nadine" --source ./inputs/portrait.jpg --variations 3
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
Options:
|
|
120
|
-
- `--name <name>` (required)
|
|
121
|
-
- `--source <path>` (required)
|
|
122
|
-
- `--variations <n>`: Number of variations (default `3`).
|
|
123
|
-
|
|
124
|
-
Outputs:
|
|
125
|
-
`outputs/muses/<timestamp>/variation_#.png`, `muse.json`, and an updated `muses.json` under the output root.
|
|
126
|
-
|
|
127
|
-
## video
|
|
128
|
-
Generate a video from a prompt.
|
|
129
|
-
|
|
130
|
-
Example:
|
|
131
|
-
```bash
|
|
132
|
-
npx studio-lumiere-cli video --prompt "Slow pan over a diamond ring" --aspect 16:9 --duration 5
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
Options:
|
|
136
|
-
- `--prompt <text>` (required)
|
|
137
|
-
- `--aspect <ratio>`
|
|
138
|
-
- `--duration <seconds>`
|
|
139
|
-
|
|
140
|
-
Outputs:
|
|
141
|
-
`outputs/videos/<timestamp>/video.mp4` (when available) and `video.json` with the operation name.
|
|
142
|
-
|
|
143
|
-
## tired-girl
|
|
144
|
-
Generate a tired-girl before image.
|
|
145
|
-
|
|
146
|
-
Example:
|
|
147
|
-
```bash
|
|
148
|
-
npx studio-lumiere-cli tired-girl --muse-id muse_1700000000000 --quantity 2
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
Options:
|
|
152
|
-
- `--muse-id <id>`: Muse ID (preferred).
|
|
153
|
-
- `--image <path>`: Single reference image (used if no muse-id).
|
|
154
|
-
- `--styles <ids>`: Comma-separated style IDs.
|
|
155
|
-
- `--quantity <n>`: Number of variants (default `1`).
|
|
156
|
-
|
|
157
|
-
Outputs:
|
|
158
|
-
`outputs/tired_girl/<timestamp>/tired_girl_#.png` and `tired_girl.json`.
|
|
159
|
-
|
|
160
|
-
## annotate
|
|
161
|
-
Overlay text on an image.
|
|
162
|
-
|
|
163
|
-
Example:
|
|
164
|
-
```bash
|
|
165
|
-
npx studio-lumiere-cli annotate --input ./in.png --output ./out.png --text "Hello" --banner
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
Options:
|
|
169
|
-
- `--input <path>` (required)
|
|
170
|
-
- `--output <path>` (required)
|
|
171
|
-
- `--text <text>` (required)
|
|
172
|
-
- `--font <name>`
|
|
173
|
-
- `--size <px>`
|
|
174
|
-
- `--weight <n>`
|
|
175
|
-
- `--color <hex>`
|
|
176
|
-
- `--stroke-color <value>`
|
|
177
|
-
- `--stroke-width <px>`
|
|
178
|
-
- `--banner`
|
|
179
|
-
- `--banner-color <value>`
|
|
180
|
-
- `--banner-padding <px>`
|
|
181
|
-
- `--banner-radius <px>`
|
|
182
|
-
- `--position <pos>`: `top-center|top-left|top-right|bottom-center|bottom-center-high|bottom-left|bottom-right|center`
|
|
183
|
-
- `--padding <px>`
|
|
184
|
-
- `--max-width <ratio>`
|
|
185
|
-
|
|
186
|
-
Outputs:
|
|
187
|
-
Writes the image to the provided `--output` path.
|
|
188
|
-
|
|
189
|
-
## grid
|
|
190
|
-
Assemble multiple images into a grid.
|
|
191
|
-
|
|
192
|
-
Example:
|
|
193
|
-
```bash
|
|
194
|
-
npx studio-lumiere-cli grid \
|
|
195
|
-
--inputs ./a.png,./b.png,./c.png,./d.png \
|
|
196
|
-
--output ./grid.png \
|
|
197
|
-
--columns 2 \
|
|
198
|
-
--rows 2
|
|
199
|
-
```
|
|
200
|
-
|
|
201
|
-
Options:
|
|
202
|
-
- `--inputs <paths>` (required): Comma-separated image paths.
|
|
203
|
-
- `--output <path>` (required)
|
|
204
|
-
- `--columns <n>` (default `2`)
|
|
205
|
-
- `--rows <n>` (default `2`)
|
|
206
|
-
- `--padding <px>` (default `20`)
|
|
207
|
-
- `--background <hex>` (default `#000000`)
|
|
208
|
-
- `--tile-width <px>`
|
|
209
|
-
- `--tile-height <px>`
|
|
210
|
-
|
|
211
|
-
Outputs:
|
|
212
|
-
Writes the image to the provided `--output` path.
|