NL Diffusion Image GGUF
简介
核心亮点
- GGUF 量化格式,大幅降低显存占用与硬件要求
- 支持自然语言描述,降低 Prompt 编写门槛
- 适配 llama.cpp 等生态,实现低功耗本地推理
- Apache-2.0 协议,对商业化应用非常友好
使用方法
# 安装 Hugging Face transformers
pip install transformers torch
# 使用 transformers 加载模型
from transformers import AutoModel, AutoTokenizer
model = AutoModel.from_pretrained("realrebelai/NL-Diffusion-Image_GGUF")
tokenizer = AutoTokenizer.from_pretrained("realrebelai/NL-Diffusion-Image_GGUF")
Hugging Face 下载
我们推荐使用命令行或者 Hugging Face Hub SDK 来进行模型的下载。
操作指引:在下载前,请先通过如下命令安装 huggingface_hub:
pip install -U huggingface_hub
命令行下载
下载完整模型库
huggingface-cli download realrebelai/NL-Diffusion-Image_GGUF
下载单个文件到指定本地文件夹(以下载 config.json 到当前路径下 ./dir 目录为例)
huggingface-cli download realrebelai/NL-Diffusion-Image_GGUF config.json --local-dir ./dir
SDK 下载
# 模型下载
from huggingface_hub import snapshot_download
model_dir = snapshot_download('realrebelai/NL-Diffusion-Image_GGUF')
Git 下载
请确保 lfs 已经被正确安装
git lfs install
git clone https://huggingface.co/realrebelai/NL-Diffusion-Image_GGUF
如果您希望跳过 lfs 大文件下载,可以使用如下命令
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/realrebelai/NL-Diffusion-Image_GGUF
模型文件托管在 Hugging Face Hub,使用 HF CLI / SDK / Git 直接下载,不经过本站。
PyTorch / Transformers 使用
安装 Transformers
pip install -U transformers torch
模型加载和推理
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained('realrebelai/NL-Diffusion-Image_GGUF')
tokenizer = AutoTokenizer.from_pretrained('realrebelai/NL-Diffusion-Image_GGUF')
模型下载
我们推荐使用命令行或者 ModelScope SDK 来进行模型的下载。
操作指引:在下载前,请先通过如下命令安装 ModelScope:
pip install modelscope
命令行下载
下载完整模型库
modelscope download --model realrebelai/NL-Diffusion-Image_GGUF
下载单个文件到指定本地文件夹(以下载 README.md 到当前路径下 dir 目录为例)
modelscope download --model realrebelai/NL-Diffusion-Image_GGUF README.md --local_dir ./dir
SDK 下载
# 模型下载
from modelscope import snapshot_download
model_dir = snapshot_download('realrebelai/NL-Diffusion-Image_GGUF')
Git 下载
请确保 lfs 已经被正确安装
git lfs install
git clone https://www.modelscope.cn/realrebelai/NL-Diffusion-Image_GGUF.git
如果您希望跳过 lfs 大文件下载,可以使用如下命令
GIT_LFS_SKIP_SMUDGE=1 git clone https://www.modelscope.cn/realrebelai/NL-Diffusion-Image_GGUF.git
ModelScope 模型页直接下载模型文件;无需将模型文件放在本站服务器。
Notebook 快速开发
下载并安装 ModelScope library
pip install "modelscope[audio,cv,nlp,multi-modal,science]" -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html
模型加载和推理
from modelscope.pipelines import pipeline
from modelscope.utils.constant import Tasks
p = pipeline('text-generation', 'realrebelai/NL-Diffusion-Image_GGUF')
完整文档
---
license_name: nvidia-license
license_link: LICENSE
base_model: nvidia/NL-Diffusion-Image
tags:
- quantization
- sefi
- image-generation
---
Rebels NL-Diffusion-Image GGUFs
ComfyUI_Rebels_NLD Custom Nodes
GGUF loader + text-to-image nodes for NVIDIA NL-Diffusion-Image (masked discrete diffusion
LM + IBQ VQ decoder) on consumer hardware. By RealRebelAI.
https://github.com/RealRebelAI/ComfyUI_Rebels_NLD
NODES ARE OPERATIONAL BUT SLOW. Currently working on patches for speed ups. they will run in their current state but i recommend git pulling frequently.
Install
1. Clone into ComfyUI/custom_nodes/.
2. Requires the city96 ComfyUI-GGUF fork in the same custom_nodes/ folder (used for dequant).
3. Put the model files (dropdown-selected, no paths):
- dLM GGUF → ComfyUI/models/unet/
- vqvae (bf16 .safetensors) → ComfyUI/models/vae/
4. The config/tokenizer/modeling code ships in model_assets/
IMPORTANT!
5. model.safetensors file MUST go in "custom_nodes\ComfyUI_Rebels_NLD\model_assets\emu3_vqvae"https://huggingface.co/nvidia/NL-Diffusion-Image/blob/main/emu3_vqvae/model.safetensors
Nodes
- NL-Diffusion dLM Loader (GGUF) — pick
gguf_nameandvqvae_namefrom dropdowns, choose device.
- NL-Diffusion Text to Image — prompt, size, steps, guidance, temperature, seed → IMAGE.
Notes
- The dLM generates discrete token indices; the vqvae decoder turns them into pixels. It is not
- Vocab embeddings use row-gather dequant, so the 131k-row tensors never fully materialize.
- Vision-tower (image-understanding / edit) weights are left on meta and not needed for t2i.
License
Model is under the NVIDIA One-Way Noncommercial License (research/development only). Quants
inherit those terms — publish as license: other with the upstream terms linked.