A lot of people think running text-to-image locally is just downloading a 4GB GGUF and calling it a day. Then you actually try it and find out it needs three files, and the biggest one is 9.35 GB and won't compress down. I got it running on Ubuntu 26.04 (WSL2) with an RTX 3050 Laptop (4GB VRAM), and a 1024×1024 image takes about 5 minutes. Below is the full zero-to-image process, plus the 13 pitfalls that stopped me in my tracks.
01 It's not a single model file
First, let's be clear about what we're dealing with. Qwen-Image 2.1 is the image model Alibaba's Qwen team open-sourced on September 20. Text-to-image and image editing share the same weights; the visual generation part is a 7B-parameter, 32-layer single-stream DiT, while text and conditioning images are encoded by Qwen3-VL-8B. It natively supports transparent RGBA output, up to 10 reference images, and 2K resolution. The license isn't the old Apache 2.0 but the Qwen Research License, which only covers research and personal use.
For local deployment, the key is its structure. It consists of three files, and you need all of them:
-
qwen-image-2.1-UC-Q4_0.gguf(4.15 GB): the main DiT model, the actual "artist"; 4-bit quantized, goes into VRAM
-
qwen3vl_8b_int8_convrot.safetensors(9.35 GB): text encoder, turns prompts into semantic vectors, lives in system RAM
-
qwen_image_2.1_vae_bf16.safetensors(0.68 GB): VAE, encodes/decodes between latent space and pixels, goes into VRAM
GGUF quantization only compresses the main model. There's no GGUF version of the 8B text encoder, so it has to be stored whole: bf16 is 17.5 GB, int8 is 9.35 GB.
So "running images on 4GB of VRAM" really means the main model runs in 4GB VRAM + the encoder sits in 9GB of system RAM. Once that clicks, you don't have to memorize all the later parameters.
02 Check your driver before installing
Three commands tell you what you're working with:
nvidia-smi # 记下 Driver Version 和 CUDA Version
free -h # 文本编码器要放内存,建议 >=16GB
df -h / # 三个模型 + torch + CUDA 库,约 30GB
The driver version determines which torch you can use. Get this wrong and everything after is wasted effort:
-
Driver ≥ 580: can use cu130 / cu129
-
Driver ≥ 525 and < 580: only cu128. In this guide's case, driver 572.60
-
Lower: have to fall back to an older version like cu121
My machine is on 572.60, so it's in the second bucket.
03 The fastest way to download the three files
Install the basic tools first:
sudo apt update
sudo apt install -y
git git-lfs curl aria2
git lfs install
curl -LsSf https://astral.sh/uv/install.sh | sh
export PATH="$HOME/.local/bin:$PATH"
uv is used to pull in a standalone Python. Ubuntu 26.04 ships /usr/bin/python3 as 3.14, and PyTorch has no wheel for it at all—install directly and it's guaranteed to fail. Use uv to pull a separate 3.12 so you don't pollute the system:
uv venv --python 3.12 venv
Then downloads. This deserves its own section: using hf download directly, or git clone followed by git lfs pull, only gets you 0.5–3 MB/s. Switch to aria2c with 16 threads and the same source can hit 25–30 MB/s.
export HF_ENDPOINT=https://hf-mirror.com
mkdir -p /root/qwen_models/{text_encoders,vae}
BASE="https://hf-mirror.com/abenzerps/Qwen-Image-2.1-Uncensored-Quantized/resolve/main"
aria2c -x16 -s16 -k5M -c --file-allocation=none \
-d /root/qwen_models -o
qwen-image-2.1-UC-Q4_0.gguf \
"$BASE/qwen-image-2.1-UC-Q4_0.gguf"
aria2c -x16 -s16 -k5M -c --file-allocation=none \
-d /root/qwen_models/text_encoders -o qwen3vl_8b_int8_convrot.safetensors\
"$BASE/text_encoders/qwen3vl_8b_int8_convrot.safetensors"
aria2c -x16 -s16 -k5M -c --file-allocation=none \ -d /root/qwen_models/vae -o qwen_image_2.1_vae_bf16.safetensors \
"$BASE/vae/qwen_image_2.1_vae_bf16.safetensors"
Use a separate command for each file; don't combine them. aria2's -o only applies to the single URI that follows it. If you cram three files into one command and interleave them, the download sizes get mismatched—the gguf will be downloaded at the encoder's size.
After downloading, verify the byte counts. Get the authoritative values from the repo's HTTP headers:
cd /root/qwen_models
for f in qwen-image-2.1-UC-Q4_0.gguf \
text_encoders/qwen3vl_8b_int8_convrot.safetensors \
vae/qwen_image_2.1_vae_bf16.safetensors; do
echo -n "$f -> "; curl -sIL "$BASE/$f" | grep -i content-length | tail -1
done
sha256sum qwen-image-2.1-UC-Q4_0.gguf \
text_encoders/qwen3vl_8b_int8_convrot.safetensors \
vae/qwen_image_2.1_vae_bf16.safetensors
Expected: 4,151,573,280 / 9,350,798,360 / 675,509,688 bytes.
The
.ggufand.safetensorsfiles in the repo are stored via Git LFS. If yougit clone, the files are just 135-byte pointers by default; withoutgit lfs pull, they're empty shells. The direct resolve links above let you skip that layer entirely.
04 The hardest step is pinning torch to cu128
This is the most failure-prone section in the whole guide—four pitfalls chained together.
First, pip install torch gives you a CUDA 13 build by default. CUDA 13 requires driver 580+, and my machine is on 572.60. Install it and torch.cuda.is_available() returns False, or initialization just errors out.
Second, torch in the cu128 index only goes up to 2.11.0. Newer versions are only published for cu129 / cu130, so there's no "newer torch with an older driver" path.
Third, if you also add the Tsinghua mirror as --extra-index-url when installing with uv, uv's default first-index strategy will prefer the default CUDA 13 build on the Tsinghua mirror, silently replacing the version tagged +cu128. Pin the version explicitly and add --index-strategy unsafe-best-match.
Fourth, when you later install ComfyUI's requirements.txt, the torch entry has no version constraint, so it gets resolved again and will swap your cu128 for cu13 just the same. Either strip it out beforehand or catch it with a constraints file.
Here's how to do it:
cd /root/ComfyUI && uv venv --python 3.12 venv
export VIRTUAL_ENV=/root/ComfyUI/venv
export UV_HTTP_TIMEOUT=180
printf'torch==2.11.0+cu128\ntorchvision==0.26.0+cu128\n' >
/tmp/torch_constraints.txt
# 只解析、不下载,先看它到底要拉什么
uv pip install --dry-
run "torch==2.11.0+cu128""torchvision==0.26.0+cu128" \
--index-url https://download.pytorch.org/whl/cu128 \
--extra-index-url https://pypi.tuna.tsinghua.edu.cn/simple \
--index-strategy unsafe-best-match
The output shows the full dependency list. On my machine it resolved to cuda-toolkit==12.8.1, nvidia-cudnn-cu12==9.19.0.56, nvidia-cublas-cu12==12.8.4.1, nvidia-cusparse-cu12==12.5.8.93, nvidia-nccl-cu12==2.28.9, triton==3.6.0—32 packages total.
If your network is decent, you can skip the next part. But pypi.nvidia.com often times out in mainland China, so the safer approach is to download all the wheels with aria2 first, then install offline locally:
# 把 dry-run 解析出的每个包,抓精确 wheel 链接写进 /root/wheel_urls.txt
aria2c -i /root/wheel_urls.txt -x16 -s16 -k5M -j8 --file-
allocation=none -d /root/wheels
uv pip install --no-index --find-links /root/wheels \
"torch==2.11.0+cu128""torchvision==0.26.0+cu128"
# 验证务必用 venv 的绝对路径
/root/ComfyUI/venv/bin/python -c \
"import torch;print(torch.__version__, torch.cuda.is_available(), torch.cuda.get_device_name(0))"
Expected output: 2.11.0+cu128 True NVIDIA GeForce RTX 3050 Laptop GPU.
Don't use bare python or bare pip. In WSL, PATH often includes a Windows-side shim, so typing python drops you into /mnt/c/.../pyenv-win/shims/python and throws /bin/sh^M: bad interpreter. Use the venv's absolute paths throughout.
05 ComfyUI and the GGUF node
cd /root
git clone https://github.com/comfyanonymous/ComfyUI.git
cd ComfyUI
# 装依赖时把 torch / torchvision 剔掉,防止被换回 cu13
grep -vE '^torch$|^torchvision$' requirements.txt > /tmp/req_notorch.txt
export VIRTUAL_ENV=/root/ComfyUI/venv
uv pip install -r /tmp/req_notorch.txt --extra-index-url https://pypi.tuna.tsinghua.edu.cn/simple
# GGUF 加载节点
cd custom_nodes
git clone https://github.com/leejet/ComfyUI-GGUF.git
cd ..
uv pip install gguf sentencepiece protobuf
There's a fork trap with the GGUF node. The well-known city96/ComfyUI-GGUF last commit was in January this year, and the repo has no architecture template for Qwen-Image 2.1, so loading it throws Unknown model architecture!. leejet's fork added the missing template on September 20, and the September 21 commit added qwen_image21 to the recognized architecture list. You must use leejet's version.
After installing, double-check that torch hasn't been touched:
/root/ComfyUI/venv/bin/python -c "import torch;print(torch.__version__)"
Put the models in place:
cd /root/ComfyUI/models
mv /root/qwen_models/qwen-image-2.1-UC-Q4_0.gguf diffusion_models/
mv /root/qwen_models/text_encoders/qwen3vl_8b_int8_convrot.safetensors text_encoders/
mv /root/qwen_models/vae/qwen_image_2.1_vae_bf16.safetensors vae/
Start it:
cd /root/ComfyUI
./venv/bin/python main.py --lowvram --listen 0.0.0.0 --port 8188
With 4GB VRAM, --lowvram is mandatory, and don't push resolution past 1024×1024.
06 Get the first image out
Open http://localhost:8188 in your browser and wire up the nodes with these parameters:
-
Unet Loader (GGUF)choose
qwen-image-2.1-UC-Q4_0.gguf -
CLIPLoaderchoose
qwen3vl_8b_int8_convrot.safetensors, set type toqwen_image, change device tocpu -
VAELoaderchoose
qwen_image_2.1_vae_bf16.safetensors -
EmptySD3LatentImageset 1024×1024
-
ModelSamplingAuraFlowset shift to 3.1
-
KSampleruse
euler/simple, steps=20, cfg=4
Two things matter most. CLIPLoader's type must be qwen_image, because the text encoder is Qwen3-VL-8B and internally follows the qwen_image21 path; pick the wrong one and you get an architecture error.
The other is device. Set CLIPLoader's device to cpu so the 9.35 GB encoder goes into system RAM. It's only used once per image, so it barely affects generation speed, but it saves nearly 9GB of VRAM. That's the trick that makes a 4GB card work.
Verify the service and model are ready:
curl -s http://127.0.0.1:8188/object_info/UnetLoaderGGUF | head -c 100
curl -s http://127.0.0.1:8188/object_info/UnetLoaderGGUF \
| python3 -c "import sys,json;print(json.load(sys.stdin)['UnetLoaderGGUF']['input']['required']['unet_name'][0])"
On a normal startup, these lines show up in the log:
Total VRAM 4096 MB ... Set vram stateto: LOW_VRAM
Device: cuda:0 NVIDIA GeForce RTX 3050 Laptop GPU
CLIP/text encoder model load device: cpu ...
Requested toload QwenImage21
loaded partially; 2072 MB usable, 1990 MB loaded, 2097 MB offloaded
Prompt executed in304.66 seconds
The loaded partially line is normal paging under lowvram, not an error. Output images land in /root/ComfyUI/output/.
07 Pitfall quick reference
| # | Symptom | Root cause | Fix |
|---|---|---|---|
| 1 | pip can't install torch | System Python 3.14 is too new; no wheel | uv venv --python 3.12 |
| 2 | Model downloads are painfully slow | hf / pip downloaders only do 0.5–3 MB/s | aria2c -x16 -s16 |
| 3 | Downloaded file sizes are wrong | Multiple -o flags in one command |
One command per file |
| 4 | gguf is only 135 bytes | Git LFS pointer wasn't pulled | Use resolve direct links, or git lfs pull |
| 5 | cuda: False |
or it just errors out | torch installed as CUDA 13, driver only supports 12.8 |
| 6 | torch gets silently swapped | uv's first-index strategy |
Pin the version + --index-strategy unsafe-best-match |
| 7 | nvidia dependency downloads time out | pypi.nvidia.com |
unstable |
| 8 | python |
throws bad interpreter | Hits the Windows pyenv shim in WSL |
| 9 | Unknown model architecture! |
GGUF node is the city96 version | Switch to leejet/ComfyUI-GGUF |
| 10 | OOM or broken output | 4GB VRAM can't handle default parameters | --lowvram |
| 11 | Encoder load throws architecture error | Wrong CLIPLoader type | Set type to qwen_image |
| 12 | Not enough VRAM | Encoder takes nearly 9GB | Set CLIPLoader device to cpu |
| 13 | requirements resolution fails | Mixed PyTorch indexes | Use default PyPI + Tsinghua mirror, remove torch |
08 Performance, license, and limits
Real-world numbers on a 4GB card: 1024×1024, 20 steps, about 5 minutes per image, or 12.5 seconds per step. Peak VRAM sits between 3.7 / 4.0 GB, which is normal offload behavior. Want it faster? Drop steps to 12–16. Want more detail? Raise them to 40–50; time goes up linearly. The community also offers optional companion LoRAs—mount them with LoraLoader when needed.
Finally, let's be clear about the license. This quantized repo inherits the Qwen Research License, which allows research and personal-use deployment and does not cover commercial use. The "Uncensored" in the repo name only means there's no extra filter layer in the inference pipeline; what you generate and distribute is your responsibility. Tinkering locally is fine—just don't use it to generate illegal content or content that infringes on others' rights.
很多人以为本地跑文生图,下一个 4GB 的 GGUF 就完事了。真上手才发现它要三个文件,其中最大的一个 9.35 GB,压不下去。我在 Ubuntu 26.04(WSL2)上,用一块 RTX 3050 Laptop(4GB 显存)把它跑通了,一张 1024×1024 出图约 5 分钟。下面是从零到出图的完整流程,以及当场卡住我的 13 个坑。
01它不是一个模型文件
先说清楚对象。Qwen-Image 2.1 是阿里通义千问 9 月 20 日开源的图像模型,文生图和图像编辑共用同一套权重,视觉生成部分 7B 参数、32 层单流 DiT,文本和条件图交给 Qwen3-VL-8B 编码,原生支持透明 RGBA 出图、最多 10 张参考图、2K 分辨率。授权不是早期的 Apache 2.0,而是 Qwen Research License,只覆盖研究和自用。
对本地部署来说,重点在它的结构。它由三个文件组成,缺一不可:
-
qwen-image-2.1-UC-Q4_0.gguf(4.15 GB):主模型 DiT,真正的「画师」,4bit 量化后进显存
-
qwen3vl_8b_int8_convrot.safetensors(9.35 GB):文本编码器,把提示词转成语义向量,放系统内存
-
qwen_image_2.1_vae_bf16.safetensors(0.68 GB):VAE,负责潜空间与像素之间的编解码,进显存
GGUF 量化只压主模型。8B 的文本编码器没有 GGUF 版,只能整存,bf16 是 17.5 GB,int8 是 9.35 GB。
所以「4GB 显存跑图」的真实含义是 4GB 显存跑主模型 + 9GB 系统内存放编码器。这一点想通,后面所有参数都不用死记。
02装之前先看驱动
三条命令,把家底摸清楚:
nvidia-smi # 记下 Driver Version 和 CUDA Version
free -h # 文本编码器要放内存,建议 >=16GB
df -h / # 三个模型 + torch + CUDA 库,约 30GB
驱动版本决定你能用哪个 torch,这一步查错,后面全是冤枉路:
-
驱动 ≥ 580:可以用 cu130 / cu129
-
驱动 ≥ 525 且 < 580:只能 cu128。本文场景,驱动 572.60
-
更低:得退到 cu121 一类老版本
我本机是 572.60,落在第二档。
03三个文件怎么下最快
基础工具先装齐:
sudo apt update
sudo apt install -y
git git-lfs curl aria2
git lfs install
curl -LsSf https://astral.sh/uv/install.sh | sh
export PATH="$HOME/.local/bin:$PATH"
uv 是拿来拉独立 Python 的。Ubuntu 26.04 自带的 /usr/bin/python3 已经是 3.14,PyTorch 根本没有对应 wheel,直接装必挂。用 uv 另拉一个 3.12,不污染系统:
uv venv --python 3.12 venv
然后是下载。这件事值得单独讲一遍:直接用 hf download,或者 git clone 之后 git lfs pull,速度只有 0.5~3 MB/s;换 aria2c 开 16 线程,同一个源能跑到 25~30 MB/s。
export HF_ENDPOINT=https://hf-mirror.com
mkdir -p /root/qwen_models/{text_encoders,vae}
BASE="https://hf-mirror.com/abenzerps/Qwen-Image-2.1-Uncensored-Quantized/resolve/main"
aria2c -x16 -s16 -k5M -c --file-allocation=none \
-d /root/qwen_models -o
qwen-image-2.1-UC-Q4_0.gguf \
"$BASE/qwen-image-2.1-UC-Q4_0.gguf"
aria2c -x16 -s16 -k5M -c --file-allocation=none \
-d /root/qwen_models/text_encoders -o qwen3vl_8b_int8_convrot.safetensors\
"$BASE/text_encoders/qwen3vl_8b_int8_convrot.safetensors"
aria2c -x16 -s16 -k5M -c --file-allocation=none \ -d /root/qwen_models/vae -o qwen_image_2.1_vae_bf16.safetensors \
"$BASE/vae/qwen_image_2.1_vae_bf16.safetensors"
每个文件单独一条命令,不要合并。aria2 的 -o 只作用于它后面那一个 URI,三个文件塞进一条命令交错写,下载目标的大小会错配,gguf 会按编码器的体积去下。
下完对一下字节数,权威值从仓库的 HTTP 头拿:
cd /root/qwen_models
for f in qwen-image-2.1-UC-Q4_0.gguf \
text_encoders/qwen3vl_8b_int8_convrot.safetensors \
vae/qwen_image_2.1_vae_bf16.safetensors; do
echo -n "$f -> "; curl -sIL "$BASE/$f" | grep -i content-length | tail -1
done
sha256sum qwen-image-2.1-UC-Q4_0.gguf \
text_encoders/qwen3vl_8b_int8_convrot.safetensors \
vae/qwen_image_2.1_vae_bf16.safetensors
期望是 4,151,573,280 / 9,350,798,360 / 675,509,688 字节。
仓库里的
.gguf和.safetensors走的是 Git LFS。用git clone拉下来,文件默认只有 135 字节的指针,不git lfs pull就是个空壳。上面的 resolve 直链可以完全绕开这一层。
04最难的一步是把 torch 锁在 cu128
这一节是全文最容易翻车的地方,四条坑连在一起。
第一,pip install torch 默认给你装 CUDA 13 版本。CUDA 13 需要驱动 580 以上,我本机 572.60,装上就是 torch.cuda.is_available() 返回 False,或者干脆初始化报错。
第二,cu128 这个索引里的 torch,最高只到 2.11.0。更新的版本只在 cu129 / cu130 发布,所以不存在「用新版 torch 配旧驱动」这条路。
第三,用 uv 装的时候如果同时挂了清华源做 --extra-index-url,uv 默认的 first-index 策略会优先选清华源上的 CUDA 13 默认版,把带 +cu128 标记的那个版本悄悄顶掉。版本号要写死,再补上 --index-strategy unsafe-best-match。
第四,回头装 ComfyUI 的 requirements.txt 时,里面的 torch 没有版本约束,会重新解析一次,照样把你的 cu128 换成 cu13。要么提前剔除,要么用约束文件兜住。
具体这么干:
cd /root/ComfyUI && uv venv --python 3.12 venv
export VIRTUAL_ENV=/root/ComfyUI/venv
export UV_HTTP_TIMEOUT=180
printf'torch==2.11.0+cu128\ntorchvision==0.26.0+cu128\n' >
/tmp/torch_constraints.txt
# 只解析、不下载,先看它到底要拉什么
uv pip install --dry-
run "torch==2.11.0+cu128""torchvision==0.26.0+cu128" \
--index-url https://download.pytorch.org/whl/cu128 \
--extra-index-url https://pypi.tuna.tsinghua.edu.cn/simple \
--index-strategy unsafe-best-match
输出里能看到完整的依赖清单。本机解析出来是 cuda-toolkit==12.8.1、nvidia-cudnn-cu12==9.19.0.56、nvidia-cublas-cu12==12.8.4.1、nvidia-cusparse-cu12==12.5.8.93、nvidia-nccl-cu12==2.28.9、triton==3.6.0,一共 32 个包。
网络凑合的话,后面这段可以省。但 pypi.nvidia.com 在国内经常超时,稳妥做法是先用 aria2 把所有 wheel 下下来,再本地离线装:
# 把 dry-run 解析出的每个包,抓精确 wheel 链接写进 /root/wheel_urls.txt
aria2c -i /root/wheel_urls.txt -x16 -s16 -k5M -j8 --file-
allocation=none -d /root/wheels
uv pip install --no-index --find-links /root/wheels \
"torch==2.11.0+cu128""torchvision==0.26.0+cu128"
# 验证务必用 venv 的绝对路径
/root/ComfyUI/venv/bin/python -c \
"import torch;print(torch.__version__, torch.cuda.is_available(), torch.cuda.get_device_name(0))"
期望输出:2.11.0+cu128 True NVIDIA GeForce RTX 3050 Laptop GPU。
裸 python、裸 pip 都别用。WSL 里 PATH 上很可能挂着 Windows 侧的 shim,一敲 python 就掉进 /mnt/c/.../pyenv-win/shims/python,报 /bin/sh^M: bad interpreter。全程走 venv 的绝对路径。
05ComfyUI 和 GGUF 节点
cd /root
git clone https://github.com/comfyanonymous/ComfyUI.git
cd ComfyUI
# 装依赖时把 torch / torchvision 剔掉,防止被换回 cu13
grep -vE '^torch$|^torchvision$' requirements.txt > /tmp/req_notorch.txt
export VIRTUAL_ENV=/root/ComfyUI/venv
uv pip install -r /tmp/req_notorch.txt --extra-index-url https://pypi.tuna.tsinghua.edu.cn/simple
# GGUF 加载节点
cd custom_nodes
git clone https://github.com/leejet/ComfyUI-GGUF.git
cd ..
uv pip install gguf sentencepiece protobuf
GGUF 节点这里有个分支陷阱。老牌的 city96/ComfyUI-GGUF 最新提交停在今年 1 月,仓库里没有 Qwen-Image 2.1 的架构模板,加载时直接抛 Unknown model architecture!。leejet 的 fork 在 9 月 20 日补上了缺失的模板,9 月 21 日的提交把 qwen_image21 加进了可识别架构列表,必须用 leejet 这一版。
装完复核一下 torch 有没有被动过:
/root/ComfyUI/venv/bin/python -c "import torch;print(torch.__version__)"
模型归位:
cd /root/ComfyUI/models
mv /root/qwen_models/qwen-image-2.1-UC-Q4_0.gguf diffusion_models/
mv /root/qwen_models/text_encoders/qwen3vl_8b_int8_convrot.safetensors text_encoders/
mv /root/qwen_models/vae/qwen_image_2.1_vae_bf16.safetensors vae/
启动:
cd /root/ComfyUI
./venv/bin/python main.py --lowvram --listen 0.0.0.0 --port 8188
4GB 显存,--lowvram 是必加项,分辨率别越过 1024×1024。
06把第一张图跑出来
浏览器开 http://localhost:8188,按这套参数接节点:
-
Unet Loader (GGUF)选
qwen-image-2.1-UC-Q4_0.gguf -
CLIPLoader选
qwen3vl_8b_int8_convrot.safetensors,type 填qwen_image,device 改成cpu -
VAELoader选
qwen_image_2.1_vae_bf16.safetensors -
EmptySD3LatentImage设 1024×1024
-
ModelSamplingAuraFlow的 shift 设 3.1
-
KSampler用
euler/simple,steps=20,cfg=4
两个地方最关键。CLIPLoader 的 type 必须是 qwen_image,因为文本编码器是 Qwen3-VL-8B,内部会走 qwen_image21 那条路径,选错就报架构错误。
另一个是 device。CLIPLoader 的 device 改成 cpu,把 9.35 GB 的编码器放进系统内存。它每张图只用一次,几乎不影响出图速度,却省下近 9GB 显存。4GB 卡能跑通,靠的就是这一下。
验证服务与模型是否就绪:
curl -s http://127.0.0.1:8188/object_info/UnetLoaderGGUF | head -c 100
curl -s http://127.0.0.1:8188/object_info/UnetLoaderGGUF \
| python3 -c "import sys,json;print(json.load(sys.stdin)['UnetLoaderGGUF']['input']['required']['unet_name'][0])"
一次正常的启动,日志里会出现这几行:
Total VRAM 4096 MB ... Set vram stateto: LOW_VRAM
Device: cuda:0 NVIDIA GeForce RTX 3050 Laptop GPU
CLIP/text encoder model load device: cpu ...
Requested toload QwenImage21
loaded partially; 2072 MB usable, 1990 MB loaded, 2097 MB offloaded
Prompt executed in304.66 seconds
loaded partially 那行是 lowvram 的正常换页,不是错误。出图落在 /root/ComfyUI/output/。
07坑速查
| # | 现象 | 根因 | 解法 |
|---|---|---|---|
| 1 | pip 装不上 torch | 系统 Python 3.14 太新,没有 wheel | uv venv --python 3.12 |
| 2 | 模型下载龟速 | hf / pip 下载器只跑 0.5~3 MB/s | aria2c -x16 -s16 |
| 3 | 下载文件大小错乱 | 一条命令里写了多个 -o |
每个文件单独一条命令 |
| 4 | gguf 只有 135 字节 | Git LFS 指针没落地 | 用 resolve 直链,或 git lfs pull |
| 5 | cuda: False |
或直接报错 | torch 装成 CUDA 13,驱动只到 12.8 |
| 6 | torch 被静默换版 | uv 的 first-index 策略 |
写死版本 + --index-strategy unsafe-best-match |
| 7 | nvidia 系依赖下载超时 | pypi.nvidia.com |
不稳 |
| 8 | python |
报 bad interpreter | WSL 里命中 Windows 的 pyenv shim |
| 9 | Unknown model architecture! |
GGUF 节点用了 city96 版 | 换 leejet/ComfyUI-GGUF |
| 10 | OOM 或出图崩坏 | 4GB 显存扛不住默认参数 | --lowvram |
| 11 | 编码器加载报架构错误 | CLIPLoader 的 type 选错 | type 填 qwen_image |
| 12 | 显存不够 | 编码器占了近 9GB | CLIPLoader 的 device 设 cpu |
| 13 | requirements 解析失败 | 混用了 pytorch 索引 | 换默认 PyPI + 清华源,剔除 torch |
08性能、许可与边界
4GB 卡的实测数字:1024×1024、20 步,单张约 5 分钟,合 12.5 秒一步;显存峰值在 3.7 / 4.0 GB 之间,属于正常的 offload 状态。想快就把 steps 降到 12~16,想细就加到 40~50,时间线性上涨。社区还提供配套的可选 LoRA,需要时用 LoraLoader 挂载即可。
最后把许可说清楚。这个量化仓库继承的是 Qwen Research License,允许研究和自用部署,不覆盖商业使用。仓库名里的 Uncensored 只表示推理链路没有额外加一层过滤,生成什么、传播什么,责任在使用者。本地折腾没问题,别拿去生成违法或侵害他人权益的内容。
Translated by AI from 简体中文Original (简体中文)
还在为IP不纯、平台风控、频繁验证而烦恼? 丽萨主机海外原生IP VPS,双ISP住宅IP,覆盖美国、香港、日本、新加坡、台湾、德国、越南、英国等热门地区,适合跨境电商、社媒运营、AI工具、流媒体及海外业务使用。
1 replies
Sort order