Instructions to use Kaiii1912/residual_fusion with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Kaiii1912/residual_fusion with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Kaiii1912/residual_fusion") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Kaiii1912/residual_fusion", device_map="auto") - PEFT
How to use Kaiii1912/residual_fusion with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Kaiii1912/residual_fusion with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf Kaiii1912/residual_fusion:BF16 # Run inference directly in the terminal: llama cli -hf Kaiii1912/residual_fusion:BF16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Kaiii1912/residual_fusion:BF16 # Run inference directly in the terminal: llama cli -hf Kaiii1912/residual_fusion:BF16
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf Kaiii1912/residual_fusion:BF16 # Run inference directly in the terminal: ./llama-cli -hf Kaiii1912/residual_fusion:BF16
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf Kaiii1912/residual_fusion:BF16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf Kaiii1912/residual_fusion:BF16
Use Docker
docker model run hf.co/Kaiii1912/residual_fusion:BF16
- LM Studio
- Jan
- vLLM
How to use Kaiii1912/residual_fusion with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Kaiii1912/residual_fusion" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Kaiii1912/residual_fusion", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Kaiii1912/residual_fusion:BF16
- SGLang
How to use Kaiii1912/residual_fusion with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Kaiii1912/residual_fusion" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Kaiii1912/residual_fusion", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Kaiii1912/residual_fusion" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Kaiii1912/residual_fusion", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use Kaiii1912/residual_fusion with Ollama:
ollama run hf.co/Kaiii1912/residual_fusion:BF16
- Unsloth Desktop
- Pi
How to use Kaiii1912/residual_fusion with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Kaiii1912/residual_fusion:BF16
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "Kaiii1912/residual_fusion:BF16" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use Kaiii1912/residual_fusion with Docker Model Runner:
docker model run hf.co/Kaiii1912/residual_fusion:BF16
- Lemonade
How to use Kaiii1912/residual_fusion with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Kaiii1912/residual_fusion:BF16
Run and chat with the model
lemonade run user.residual_fusion-BF16
List all available models
lemonade list
- Hermes Agent
How to use Kaiii1912/residual_fusion with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Kaiii1912/residual_fusion:BF16
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default Kaiii1912/residual_fusion:BF16
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use Kaiii1912/residual_fusion with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Kaiii1912/residual_fusion:BF16
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "Kaiii1912/residual_fusion:BF16" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
ResidualFusion Prompt Controller
ResidualFusion Prompt Controller is a supervised BF16 LoRA adaptation of Qwen3-1.7B. It converts conversational photo-editing requests into the constrained control schema consumed by the ResidualFusion image pipeline.
The model does not generate or modify pixels. Image analysis, residual parameter prediction, semantic masks, safety selection, and rendering remain deterministic components of the ResidualFusion application.
Model Assets
| Path | Purpose |
|---|---|
ai-photo-prompt-control-exp007-bf16.gguf |
Base model and selected LoRA merged in BF16 GGUF form for Ollama deployment |
lora_adapter/adapter_model.safetensors |
Selected rank-16 LoRA adapter for research or continued fine-tuning |
lora_adapter/adapter_config.json |
PEFT adapter configuration |
Modelfile |
Deterministic Ollama import and inference configuration |
SHA-256 hashes and exact file sizes are recorded in the
v1.0.0 asset manifest.
The complete editor is published in
the AI Photo Editor repository.
Training
- Base model:
Qwen/Qwen3-1.7B, frozen during adapter training. - Method: supervised BF16 LoRA with rank 16, alpha 32, and dropout 0.05.
- Selected checkpoint: step 260, chosen by intent accuracy, complete-field exact accuracy, and then the earliest checkpoint.
- Output contract: structured intent, strength, and preservation constraints for the downstream image editor.
Evaluation
The selected validation checkpoint achieved:
- Intent accuracy: 100%.
- Complete-field exact accuracy: 95%.
- Constraint micro-F1: 98.46% on the selected validation split.
An isolated synthetic prompt audit achieved 97.5% intent accuracy, while a harder compound-constraint audit achieved 74.03% micro-F1. These are task-specific control metrics and should not be interpreted as general language-model accuracy.
Ollama Deployment
Use the installer included in the ResidualFusion application package:
.\install_prompt_model.ps1 -RepoId "Kaiii1912/residual_fusion"
.\install_prompt_model.ps1 -CheckOnly
The installer downloads the GGUF, verifies its SHA-256 hash, and creates the local
Ollama model ai-photo-prompt-control:exp007-v1.
Limitations
- The model is specialized for ResidualFusion's constrained editing schema; it is not intended as a general chatbot.
- Compound constraints remain less reliable than single editing intents.
- Reported results are validation and isolated audit measurements. A new, untouched natural-language blind test has not been opened.
- The complete photo-editing result also depends on the separate ResidualFusion image pipeline and cannot be reproduced from this language model alone.
License
The base Qwen3-1.7B model is distributed under Apache-2.0. Use of the application code and other third-party components remains subject to their respective licenses.
- Downloads last month
- 206
16-bit