ComfyUI 的批量 LoRA 强度测试器和对比画廊
概览
一个用于系统性测试多个提示和强度值的 LoRA 模型的工具包,使用本地 ComfyUI 服务器。包含批处理生成脚本和基于浏览器的图库,用于比较结果。 它通过内置的 comfy_local 技能设计了 Claude Code,但 Python 脚本和画廊工作也可以独立运行。 - ComfyUI本地运行于8188端口 - 已安装模型文件:- z_image_turbo_bf16.safetensors(扩散模型)- qwen_3_4b.safetensors(CLIP文本编码器)- ae.safetensors(VAE)- Python 3.8+(无pip依赖——仅使用stdlib) 编辑lora_test.py顶部以设置提示和默认LoRA: 在浏览器中打开gallery.html,点击选择从projects/中生成的项目文件夹。 不需要服务器——它完全通过浏览器通过本地文件访问运行。 脚本通过 Z-Image Turbo 流水线,每个(提示符、强度)组合提交一个 ComfyUI 任务。
概述(AI 翻译)
一个用于系统性测试多个提示和强度值的 LoRA 模型的工具包,使用本地 ComfyUI 服务器。包含批处理生成脚本和基于浏览器的图库,用于比较结果。
它通过内置的 comfy_local 技能构建,使用 Claude Code,但 Python 脚本和画廊也可以独立运行。
盒子里有什么
| 文件 | 它的作用 |
|---|---|
lora_test.py |
通过ComfyUI API |
gallery.html |
单文件浏览器应用,用于浏览、比较和导出结果 |
.claude/skills/comfy_local/skill.md |
Claude Code 技能,用于无头 ComfyUI 交互(文本与图像、图像到视频、LoRA 测试) |
先修条件
- ComfyUI,本地运行于8188端口
- Z-Image Turbo 模型文件安装:
z_image_turbo_bf16.safetensors(扩散模型)qwen_3_4b.safetensors(CLIP文本编码器)ae.safetensors(VAE)- Python 3.8+(无 pip 依赖——仅使用 stdlib)
快速启动
1.配置你的测试
编辑lora_test.py顶部以设置提示和默认LoRA:
2.做测试
3.浏览结果
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
LoRA Tester
A toolkit for systematically testing LoRA models across multiple prompts and strength values using a local ComfyUI server. Includes a batch generation script and a browser-based gallery for comparing results.
Built to work with Claude Code via the included comfy_local skill, but the Python script and gallery work standalone too.
What’s in the box
| File | What it does |
|---|---|
lora_test.py |
Batch-generates images across a matrix of prompts and LoRA strengths via the ComfyUI API |
gallery.html |
Single-file browser app for browsing, comparing, and exporting results |
.claude/skills/comfy_local/skill.md |
Claude Code skill for headless ComfyUI interaction (text-to-image, image-to-video, LoRA testing) |
Prerequisites
- ComfyUI running locally on port 8188
- Z-Image Turbo model files installed:
z_image_turbo_bf16.safetensors(diffusion model)qwen_3_4b.safetensors(CLIP text encoder)ae.safetensors(VAE)
- Python 3.8+ (no pip dependencies – uses only stdlib)
Quick Start
1. Configure your test
Edit the top of lora_test.py to set your prompts and default LoRA:
LORA = "z_image_turbo\\my-lora.safetensors"
PROMPTS = [
"a wizard casting a spell",
"a sunset over mountains",
"a cat sitting on a windowsill",
]
STRENGTHS = [0.0, 0.25, 0.5, 0.75, 1.0]
2. Run the test
# Use defaults from the script config:
python lora_test.py
# Or override via CLI:
python lora_test.py --lora "z_image_turbo\\my-lora.safetensors" --strengths "0,0.5,1.0" --name "my lora test"
# List available LoRAs on your ComfyUI server:
python lora_test.py --list-loras
3. Browse results
Open gallery.html in your browser and click Open Project to select the generated project folder from projects/.
No server needed – it runs entirely in the browser using local file access.
CLI Options
python lora_test.py [options]
--lora FILENAME LoRA file path (e.g. "z_image_turbo\\my-lora.safetensors")
--strengths LIST Comma-separated strength values (e.g. "0,0.25,0.5,0.75,1.0")
--name NAME Project name (defaults to LoRA filename slug)
--notes TEXT Optional notes saved to the manifest
--list-loras List all available LoRAs on the ComfyUI server and exit
How it works
The script submits one ComfyUI job per (prompt, strength) combination using the Z-Image Turbo pipeline. All jobs are queued at once and processed sequentially by ComfyUI (~2 seconds per image on an RTX 5090).
- Strength 0.00 generates a baseline image with no LoRA applied (the LoraLoader node is skipped entirely)
- The same seed is used per prompt across all strengths, so you get an apples-to-apples comparison of just the LoRA’s effect
Each run creates a self-contained project folder:
projects/
推荐工具
换一个关键词,或者移除筛选条件。
安装
npx skillfish add purzbeats/lora_tester