1 Star 0 Fork 0

comfyui_custom_nodes/ComfyUI-ExLlama-Nodes

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

ComfyUI ExLlamaV2 Nodes

A simple local text generator for ComfyUI using ExLlamaV2.

Installation

Clone the repository to custom_nodes and install the requirements:

git clone https://github.com/Zuellni/ComfyUI-ExLlama-Nodes custom_nodes/ComfyUI-ExLlamaV2-Nodes
pip install -r custom_nodes/ComfyUI-ExLlamaV2-Nodes/requirements.txt

Use wheels for ExLlamaV2 and FlashAttention on Windows:

pip install exllamav2-X.X.X+cuXXX.torch2.X.X-cp3XX-cp3XX-win_amd64.whl
pip install flash_attn-X.X.X+cuXXX.torch2.X.X-cp3XX-cp3XX-win_amd64.whl

Usage

Only EXL2, 4-bit GPTQ and unquantized models are supported. You can find them on Hugging Face.

To use a model with the nodes, you should clone its repository with git or manually download all the files and place them in models/llm. For example, if you want to download the 6-bit Llama-3-8B-Instruct, use the following command:

git install lfs
git clone https://huggingface.co/turboderp/Llama-3-8B-Instruct-exl2 -b 6.0bpw models/llm/Llama-3-8B-Instruct-exl2-6.0bpw

[!TIP] You can add your own llm path to the extra_model_paths.yaml file and put the models there instead.

Nodes

Loader Loads models from the llm directory.
cache_bits A lower value reduces VRAM usage, but also affects generation speed and quality.
fast_tensors Enabling reduces RAM usage and speeds up model loading.
flash_attention Enabling reduces VRAM usage, not supported on cards with compute capability below 8.0.
max_seq_len Max context, higher value equals higher VRAM usage. 0 will default to model config.
Generator Generates text based on the given prompt. Refer to SillyTavern for sampler parameters.
unload Unloads the model after each generation to reduce VRAM usage.
stop_conditions List of strings to stop generation on, e.g. ["\n"] to stop on newline. Leave empty to only stop on eos token.
max_tokens Max new tokens, 0 will use available context.
Previewer Displays generated text in the UI.
Replacer Replaces variable names in brackets, e.g. [a], with their values.

Workflow

An example workflow is embedded in the image below and can be opened in ComfyUI.

workflow

MIT License Copyright (c) 2023 Zuellni Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

暂无描述 展开 收起
Python 等 2 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/comfyui_custom_nodes/ComfyUI-ExLlama-Nodes.git
git@gitee.com:comfyui_custom_nodes/ComfyUI-ExLlama-Nodes.git
comfyui_custom_nodes
ComfyUI-ExLlama-Nodes
ComfyUI-ExLlama-Nodes
main

搜索帮助