界面已本地化;技能介绍与说明文档按所选语言由 AI 自动翻译,代码、命令、路径和专业术语保留原文,以原作者文档为准。
探索技能
效率与协作 · SKILL.md

flux-2-klein-4b-text-to-image

flux-2-klein-4b-text-to-image

【效率与协作】Flux 2 | Klein | 4B | Text to Image. Generate images from text with the enhanced 4B model including guidance and acceleration. Triggers: text to image, image generation, flux generate, ai art

独立 GitHub 快照 · 自动分类 · 以原作者文档为准

技能说明

GitHub

name: flux-2-klein-4b-text-to-image description: "Flux 2 | Klein | 4B | Text to Image. Generate images from text with the enhanced 4B model including guidance and acceleration. Triggers: text to image, image generation, flux generate, ai art" allowed-tools: Bash(curl *), WebFetch

Flux 2 | Klein | 4B | Text to Image

Generate images from text prompts using the enhanced Flux 2 Klein 4B model with classifier-free guidance and acceleration support. Balances speed and quality with configurable parameters.

Quick Start

Requires an each::labs API key. Get one at eachlabs.ai.

curl -X POST https://api.eachlabs.ai/v1/prediction \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -d '{
    "model": "flux-2-klein-4b-text-to-image",
    "version": "0.0.1",
    "input": {
      "prompt": "A steampunk airship flying over Victorian London at dusk",
      "image_size": "landscape_4_3",
      "guidance_scale": 5,
      "num_inference_steps": 4,
      "output_format": "png"
    }
  }'

Parameters

ParameterTypeDefaultDescription
accelerationstringregularThe acceleration level to use for image generation. Options: none, regular, high
enable_safety_checkerbooleantrueIf set to true, the safety checker will be enabled.
guidance_scalenumber5Guidance scale for classifier-free guidance.
image_sizestringlandscape_4_3The size of the image to generate. Options: square_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9
negative_promptstring-Negative prompt for classifier-free guidance. Describes what to avoid in the image.
num_imagesinteger1The number of images to generate.
num_inference_stepsinteger4The number of inference steps to perform.
output_formatstringpngThe format of the generated image. Options: jpeg, png, webp
promptstring-The prompt to generate an image from.
seedinteger-The seed to use for the generation. If not provided, a random seed will be used.

Examples

Fast generation with high acceleration:

curl -X POST https://api.eachlabs.ai/v1/prediction \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -d '{
    "model": "flux-2-klein-4b-text-to-image",
    "version": "0.0.1",
    "input": {
      "prompt": "A cute robot serving coffee in a diner, retro style",
      "acceleration": "high"
    }
  }'

Detailed generation with negative prompt:

curl -X POST https://api.eachlabs.ai/v1/prediction \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -d '{
    "model": "flux-2-klein-4b-text-to-image",
    "version": "0.0.1",
    "input": {
      "prompt": "Oil painting of a stormy seascape with a lighthouse, dramatic clouds",
      "negative_prompt": "blurry, flat, cartoon, text, watermark",
      "guidance_scale": 7.5,
      "num_inference_steps": 8,
      "image_size": "landscape_16_9",
      "output_format": "jpeg",
      "seed": 2024
    }
  }'

Related Models

Documentation

我的收藏