This repository provides the Q8_0 GGUF quantization of Qwen-Image-2.1-PE-I2I and the files needed to run it with llama.cpp.
Original model: Qwen/Qwen-Image-2.1-PE-I2I.
Download a binary package for your operating system and processor architecture from the llama.cpp releases page.
For Apple Silicon MacBooks and Macs, download the b11564 macOS arm64 binary package.
Set the environment variables below, replacing the example paths with the actual absolute paths to your model and binary directories. Use absolute paths for input images as well. You can run the commands from any directory.
export MODEL_DIR="/path/to/Qwen-Image-2.1-PE-I2I-GGUF-Q8_0"
export LLAMA_BIN="/path/to/llama-b11564"
Replace /path/to/input.png with the actual absolute path to your input image.
"${LLAMA_BIN}/llama-mtmd-cli" \
--model "${MODEL_DIR}/Qwen-Image-2.1-PE-I2I-Q8_0.gguf" \
--mmproj "${MODEL_DIR}/mmproj-Qwen-Image-2.1-PE-I2I-BF16.gguf" \
--image "/path/to/input.png" \
--system-prompt "$(cat "${MODEL_DIR}/system_prompt.txt")" \
--jinja --chat-template "$(cat "${MODEL_DIR}/chat_template.jinja")" \
--ctx-size 32768 --n-gpu-layers 99 --threads 8 \
--n-predict 24000 --seed 42 \
--temp 1.0 --top-p 0.95 --top-k 20 --min-p 0 --repeat-penalty 1.0 \
--verbosity 1 \
--prompt "Change the red square in the image to green, keeping everything else unchanged"
Add one --image argument for each image. In argument order, the first image is <image1>, the second is <image2>, and so on. Use these tags in your editing instruction to describe each image's role.
"${LLAMA_BIN}/llama-mtmd-cli" \
--model "${MODEL_DIR}/Qwen-Image-2.1-PE-I2I-Q8_0.gguf" \
--mmproj "${MODEL_DIR}/mmproj-Qwen-Image-2.1-PE-I2I-BF16.gguf" \
--image "/path/to/base.png" \
--image "/path/to/reference.png" \
--system-prompt "$(cat "${MODEL_DIR}/system_prompt.txt")" \
--jinja --chat-template "$(cat "${MODEL_DIR}/chat_template.jinja")" \
--ctx-size 32768 --n-gpu-layers 99 --threads 8 \
--n-predict 24000 --seed 42 \
--temp 1.0 --top-p 0.95 --top-k 20 --min-p 0 --repeat-penalty 1.0 \
--verbosity 1 \
--prompt "Use <image1> as the base image. Replace the person's clothing with the clothing from <image2>, keeping the person's identity, pose, and background in <image1> unchanged. Match the output aspect ratio to <image1>."
A native macOS app for local image generation with Qwen-Image-2.1-Turbo on Apple Silicon. It uses LightX2V for image inference and llama.cpp for optional prompt enhancement, with a simple interface for text-to-image and image-to-image creation.
Download LightX2V APP and try local inference with Qwen-Image-2.1-Turbo and prompt enhancement (PE) on your MacBook!
LightX2V APP is open source—we welcome you to explore and build upon LightX2V APP and LightX2V, and appreciate your feedback and contributions.
有文件?提交种子。
发布种子