Token导航 LogoToken导航TokenDH.com
latentforge (Utensils) logo
设计创作stdio官方级别未说明来源级核验

latentforge (Utensils)

MCP Server

LatentForge是一个交互式CLI工具,用于构建高质量图像数据集,支持Flux LoRA微调,通过自然语言对话实现搜索、下载、组织和标注图像。

工具数

22

提示词数

0

GitHub Stars

0

资源数

0
图像处理PythonClaude自然语言交互Claude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

utensils

提供方

utensils

最后核验

2026/5/17 20:23

运行时

Python

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

uvx latentforge

详细介绍

潜在遗忘

![Nix Flake](https://nixos.org) ![Python 3.12+](https://python.org) ![License: MIT](LICENSE) ![Claude Agent SDK](https://github.com/anthropics/claude-agent-sdk-python)

告诉代理你想要一个数据集做什么——它通过自然语言对话搜索、下载、组织、整理、消除重复、调整大小和为图像添加标题。

快速开始

直接运行(无需安装)

# With Nix
nix run github:utensils/latentforge

# With uv
uvx latentforge

安装

# With uv
uv tool install latentforge

# Run
latentforge                              # interactive — no config
latentforge --config configs/ghibli.yaml  # with a dataset config

发展

nix develop     # enters devshell with latentforge, ruff, pyright, gallery-dl, uv
latentforge     # run the agent
nix fmt         # format nix + python files

运作原理

latentforge → launches an interactive Claude agent
  → 22 custom MCP tools for image operations
  → Built-in vision to examine images
  → You chat to guide: "build me a dataset for X", "curate the logos", etc.

示例会话

> I want a dataset for Studio Ghibli art styles

  [tool: create_config]
  Created config: configs/ghibli.yaml with 5 categories

> Search for movie poster art and download them

  [tool: search_bing]
  Found 18 image URLs for 'Studio Ghibli movie poster art'
  [tool: download_images]
  Download complete: 15 saved, 2 skipped (dup), 1 failed

> Find duplicates and show me quality stats

  [tool: find_duplicates]
  Found 2 duplicate pairs (threshold=8)
  [tool: analyze_quality]
  Total: 15 images, avg 1340x1020, 12 at 1024+

工具

整个数据集工作流程中有22个自定义MCP工具:

类别工具
配置create_config, read_config, update_config, list_configs
搜索search_bing, search_wikimedia
下载download_images (MD5去噪), download_gallery (画廊dl,80多个网站)
浏览list_images, get_image_info
组织move_images, organize_images
质量analyze_quality, find_duplicates, detect_screenshots
裁剪crop_center, crop_smart, crop_faces
面孔detect_faces
训练resize_images, write_caption
出口export_dataset (ai工具包格式)

该代理还具有内置 Read (具有观看图像的视觉), Write,以及 Bash 工具。

斜杠命令

在会话期间键入以下内容:

命令描述
/help显示可用命令
/config显示活动数据集配置
/tools列出所有代理工具
/cost显示会话成本
/status会话状态和上下文使用情况
/model 切换克劳德模型(分叉会话)
/export [path]将数据集导出为ai工具包格式
/compact紧凑的背景(总结+新会议)
/quit退出

数据集配置

每个数据集都是一个YAML文件 configs/。代理可以为您创建这些,或者您可以手写它们:

name: ghibli
subject: "Studio Ghibli"
trigger_word: "ghibli_style"
output_dir: ./datasets/ghibli
search_queries:
  posters:
    - "Studio Ghibli movie poster art"
    - "Spirited Away poster"
  backgrounds:
    - "Studio Ghibli background art landscape"
categories:
  posters: "Movie poster art"
  backgrounds: "Background paintings and landscapes"
curation:
  target_count: "50-150"
  min_resolution: 512
  training_resolution: 1024

数据集结构

数据集存储在 datasets// 带有类别子目录:

datasets/
└── ghibli/
    ├── posters/
    │   ├── studio_ghibli_movie_poster_a1b2c3d4e5f6.jpg
    │   ├── studio_ghibli_movie_poster_a1b2c3d4e5f6.txt
    │   └── ...
    └── backgrounds/
        ├── ghibli_background_art_7g8h9i0j1k2l.png
        └── ...

图像遵循命名模式 {query_prefix}_{md5_hash}.{ext} --MD5哈希确保了跨运行的重复数据消除。

工作流程

  1. 配置 --创建一个YAML配置(或要求代理创建一个)
  2. 收集 --搜索Bing/维基媒体并使用MD5去重下载
  3. 组织 --使用文件名前缀按类别自动排序
  4. 策划 --Agent查看图像并帮助拒绝低质量的图像
  5. 去重 --感知哈希检测发现近似重复项
  6. 调整大小 --批量调整到训练分辨率(默认1024x1024)
  7. 字幕 --写 .txt 每张图片旁边都有带触发词的标题
  8. 出口 --使用自动生成的训练配置导出为ai工具包格式

认证

设置以下选项之一:

  • ANTHROPIC_API_KEY -无烟煤API键
  • CLAUDE_CODE_OAUTH_TOKEN -OAuth令牌(当不存在API密钥时使用)

许可证

麻省理工学院

目录标签

目录标签

图像处理PythonClaude自然语言交互图像数据集本地部署LoRA微调AI训练

支持客户端

Claude

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

oauth

运行时(runtime,运行环境)

Python

工具数量(toolCount,工具数)

22

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdiooauth部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP