본문으로 건너뛰기

이미지 생성

Hermes Agent는 FAL.ai를 통해 텍스트 prompt에서 이미지를 생성합니다. 기본으로 9개 모델을 지원하며, 각 모델은 속도, 품질, 비용 tradeoff가 다릅니다. 활성 모델은 hermes tools에서 사용자가 설정할 수 있고, 선택값은 config.yaml에 저장됩니다.

지원 모델

ModelSpeedStrengthsPrice
fal-ai/flux-2/klein/9b (default)<1s빠르고 선명한 text$0.006/MP
fal-ai/flux-2-pro~6sstudio photorealism$0.03/MP
fal-ai/z-image/turbo~2sbilingual EN/CN, 6B params$0.005/MP
fal-ai/nano-banana-pro~8sGemini 3 Pro, reasoning depth, text rendering$0.15/image (1K)
fal-ai/gpt-image-1.5~15sprompt adherence$0.034/image
fal-ai/gpt-image-2~20sSOTA text rendering + CJK, world-aware photorealism$0.04–0.06/image
fal-ai/ideogram/v3~5stypography에 가장 강함$0.03–0.09/image
fal-ai/recraft/v4/pro/text-to-image~8sdesign, brand system, production-ready output$0.25/image
fal-ai/qwen-image~12sLLM-based, complex text$0.02/MP

가격은 작성 시점의 FAL pricing입니다. 최신 가격은 fal.ai에서 확인하세요.

설정

Nous 구독자

유료 Nous Portal 구독이 있다면 FAL API key 없이 **Tool Gateway**를 통해 이미지 생성을 사용할 수 있습니다. 모델 선택값은 직접 FAL을 쓰는 경로와 gateway 경로 모두에서 유지됩니다.

managed gateway가 특정 모델에 대해 HTTP 4xx를 반환하면, 그 모델이 아직 portal 쪽에서 proxy되지 않았다는 뜻입니다. agent가 이를 알려 주고 해결 방법도 제시합니다. 직접 접근하려면 FAL_KEY를 설정하거나, 다른 모델을 선택하세요.

FAL API key 받기

  1. fal.ai에 가입합니다.
  2. dashboard에서 API key를 생성합니다.

모델 설정 및 선택

tools command를 실행합니다.

hermes tools

🎨 Image Generation으로 이동해 backend(Nous Subscription 또는 FAL.ai)를 고르면, picker가 지원 모델을 column-aligned table로 보여 줍니다. 화살표 키로 이동하고 Enter로 선택합니다.

  Model                          Speed    Strengths                    Price
fal-ai/flux-2/klein/9b <1s Fast, crisp text $0.006/MP ← currently in use
fal-ai/flux-2-pro ~6s Studio photorealism $0.03/MP
fal-ai/z-image/turbo ~2s Bilingual EN/CN, 6B $0.005/MP
...

선택값은 config.yaml에 저장됩니다.

image_gen:
model: fal-ai/flux-2/klein/9b
use_gateway: false # true if using Nous Subscription

GPT-Image 품질

fal-ai/gpt-image-1.5fal-ai/gpt-image-2 요청 품질은 medium에 고정되어 있습니다. 1024×1024 기준 약 $0.034–$0.06/image입니다. Nous Portal billing이 모든 사용자에게 예측 가능하도록 low / high tier는 user-facing option으로 노출하지 않습니다. tier 간 비용 차이가 3–22×까지 벌어지기 때문입니다. 더 저렴한 옵션이 필요하면 Klein 9B 또는 Z-Image Turbo를 선택하고, 더 높은 품질이 필요하면 Nano Banana Pro 또는 Recraft V4 Pro를 사용하세요.

사용법

agent-facing schema는 일부러 최소화되어 있습니다. 모델은 사용자가 설정한 값을 그대로 사용합니다.

Generate an image of a serene mountain landscape with cherry blossoms
Create a square portrait of a wise old owl — use the typography model
Make me a futuristic cityscape, landscape orientation

