NL Diffusion Image GGUF

提供商realrebelai
分类image-generation
许可证Apache-2.0
下载量25
星标0

简介

NL Diffusion Image GGUF 是一个经过量化处理的图像生成模型,旨在降低运行 AI 绘画的硬件门槛。它采用了 GGUF 格式,这意味着开发者和爱好者可以使用 llama.cpp 等轻量化推理框架,在消费级显卡甚至 CPU 上尝试运行,而无需依赖昂贵的 A100 集群。该模型主打自然语言理解,用户可以用更口语化的描述来引导出图,而非死磕复杂的 Prompt 咒语。对于习惯使用 Stable Diffusion 但苦于显存不足,或希望在本地快速部署图像生成能力的开发者来说,这是一个极具性价比的轻量化选择。

核心亮点

  • GGUF 量化格式,大幅降低显存占用与硬件要求
  • 支持自然语言描述,降低 Prompt 编写门槛
  • 适配 llama.cpp 等生态,实现低功耗本地推理
  • Apache-2.0 协议,对商业化应用非常友好

使用方法

安装依赖
# 安装 Hugging Face transformers
pip install transformers torch
SDK 使用
# 使用 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 目录为例)

下载单个文件到指定本地文件夹(以下载 config.json 到当前路径下 ./dir 目录为例)
huggingface-cli download realrebelai/NL-Diffusion-Image_GGUF config.json --local-dir ./dir

更多命令行下载选项,可参见官方文档

SDK 下载

SDK 下载
# 模型下载
from huggingface_hub import snapshot_download
model_dir = snapshot_download('realrebelai/NL-Diffusion-Image_GGUF')

Git 下载

请确保 lfs 已经被正确安装

Git 下载
git lfs install
git clone https://huggingface.co/realrebelai/NL-Diffusion-Image_GGUF

如果您希望跳过 lfs 大文件下载,可以使用如下命令

跳过 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

安装 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 目录为例)

下载单个文件到指定本地文件夹(以下载 README.md 到当前路径下 dir 目录为例)
modelscope download --model realrebelai/NL-Diffusion-Image_GGUF README.md --local_dir ./dir

更多更丰富的命令行下载选项,可参见具体文档

SDK 下载

SDK 下载
# 模型下载
from modelscope import snapshot_download
model_dir = snapshot_download('realrebelai/NL-Diffusion-Image_GGUF')

Git 下载

请确保 lfs 已经被正确安装

Git 下载
git lfs install
git clone https://www.modelscope.cn/realrebelai/NL-Diffusion-Image_GGUF.git

如果您希望跳过 lfs 大文件下载,可以使用如下命令

跳过 LFS
GIT_LFS_SKIP_SMUDGE=1 git clone https://www.modelscope.cn/realrebelai/NL-Diffusion-Image_GGUF.git

ModelScope 模型页直接下载模型文件;无需将模型文件放在本站服务器。

Notebook 快速开发

下载并安装 ModelScope library

下载并安装 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')

完整文档

来源: HuggingFace

---
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 GGUFComfyUI/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_name and vqvae_name from 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
a latent VAE — it loads through this pack, not ComfyUI's VAELoader.
  • 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.