微算力 · API 导航与自营网关
API 接入 EN
未登录登录
🎨

Bria官方图像生成结构化提示规范

vgl · vv1.2.1
专业技能 安全 S+ 级 作者 galbria 公开目录收录
下载 2.8k 安装 969 收藏 8.3k 浏览 13.6k
原始页面

简介

Bria官方VGL格式规范文档,将自然语言图像描述转化为确定性JSON结构,确保AI图像生成的可控性与可复现性。

原始描述

Maximum control over AI image generation — write structured VGL (Visual Generation Language) JSON that explicitly controls every visual attribute. Define exa...

中文使用说明 来自收录源

核心功能

VGL(Visual Generation Language)是专为Bria FIBO图像生成模型设计的结构化提示语言。该Skill将模糊的自然语言图像描述转化为确定性的JSON Schema,显式声明每一个视觉属性——从物体位置、光照条件到相机参数,彻底消除传统文本提示的歧义性。

显著优势

精确控制与可复现性:相比Stable Diffusion或DALL-E的开放式文本提示,VGL通过结构化字段强制规范输出,确保多次生成结果的一致性。例如photographic_characteristics.lens_focal_length明确要求"85mm portrait"而非模糊的"professional photo"。

多模式支持:覆盖Generate(文生图)、Edit(图生图)、Edit_with_Mask(局部重绘)、Caption(反推描述)、Refine(提示词优化)五种工作模式,满足从创意生成到精细调修的全流程需求。

专业级摄影参数:内置完整的摄影语法——景深、对焦、机位角度、镜头焦段、布光方向等,使非摄影师用户也能输出行业标准的图像规格描述。

智能保真机制:标准编辑模式自动继承原图所有未修改属性,遮罩编辑模式确保填充内容与未遮罩区域无缝融合,避免AI常见的"整体重绘失控"问题。

潜在局限

学习曲线陡峭:11个必填字段、嵌套对象结构、大量枚举值约束,对 casual 用户不够友好。快速实验场景下,传统自然语言提示效率更高。

Bria生态锁定:VGL为Bria AI专有格式,无法直接迁移至Midjourney、Stable Diffusion等竞品平台,存在供应商锁定风险。

对象数量限制:objects数组硬性限制最多5个元素,复杂场景需人工精简优先级,可能遗漏边缘细节。

文本渲染保守:text_render字段默认强制为空,仅当用户提供精确文本内容时才填充,虽避免幻觉但也限制了含文字创意图的便捷生成。

适合人群

  • 品牌/电商设计师:需要批量生成风格统一的商品图、模特图
  • 广告公司创意总监:追求像素级控制的商业摄影替代方案
  • AI工作流工程师:构建可复用的图像生成Pipeline
  • 对Midjourney随机性不满的专业用户

常规风险提示

  1. API成本:Bria为商业云服务,高频调用需关注token消耗
  2. 版权合规:生成人物肖像需确认Bria训练数据来源的商用授权范围
  3. 结构化提示词膨胀:复杂场景的JSON可能超过API长度限制,需合理拆分
  4. 与bria-ai Skill依赖:VGL本身仅生成提示词,实际生图需配合执行类Skill使用

使用建议

建议与bria-ai Skill组合使用:vgl负责"写剧本",bria-ai负责"执行拍摄"。对于已有图像的二次编辑,优先使用Refine模式保留种子一致性。

技能正文


name: vgl description: Write structured VGL (Visual Generation Language) JSON prompts for Bria's FIBO image generation models. Use this skill when creating detailed image descriptions in JSON format for text-to-image generation, image editing, inpainting, outpainting, background generation, or captioning. Triggers include requests to write structured prompts, create VGL JSON, describe images for AI generation, or work with Bria/FIBO's structured_prompt format. Also use when converting natural language image requests into the deterministic JSON schema required by FIBO models.

Bria VGL Prompt Writing

Generate structured JSON prompts for Bria's FIBO models using Visual Generation Language (VGL).

Related Skill: Use bria-ai to execute these VGL prompts via the Bria API. VGL defines the structured prompt format; bria-ai handles generation, editing, and background removal.

Core Concept

VGL replaces ambiguous natural language prompts with deterministic JSON that explicitly declares every visual attribute: objects, lighting, camera settings, composition, and style. This ensures reproducible, controllable image generation.

Operation Modes

Mode Input Output Use Case
Generate Text prompt VGL JSON Create new image from description
Edit Image + instruction VGL JSON Modify reference image
Edit_with_Mask Masked image + instruction VGL JSON Fill grey masked regions
Caption Image only VGL JSON Describe existing image
Refine Existing JSON + edit Updated VGL JSON Modify existing prompt

JSON Schema

Output a single valid JSON object with these required keys:

1. short_description (String)

Concise summary of image content, max 200 words. Include key subjects, actions, setting, and mood.

