ComfyUI-sampler-lcm-alternative 项目使用教程
1. 项目目录结构及介绍
ComfyUI-sampler-lcm-alternative/
├── LICENSE
├── README.md
├── __init__.py
├── pyproject.toml
├── sampler_lcm_alt.py
├── SamplerLCMCycle-workflow.png
├── SamplerLCMDualNoise-1.png
├── SamplerLCMDualNoise-workflow.png
└── github/
└── workflows/
└── gitignore
目录结构说明
- LICENSE: 项目的开源许可证文件,本项目使用 GPL-3.0 许可证。
- README.md: 项目的说明文档,包含项目的简介、安装方法、使用说明等。
- init.py: Python 包的初始化文件。
- pyproject.toml: Python 项目的配置文件,定义了项目的依赖和构建工具。
- sampler_lcm_alt.py: 项目的主要代码文件,包含了新的 LCM 采样器节点。
- SamplerLCMCycle-workflow.png: 示例工作流图,展示了如何使用 SamplerLCMCycle 节点。
- SamplerLCMDualNoise-1.png: 示例生成图像,展示了使用 SamplerLCMDualNoise 节点生成的图像。
- SamplerLCMDualNoise-workflow.png: 示例工作流图,展示了如何使用 SamplerLCMDualNoise 节点。
- github/workflows/gitignore: GitHub Actions 的工作流配置文件。
2. 项目的启动文件介绍
项目的主要启动文件是 sampler_lcm_alt.py
。该文件包含了新的 LCM 采样器节点,用户可以通过该文件启动并使用这些新的采样器节点。
启动步骤
-
克隆项目到本地:
git clone https://github.com/jojkaart/ComfyUI-sampler-lcm-alternative.git
-
进入项目目录:
cd ComfyUI-sampler-lcm-alternative
-
启动 ComfyUI 并加载自定义节点:
- 将项目目录中的
sampler_lcm_alt.py
文件复制到 ComfyUI 的custom_nodes
目录中。 - 重启 ComfyUI,新的 LCM 采样器节点将会自动加载。
- 将项目目录中的
3. 项目的配置文件介绍
项目的配置文件主要是 pyproject.toml
,该文件定义了项目的依赖和构建工具。
pyproject.toml 文件内容
[tool.poetry]
name = "ComfyUI-sampler-lcm-alternative"
version = "0.1.0"
description = "ComfyUI Custom Sampler nodes that add a new improved LCM sampler functions"
authors = ["Your Name <your.email@example.com>"]
license = "GPL-3.0"
[tool.poetry.dependencies]
python = "^3.8"
comfyui = "^1.0.0"
[tool.poetry.dev-dependencies]
pytest = "^6.2.5"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
配置文件说明
- [tool.poetry]: 定义了项目的元数据,如项目名称、版本、描述、作者和许可证。
- [tool.poetry.dependencies]: 定义了项目的依赖包,如 Python 版本和 ComfyUI 版本。
- [tool.poetry.dev-dependencies]: 定义了开发依赖包,如 pytest 用于测试。
- [build-system]: 定义了构建系统的要求和后端。
通过以上配置文件,用户可以了解项目的依赖关系和构建要求,从而更好地进行项目的安装和使用。
创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考