종횡비

agent 관점에서는 모든 모델이 같은 세 가지 aspect ratio를 받습니다. 내부에서는 각 모델의 native size spec이 자동으로 채워집니다.

Agent inputimage_size (flux/z-image/qwen/recraft/ideogram)aspect_ratio (nano-banana-pro)image_size (gpt-image-1.5)image_size (gpt-image-2)
landscapelandscape_16_916:91536x1024landscape_4_3 (1024×768)
squaresquare_hd1:11024x1024square_hd (1024×1024)
portraitportrait_16_99:161024x1536portrait_4_3 (768×1024)

GPT Image 2는 16:9가 아니라 4:3 preset으로 매핑됩니다. 최소 pixel count가 655,360이기 때문에 landscape_16_9 preset(1024×576 = 589,824)은 거부됩니다.

이 변환은 _build_fal_payload() 안에서 처리됩니다. agent code는 모델별 schema 차이를 알 필요가 없습니다.

자동 업스케일링

FAL의 Clarity Upscaler를 통한 upscaling은 model별로 제한됩니다.

ModelUpscale?이유
fal-ai/flux-2-probackward compatibility(이전 picker default였음)
그 외 전체빠른 모델은 sub-second value prop을 잃고, hi-res 모델은 upscaling이 필요 없습니다.

upscaling이 실행되면 다음 설정을 사용합니다.

SettingValue
Upscale factor
Creativity0.35
Resemblance0.6
Guidance scale4
Inference steps18

upscaling이 실패하면(network issue, rate limit 등) 원본 이미지가 자동으로 반환됩니다.

내부 동작

  1. Model resolution - _resolve_fal_model()config.yamlimage_gen.model을 읽고, 없으면 FAL_IMAGE_MODEL env var, 그다음 fal-ai/flux-2/klein/9b로 fallback합니다.
  2. Payload building - _build_fal_payload()aspect_ratio를 모델의 native format(preset enum, aspect-ratio enum, GPT literal)으로 변환하고, 모델 default params를 merge한 뒤 caller override를 적용합니다. 마지막으로 모델의 supports whitelist로 filter하여 지원하지 않는 key가 전송되지 않게 합니다.
  3. Submission - _submit_fal_request()가 직접 FAL credential 또는 managed Nous gateway를 통해 요청을 보냅니다.
  4. Upscaling - 모델 metadata에 upscale: True가 있을 때만 실행됩니다.
  5. Delivery - 최종 image URL을 agent에 반환합니다. agent는 MEDIA:&lt;url&gt; tag를 emit하고, platform adapter가 이를 native media로 변환합니다.

디버깅

debug logging을 활성화합니다.

export IMAGE_TOOLS_DEBUG=true

debug log는 call별 상세 정보(model, parameters, timing, errors)를 포함해 ./logs/image_tools_debug_&lt;session_id&gt;.json에 기록됩니다.

플랫폼별 전달

PlatformDelivery
CLIimage URL을 markdown ![](url)로 출력합니다. 클릭해서 열 수 있습니다.
Telegramprompt를 caption으로 넣은 photo message
Discordmessage에 embed
SlackSlack이 URL을 unfurl
WhatsAppmedia message
Othersplain text URL

제한 사항

  • FAL credential 필요 - 직접 FAL_KEY를 쓰거나 Nous Subscription을 사용해야 합니다.
  • Text-to-image only - 이 tool은 inpainting, img2img, editing을 지원하지 않습니다.
  • Temporary URLs - FAL이 반환하는 hosted URL은 몇 시간 또는 며칠 뒤 만료됩니다. 필요하면 로컬에 저장하세요.
  • 모델별 제약 - 일부 모델은 seed, num_inference_steps 등을 지원하지 않습니다. supports filter가 지원하지 않는 param을 조용히 제거하며, 이는 의도된 동작입니다.