2. objects (Array, max 5 items)

Each object requires:

{
  "description": "Detailed description, max 100 words",
  "location": "center | top-left | bottom-right foreground | etc.",
  "relative_size": "small | medium | large within frame",
  "shape_and_color": "Basic shape and dominant color",
  "texture": "smooth | rough | metallic | furry | fabric | etc.",
  "appearance_details": "Notable visual details",
  "relationship": "Relationship to other objects",
  "orientation": "upright | tilted 45 degrees | facing left | horizontal | etc."
}

Human subjects add:

{
  "pose": "Body position description",
  "expression": "winking | joyful | serious | surprised | calm",
  "clothing": "Attire description",
  "action": "What the person is doing",
  "gender": "Gender description",
  "skin_tone_and_texture": "Skin appearance"
}

Object clusters add:

{
  "number_of_objects": 3
}

Size guidance: If a person is the main subject, use "medium-to-large" or "large within frame".

3. background_setting (String)

Overall environment, setting, and background elements not in objects.

4. lighting (Object)

{
  "conditions": "bright daylight | dim indoor | studio lighting | golden hour | blue hour | overcast",
  "direction": "front-lit | backlit | side-lit from left | top-down",
  "shadows": "long, soft shadows | sharp, defined shadows | minimal shadows"
}

5. aesthetics (Object)

{
  "composition": "rule of thirds | symmetrical | centered | leading lines | medium shot | close-up",
  "color_scheme": "monochromatic blue | warm complementary | high contrast | pastel",
  "mood_atmosphere": "serene | energetic | mysterious | joyful | dramatic | peaceful"
}

For people as main subject, specify shot type in composition: "medium shot", "close-up", "portrait composition".

6. photographic_characteristics (Object)

{
  "depth_of_field": "shallow | deep | bokeh background",
  "focus": "sharp focus on subject | soft focus | motion blur",
  "camera_angle": "eye-level | low angle | high angle | dutch angle | bird's-eye",
  "lens_focal_length": "wide-angle | 50mm standard | 85mm portrait | telephoto | macro"
}

For people: Prefer "standard lens (35mm-50mm)" or "portrait lens (50mm-85mm)". Avoid wide-angle unless specified.

7. style_medium (String)

"photograph" | "oil painting" | "watercolor" | "3D render" | "digital illustration" | "pencil sketch"

Default to "photograph" unless explicitly requested otherwise.

8. artistic_style (String)

If not photograph, describe characteristics in max 3 words: "impressionistic, vibrant, textured"

For photographs, use "realistic" or similar.

9. context (String)

Describe the image type/purpose:

  • "High-fashion editorial photograph for magazine spread"
  • "Concept art for fantasy video game"
  • "Commercial product photography for e-commerce"

10. text_render (Array)

Default: empty array []

Only populate if user explicitly provides exact text content:

{
  "text": "Exact text from user (never placeholder)",
  "location": "center | top-left | bottom",
  "size": "small | medium | large",
  "color": "white | red | blue",
  "font": "serif typeface | sans-serif | handwritten | bold impact",
  "appearance_details": "Metallic finish | 3D effect | etc."
}

Exception: Universal text integral to objects (e.g., "STOP" on stop sign).

11. edit_instruction (String)

Single imperative command describing the edit/generation.

Edit Instruction Formats

For Standard Edits (no mask)

Start with action verb, describe changes, never reference "original image":

Category Rewritten Instruction
Style change Turn the image into the cartoon style.
Object attribute Change the dog's color to black and white.
Add element Add a wide-brimmed felt hat to the subject.
Remove object Remove the book from the subject's hands.
Replace object Change the rose to a bright yellow sunflower.
Lighting Change the lighting from dark and moody to bright and vibrant.
Composition Change the perspective to a wider shot.
Text change Change the text "Happy Anniversary" to "Hello".
Quality Refine the image to obtain increased clarity and sharpness.

For Masked Region Edits

Reference "masked regions" or "masked area" as target:

Intent Rewritten Instruction
Object generation Generate a white rose with a blue center in the masked region.
Extension Extend the image into the masked region to create a scene featuring...
Background fill Create the following background in the masked region: A vast ocean extending to horizon.
Atmospheric fill Fill the background masked area with a clear, bright blue sky with wispy clouds.
Subject restoration Restore the area in the mask with a young woman.
Environment infill Create inside the masked area: a greenhouse with rows of plants under glass ceiling.

Fidelity Rules

Standard Edit Mode

Preserve ALL visual properties unless explicitly changed by instruction:

  • Subject identity, pose, appearance
  • Object existence, location, size, orientation
  • Composition, camera angle, lens characteristics
  • Style/medium

Only change what the edit strictly requires.

