Скилл генерация изображения через fal ai
Generate images via fal.ai. The skill now supports two fal-hosted models:
Synonyms the agent should treat as equivalent:
Best for: infographics, text rendering, banners, photo edits, reference-based compositions.
```text
Reference images provided? -> Edit mode (upload.sh -> edit.sh)
Text-only generation? -> Generate mode (generate.sh)
Model comes from config/.env:
no selector set -> Nano Banana Pro
FAL_IMAGE_PROVIDER=openai -> GPT Image 2
FAL_IMAGE_MODEL=... -> exact override
```
Requires FAL_KEY in config/.env or the environment.
Model selection:
1. --model — one-off override for the current command
2. FAL_IMAGE_MODEL — exact override in config
3. FAL_IMAGE_PROVIDER — google or openai
4. nothing set — default to Nano Banana Pro
Use --model whenever the user explicitly says things like:
Answer that the skill supports two choices and map the command like this:
OpenAI quality default:
Full setup and troubleshooting: config/README.md.
Read references only when needed:
Strengths:
Main params:
Strengths:
Main params:
Compatibility layer:
1. Decide model from config
2. Clarify missing params only if needed:
- Nano Banana: aspect ratio, resolution
- GPT Image 2: image size and quality
3. Propose save path based on project structure
4. Run generate.sh
5. Parse result JSON, report URL and local files if downloaded
1. Get reference images:
- URL already available -> use directly
- local file -> upload.sh
2. Decide model from config
3. Clarify edit intent
4. Run edit.sh
5. Parse result JSON, report URL and local files if downloaded
Nano Banana example:
```bash
sh scripts/generate.sh \
--model "gemini" \
--prompt "infographic about coffee brewing" \
--aspect-ratio "9:16" \
--resolution "1K" \
--output-dir "./images" \
--filename "coffee_infographic"
```
GPT Image 2 example:
```bash
sh scripts/generate.sh \
--model "gpt" \
--prompt "realistic product hero shot with sharp packaging text" \
--image-size "landscape_4_3" \
--quality "medium" \
--output-dir "./images" \
--filename "product_hero"
```
Compatibility example for GPT:
```bash
sh scripts/generate.sh \
--model "openai" \
--prompt "editorial portrait, window light, magazine cover layout" \
--aspect-ratio "4:3" \
--resolution "2K"
```
| Param | Required | Default | Notes |
|-------|----------|---------|-------|
| --prompt | yes | - | text prompt |
| --model | no | config / Nano Banana fallback | nano-banana, google, gemini, gpt, openai, or exact endpoint |
| --aspect-ratio | no | 1:1 | Nano native; for GPT used only when --image-size is omitted |
| --resolution | no | 1K | Nano native; for GPT used only when --image-size is omitted |
| --image-size | no | derived from ratio/resolution | GPT only; preset (landscape_4_3) or WIDTHxHEIGHT |
| --quality | no | medium via config | GPT only; low, medium, high |
| --num-images | no | 1 | 1-4 |
| --output-format | no | png | jpeg, png, webp |
| --output-dir | no | - | local path |
| --filename | no | generated | base filename |
| --web-search | no | false | Nano only; ignored for GPT |
Nano Banana example:
```bash
sh scripts/edit.sh \
--model "gemini" \
--prompt "combine these into a collage" \
--image-urls "https://example.com/img1.png,https://example.com/img2.png" \
--aspect-ratio "16:9" \
--output-dir "./images" \
--filename "collage"
```
GPT Image 2 example:
```bash
sh scripts/edit.sh \
--model "gpt" \
--prompt "make this product shot look like a premium studio campaign" \
--image-urls "https://example.com/source.png" \
--mask-url "https://example.com/mask.png" \
--image-size "auto" \
--quality "medium" \
--output-dir "./images" \
--filename "studio_edit"
```
| Param | Required | Default | Notes |
|-------|----------|---------|-------|
| --prompt | yes | - | edit instruction |
| --image-urls | yes | - | comma-separated URLs |
| --model | no | config / Nano Banana fallback | nano-banana, google, gemini, gpt, openai, or exact endpoint |
| --mask-url | no | - | GPT edit only; optional mask for targeted edits |
| --aspect-ratio | no | auto | Nano native; for GPT used only when --image-size is omitted |
| --resolution | no | 1K | Nano native; for GPT used only when --image-size is omitted |
| --image-size | no | derived from ratio/resolution / auto | GPT only |
| --quality | no | medium via config | GPT only |
| --num-images | no | 1 | 1-4 |
| --output-format | no | png | jpeg, png, webp |
| --output-dir | no | - | local path |
| --filename | no | edited | base filename |
```bash
URL=$(sh scripts/upload.sh --file /path/to/image.png)
URI=$(sh scripts/upload.sh --file /path/to/image.png --base64)
```
For current pricing, check fal's model pages in config/README.md.
| Путь | Размер | SHA256 |
|---|---|---|
| .gitignore | 65 | b8a713abda65b4f7... |
| SKILL.md | 8403 | 3c222479340acf6a... |
| config/README.md | 5258 | 60f448d85d7e9244... |
| references/EDITING.md | 2533 | f3ecd4034880bdcc... |
| references/MODELS.md | 1596 | 854ead01ac243322... |
Войдите, чтобы оставить комментарий.
Комментариев пока нет.