Ollama 新增 Z-Image Turbo 與 FLUX.2 Klein 實驗性圖像生成功能
TL;DR
Ollama 已在 macOS 上發布實驗性圖像生成支援,提供兩種模型——Z-Image Turbo(6B 參數,寫實且具備雙語能力)與 FLUX.2 Klein(4B/9B 參數,強大的文字渲染能力)——讓使用者可以直接從終端機生成並預覽圖像。
macOS 即時可用
Ollama 的新 run 指令會建立圖像並將其儲存至目前的作業目錄。具備內嵌圖像支援的終端機(例如 Ghostty, iTerm2)可以立即顯示結果。Windows 與 Linux 的支援將於未來版本中發布。
ollama run x/z-image-turbo "your prompt"
Z-Image Turbo 模型
來源: Alibaba 的 Tongyi Lab 大小: 6B 參數 授權: Apache 2.0(開放權重,允許商業用途)
- 寫實輸出: 擅長寫實照片、肖像與場景。
- 雙語文字渲染: 能在圖像中準確繪製英文與中文字符。
範例提示詞與結果
- 寫實肖像:"Young woman in a cozy coffee shop, natural window lighting, wearing a cream knit sweater, holding a ceramic mug, soft bokeh background…"
- 中文書法:"Traditional Chinese calligraphy brush painting style, the characters "山高水長" written in elegant black ink on rice paper…"
- 創意構圖:"Surreal double exposure portrait, woman's silhouette filled with blooming cherry blossom trees…"
所有範例皆在部落格文章中以內嵌方式呈現,並可使用 ollama run x/z-image-turbo 指令搭配相同的提示詞來重現。
FLUX.2 Klein 模型
來源: Black Forest Labs 大小: 4B (Apache 2.0) 與 9B (FLUX Non-Commercial License v2.1) 核心優勢: 在生成的圖像中提供可靠且可讀的文字,對於 UI 模擬圖與排版設計非常有用。
範例提示詞與結果
- 文字渲染:"A neon sign reading "OPEN 24 HOURS" in a rainy city alley at night, reflections on wet pavement."
- 產品攝影:"Matte black coffee tumbler on wooden desk, morning sunlight casting long shadows, steam rising, commercial product shot."
這兩個提示詞都展示了模型在複雜場景中置入清晰、易讀文字的能力。
設定選項
Ollama 提供終端機指令來微調生成過程:
- 圖像位置: 圖像會寫入目前的目錄;請在執行前切換目錄以儲存至其他位置。
- 圖像尺寸: 使用
/set width與/set height來調整維度;較小的尺寸生成速度較快且消耗較少的記憶體。 - 步數 (Number of steps): 控制迭代次數;較少的步數可加快生成速度但會犧牲細節,而過多的步數可能會產生偽影。
- 隨機種子 (Random seed): 設定種子可獲得可重現的輸出,有助於迭代設計工作。
- 負面提示詞 (Negative prompts): 指定不想要的元素,以引導模型避開它們。
以上顯示的所有圖像與提示詞皆直接取自 Ollama 官方部落格文章,日期為 2026-01-20。
Sources
- OriginalImage generation (experimental)
相關
- Dispatch
- Dispatch
- Dispatch
- Dispatch
- 專案