StepFun image generation backend for Hermes Agent (step-image-edit-2, step-2x-large, step-1x-medium).
Project description
Hermes StepFun ImageGen
StepFun image generation backend for Hermes Agent.
Supports StepFun's image models:
step-image-edit-2— recommended, fast text-to-image + image editing (1-2s)step-2x-large— high-quality text-to-image / image-to-imagestep-1x-medium— balanced quality and speed
Installation
From PyPI (once published)
pip install hermes-stepfun-imagegen
From source
git clone https://github.com/lora-sys/hermes-stepfun-imagegen.git
cd hermes-stepfun-imagegen
pip install -e .
Manual install
Copy the plugin directory to your Hermes plugins folder:
cp -r src/hermes_stepfun_imagegen ~/.hermes/plugins/image_gen/stepfun
Configuration
1. Set your StepFun API key
Add to ~/.hermes/.env:
STEPFUN_API_KEY=your-stepfun-api-key
Or export it in your shell:
export STEPFUN_API_KEY=your-stepfun-api-key
2. Enable the plugin
Add to ~/.hermes/config.yaml:
plugins:
enabled:
- image_gen/stepfun
image_gen:
provider: stepfun
model: step-image-edit-2 # optional, defaults to step-image-edit-2
3. Restart Hermes
hermes gateway restart
Or restart the Hermes desktop app.
Usage
Once configured, the Hermes model can call image_generate directly:
Text-to-image:
生成一张赛博朋克风格的龙
Image editing:
把这张图换成水墨画风格
(with an image URL or file)
Image-to-image:
把这张照片转成梵高风格
Model Selection
Change the default model in config.yaml:
image_gen:
provider: stepfun
model: step-2x-large # or step-1x-medium
Available models:
| Model | Speed | Best for |
|---|---|---|
step-image-edit-2 |
~1-2s | Fast iteration, text-to-image + editing |
step-2x-large |
~10-20s | High quality, image-to-image |
step-1x-medium |
~10-20s | Balanced quality and speed |
API Reference
- StepFun 开放平台: https://platform.stepfun.com
- API 文档: https://platform.stepfun.com/docs/zh/api-reference/images/image
Development
# Install in editable mode
pip install -e .
# Run tests
python -m pytest tests/
# Build package
python -m build
License
MIT
Author
lora-sys
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hermes_stepfun_imagegen-0.1.0.tar.gz.
File metadata
- Download URL: hermes_stepfun_imagegen-0.1.0.tar.gz
- Upload date:
- Size: 8.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
886d5f4938d1b356048865efe101762f32c0954a80d5b70f1f358e114d98529a
|
|
| MD5 |
4d212fa348b1623d1ec78fdac4341941
|
|
| BLAKE2b-256 |
ae5d2321ed1d7febf4dd7dfaf38911d5c9ba8a84ac828aac77197ce71b46c698
|
File details
Details for the file hermes_stepfun_imagegen-0.1.0-py3-none-any.whl.
File metadata
- Download URL: hermes_stepfun_imagegen-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ba5013588ac8faab2512a5fe396aaac346dd60371dcfd7a4604699d92729c57
|
|
| MD5 |
1e44e8b68f8ebdb0ce8aa754c6e6a69f
|
|
| BLAKE2b-256 |
8971dcd62b7d768eedcb6ac6ac993e3ab0bcd95a88f10f840093a175e7d67ee4
|