Instructions to use netprojects/Unlimited-SVG-LayerFit-MLX-5bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use netprojects/Unlimited-SVG-LayerFit-MLX-5bit with MLX:
# Make sure mlx-vlm is installed # pip install --upgrade mlx-vlm from mlx_vlm import load, generate from mlx_vlm.prompt_utils import apply_chat_template from mlx_vlm.utils import load_config # Load the model model, processor = load("netprojects/Unlimited-SVG-LayerFit-MLX-5bit") config = load_config("netprojects/Unlimited-SVG-LayerFit-MLX-5bit") # Prepare input image = ["http://images.cocodataset.org/val2017/000000039769.jpg"] prompt = "Describe this image." # Apply chat template formatted_prompt = apply_chat_template( processor, config, prompt, num_images=1 ) # Generate output output = generate(model, processor, formatted_prompt, image) print(output) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
Unlimited-SVG-LayerFit-MLX-5bit
NetProjects Apple Silicon conversion of Baidu Unlimited-SVG. This is the recommended option. It packages 2.82 GB of safetensors weights. Only the language model is quantized; the vision components are not quantized.
Run locally
Tested with Python 3.12, mlx-vlm==0.7.11, mlx==0.32.4, and transformers==5.20.0. Download the repo locally and review the included runner before use. No trust_remote_code=True is needed. The runner implements 2048-pixel preprocessing and memory-bounded image attention; generic chat commands are not the tested path.
hf download netprojects/Unlimited-SVG-LayerFit-MLX-5bit --local-dir unlimited-svg
python unlimited-svg/unlimited_svg_mlx.py image.png --out output.svg --max-tokens 12000
The runner rejects malformed and incomplete SVG as well as content outside a restricted vector profile, including scripts, event handlers, and external references. This is a conservative preflight, not a general-purpose SVG sanitizer or security guarantee. Inspect generated files before embedding them in web pages.
Validation
Completed and passed the restricted SVG check on 6/6 fixtures: simple shapes, text diagram, Baidu logo, transparent badge, bar chart and flowchart. Mean absolute pixel difference relative to a BF16 MLX render was 0.17% of the channel range, using 512-pixel Quick Look thumbnails. This measures agreement with BF16, not accuracy against the source images. The fixture set is small and not a general quality or safety guarantee.
LayerFit 5-bit is the default, LayerFit 4-bit is compact, and uniform 8-bit is the higher-precision option. See LICENSE and NOTICE for attribution.
- Downloads last month
- -
Quantized
Model tree for netprojects/Unlimited-SVG-LayerFit-MLX-5bit
Base model
baidu/Unlimited-SVG