Image-Text-to-Text
Transformers
Safetensors
GGUF
minicpmv4_6
film
computer-vision
defect-detection
minicpm-v
conversational
Instructions to use Lonelyguyse1/halide-vision with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Lonelyguyse1/halide-vision with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Lonelyguyse1/halide-vision", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("Lonelyguyse1/halide-vision") model = AutoModelForMultimodalLM.from_pretrained("Lonelyguyse1/halide-vision", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - llama-cpp-python
How to use Lonelyguyse1/halide-vision with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Lonelyguyse1/halide-vision", filename="minicpm-v-4.6-merged-v3-q4_k_m.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Lonelyguyse1/halide-vision 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 Lonelyguyse1/halide-vision:Q4_K_M # Run inference directly in the terminal: llama cli -hf Lonelyguyse1/halide-vision:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Lonelyguyse1/halide-vision:Q4_K_M # Run inference directly in the terminal: llama cli -hf Lonelyguyse1/halide-vision:Q4_K_M
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 Lonelyguyse1/halide-vision:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf Lonelyguyse1/halide-vision:Q4_K_M
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 Lonelyguyse1/halide-vision:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf Lonelyguyse1/halide-vision:Q4_K_M
Use Docker
docker model run hf.co/Lonelyguyse1/halide-vision:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use Lonelyguyse1/halide-vision with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Lonelyguyse1/halide-vision" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Lonelyguyse1/halide-vision", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/Lonelyguyse1/halide-vision:Q4_K_M
- SGLang
How to use Lonelyguyse1/halide-vision 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 "Lonelyguyse1/halide-vision" \ --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": "Lonelyguyse1/halide-vision", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "Lonelyguyse1/halide-vision" \ --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": "Lonelyguyse1/halide-vision", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Ollama
How to use Lonelyguyse1/halide-vision with Ollama:
ollama run hf.co/Lonelyguyse1/halide-vision:Q4_K_M
- Unsloth Studio
How to use Lonelyguyse1/halide-vision with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Lonelyguyse1/halide-vision to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Lonelyguyse1/halide-vision to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Lonelyguyse1/halide-vision to start chatting
- Pi
How to use Lonelyguyse1/halide-vision with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Lonelyguyse1/halide-vision:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "Lonelyguyse1/halide-vision:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use Lonelyguyse1/halide-vision with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Lonelyguyse1/halide-vision:Q4_K_M
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 Lonelyguyse1/halide-vision:Q4_K_M
Run Hermes
hermes
- Atomic Chat new
- OpenClaw new
How to use Lonelyguyse1/halide-vision with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Lonelyguyse1/halide-vision:Q4_K_M
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 "Lonelyguyse1/halide-vision:Q4_K_M" \ --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"
- Docker Model Runner
How to use Lonelyguyse1/halide-vision with Docker Model Runner:
docker model run hf.co/Lonelyguyse1/halide-vision:Q4_K_M
- Lemonade
How to use Lonelyguyse1/halide-vision with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Lonelyguyse1/halide-vision:Q4_K_M
Run and chat with the model
lemonade run user.halide-vision-Q4_K_M
List all available models
lemonade list
Upload Halide MiniCPM-V 4.6 merged checkpoint from minicpm-v-4.6-merged-v7-crack-curriculum-r1-ckpt625
Browse files- README.md +31 -33
- model-00001-of-00002.safetensors +1 -1
README.md
CHANGED
|
@@ -1,55 +1,53 @@
|
|
| 1 |
-
|
| 2 |
license: apache-2.0
|
| 3 |
base_model: openbmb/MiniCPM-V-4.6
|
| 4 |
library_name: transformers
|
| 5 |
pipeline_tag: image-text-to-text
|
| 6 |
tags:
|
| 7 |
- film
|
| 8 |
-
-
|
| 9 |
-
- image-to-text
|
| 10 |
- defect-detection
|
| 11 |
- minicpm-v
|
| 12 |
---
|
| 13 |
|
| 14 |
# Halide Vision
|
| 15 |
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
Project Space: <https://huggingface.co/spaces/Lonelyguyse1/project-halide>
|
| 21 |
-
|
| 22 |
-
## Intended Use
|
| 23 |
-
|
| 24 |
-
This model is used by Project Halide to extract visible defect candidates from analog film scans. It emits JSON bounding boxes for these labels:
|
| 25 |
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
-
|
| 29 |
-
|
| 30 |
-
-
|
| 31 |
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
## Runtime Notes
|
| 35 |
|
| 36 |
- Base model: `openbmb/MiniCPM-V-4.6`
|
| 37 |
-
-
|
| 38 |
-
-
|
| 39 |
-
|
|
|
|
| 40 |
|
| 41 |
-
##
|
| 42 |
|
| 43 |
-
|
| 44 |
|
| 45 |
-
|
| 46 |
-
-
|
| 47 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 48 |
|
| 49 |
-
##
|
| 50 |
-
|
| 51 |
-
This is a small-data domain adaptation model. It should be used as an inspection aid, not as a final archival judgment. Natural image content can resemble scratches or hair-like artifacts, so Project Halide uses prompt-level non-film rejection, schema validation, confidence filtering when available, and diagnosis text that keeps uncertainty visible.
|
| 52 |
|
| 53 |
-
|
|
|
|
| 54 |
|
| 55 |
-
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
license: apache-2.0
|
| 3 |
base_model: openbmb/MiniCPM-V-4.6
|
| 4 |
library_name: transformers
|
| 5 |
pipeline_tag: image-text-to-text
|
| 6 |
tags:
|
| 7 |
- film
|
| 8 |
+
- computer-vision
|
|
|
|
| 9 |
- defect-detection
|
| 10 |
- minicpm-v
|
| 11 |
---
|
| 12 |
|
| 13 |
# Halide Vision
|
| 14 |
|
| 15 |
+
Halide Vision is a MiniCPM-V 4.6 checkpoint fine-tuned for analog film-scan
|
| 16 |
+
defect extraction. It is maintained by
|
| 17 |
+
[Lonelyguyse1](https://huggingface.co/Lonelyguyse1) for
|
| 18 |
+
[Project Halide](https://github.com/Lonelyguyse1/Project-Halide).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
+
The model emits JSON defect proposals for dust, dirt, scratches, hair-like
|
| 21 |
+
surface contamination, emulsion damage, chemical stains, and light leaks. The
|
| 22 |
+
Project Halide runtime validates the JSON schema, removes low-confidence or
|
| 23 |
+
duplicate boxes, and uses tiled inspection when large scans hide thin crack
|
| 24 |
+
networks at full-frame scale.
|
| 25 |
|
| 26 |
+
## Training Summary
|
|
|
|
|
|
|
| 27 |
|
| 28 |
- Base model: `openbmb/MiniCPM-V-4.6`
|
| 29 |
+
- Training method: LoRA fine-tuning with LLaMA-Factory, merged for inference
|
| 30 |
+
- Curriculum: FilmDamageSimulator annotations, procedural film-defect positives,
|
| 31 |
+
hard clean negatives, and a v7 crack curriculum
|
| 32 |
+
- Held-out private negatives: used only for evaluation, not for training
|
| 33 |
|
| 34 |
+
## Held-Out Smoke Result
|
| 35 |
|
| 36 |
+
Final v7 checkpoint with 960 px tiled fallback:
|
| 37 |
|
| 38 |
+
| Sample | Expected surface condition | Result |
|
| 39 |
+
| --- | --- | --- |
|
| 40 |
+
| negative1 | Long scratches across portrait | 8 defects |
|
| 41 |
+
| negative2 | Abraded emulsion and dirt patches | 9 defects |
|
| 42 |
+
| negative3 | Severe emulsion damage and debris | 6 defects |
|
| 43 |
+
| negative4 | Near-clean hard negative | 0 defects |
|
| 44 |
+
| negative5 | Broad lifted crack network | 45 defects |
|
| 45 |
|
| 46 |
+
## Runtime Notes
|
|
|
|
|
|
|
| 47 |
|
| 48 |
+
This model is intended to run inside Project Halide with GPU inference. The
|
| 49 |
+
runtime refuses local CPU model inference and does not call cloud inference APIs.
|
| 50 |
|
| 51 |
+
Use the model as an inspection aid. It can over-box broad damage regions, and
|
| 52 |
+
film metadata should be treated as context unless verified by notes or edge
|
| 53 |
+
marks.
|
model-00001-of-00002.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1995700560
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:eaaf0f204600222d235e7d3e2afbbe47514ae2fdcfb19418f4f9e4206ee65e87
|
| 3 |
size 1995700560
|