Masked Edit Mode

  • Preserve all visible (non-masked) portions exactly
  • Fill grey masked regions to blend seamlessly with unmasked areas
  • Match existing style, lighting, and subject matter
  • Never describe grey masks—describe content that fills them

Example Output

{
  "short_description": "A professional businesswoman in a navy blazer stands confidently in a modern glass office, holding a tablet. Natural daylight streams through floor-to-ceiling windows, creating a warm, productive atmosphere.",
  "objects": [
    {
      "description": "A confident businesswoman in her 30s with shoulder-length dark hair, wearing a tailored navy blazer over a white blouse. She holds a tablet in her left hand while gesturing naturally with her right.",
      "location": "center-right",
      "relative_size": "large within frame",
      "shape_and_color": "Human figure, navy and white clothing",
      "texture": "smooth fabric, professional attire",
      "appearance_details": "Minimal jewelry, well-groomed professional appearance",
      "relationship": "Main subject, interacting with tablet",
      "orientation": "facing slightly left, three-quarter view",
      "pose": "Standing upright, relaxed professional stance",
      "expression": "confident, approachable smile",
      "clothing": "Tailored navy blazer, white silk blouse, dark trousers",
      "action": "Presenting or reviewing information on tablet",
      "gender": "female",
      "skin_tone_and_texture": "Medium warm skin tone, healthy smooth complexion"
    },
    {
      "description": "A modern tablet device with a bright display showing charts and graphs",
      "location": "center, held by subject",
      "relative_size": "small",
      "shape_and_color": "Rectangular, silver frame with illuminated screen",
      "texture": "smooth glass and metal",
      "appearance_details": "Thin profile, business application visible on screen",
      "relationship": "Held by businesswoman, focus of her attention",
      "orientation": "vertical, screen facing viewer at slight angle",
      "pose": null,
      "expression": null,
      "clothing": null,
      "action": null,
      "gender": null,
      "skin_tone_and_texture": null,
      "number_of_objects": null
    }
  ],
  "background_setting": "Modern corporate office interior with floor-to-ceiling windows overlooking a city skyline. Minimalist furniture in neutral tones, potted plants adding touches of green.",
  "lighting": {
    "conditions": "bright natural daylight",
    "direction": "side-lit from left through windows",
    "shadows": "soft, natural shadows"
  },
  "aesthetics": {
    "composition": "rule of thirds, medium shot",
    "color_scheme": "professional blues and neutral whites with warm accents",
    "mood_atmosphere": "confident, professional, welcoming"
  },
  "photographic_characteristics": {
    "depth_of_field": "shallow, background slightly soft",
    "focus": "sharp focus on subject's face and upper body",
    "camera_angle": "eye-level",
    "lens_focal_length": "portrait lens (85mm)"
  },
  "style_medium": "photograph",
  "artistic_style": "realistic",
  "context": "Corporate portrait photography for company website or LinkedIn professional profile.",
  "text_render": [],
  "edit_instruction": "Generate a professional businesswoman in a modern office environment holding a tablet."
}

Common Pitfalls

  1. Don't invent text - Keep text_render empty unless user provides exact text
  2. Don't over-describe - Max 5 objects, prioritize most important
  3. Match the mode - Use correct edit_instruction format for masked vs standard edits
  4. Preserve fidelity - Only change what's explicitly requested
  5. Be specific - Use concrete values ("85mm portrait lens") not vague terms ("nice camera")
  6. Null for irrelevant - Human-specific fields should be null for non-human objects

Using VGL with Bria API

Generate Image with Structured Prompt

Pass VGL JSON to the structured_prompt parameter:

from bria_client import BriaClient

client = BriaClient()

vgl_prompt = {
    "short_description": "Professional businesswoman in modern office...",
    "objects": [...],
    # ... full VGL JSON
}

# Use structured_prompt for deterministic generation
result = client.refine(
    structured_prompt=json.dumps(vgl_prompt),
    instruction="Generate this scene",
    aspect_ratio="16:9"
)
print(result['result']['image_url'])

Refine Existing Generation

After generation, Bria returns a structured_prompt you can modify and regenerate:

# Initial generation
result = client.generate("A cozy coffee shop interior")
structured = result['result']['structured_prompt']

# Modify and regenerate
result = client.refine(
    structured_prompt=structured,
    instruction="Change the lighting to golden hour"
)

curl Example

curl -X POST "https://engine.prod.bria-api.com/v2/image/generate" \
  -H "api_token: $BRIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "structured_prompt": "{\"short_description\": \"...\", ...}",
    "prompt": "Generate this scene",
    "aspect_ratio": "16:9"
  }'

References

  • Schema Reference - Complete JSON schema with all parameter values
  • bria-ai - API client and endpoint documentation for executing VGL prompts

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

其他来源收录

同一技能在不同目录的原始页面:

标签

image-gencontent-mediadesignapidocs

同类 Skill