Skip to page content
SAVRN
Search Plan a project

Open-weight model · Text to image

InGuard

by Alibaba-AAIG Alibaba-AAIG/InGuard

InGuard is an open-weight model for text to image from Alibaba-AAIG, released under Apache License 2.0. Its published files total 2.0 GB.

This repository contains the released guardrail heads for InGuard, an in-pipeline safety framework for text-to-image generation. It does not contain the five base text-to-image models.

Parameters—
Context—
Weights2.0 GB
Licenseapache-2.0
AccessOpen weights
Monthly Downloads—

Model Card

By Alibaba-AAIG, published under apache-2.0, revision 93513aa37e47.

This repository contains the released guardrail heads for InGuard, an in-pipeline safety framework for text-to-image generation. It does not contain the five base text-to-image models. For each supported model, the release provides: - a PE-MLP classifier operating on text-encoder embeddings; and - a ConvNeXt-Base detector operating on an intermediate latent estimate. Detection step uses zero-based indexing and refers to the default deployed configuration in the InGuard code repository. The PE-MLP checkpoints contain inputdim, hiddendim, numlayers, and dropout together with modelstatedict; no separate PE-MLP config file is required. Training optimizer states have been removed from all…

Read Alibaba-AAIG's full model card

InGuard Released Weights

This repository contains the released guardrail heads for InGuard, an in-pipeline safety framework for text-to-image generation. It does not contain the five base text-to-image models.

For each supported model, the release provides:

  • a PE-MLP classifier operating on text-encoder embeddings; and
  • a ConvNeXt-Base detector operating on an intermediate latent estimate.

Supported models

Model key PE-MLP input dimension Latent channels Detection step
z-image-turbo 2560 16 3
qwen-image-2512 3584 16 4
hunyuan-image-2_1 3584 64 4
flux2-klein-base-9b 12288 32 4
internvl-u 4096 16 8

Detection step uses zero-based indexing and refers to the default deployed configuration in the InGuard code repository.

Repository layout

.
├── latent_detector/
│   └── <model>/
│       ├── model.pth
│       └── config.json
├── pe_mlp/
│   └── <model>/
│       └── model.pth
└── manifest.json

The PE-MLP checkpoints contain input_dim, hidden_dim, num_layers, and dropout together with model_state_dict; no separate PE-MLP config file is required. Training optimizer states have been removed from all released checkpoints.

Download and verify

git clone https://github.com/Alibaba-AAIG/InGuard.git
cd InGuard
hf download Alibaba-AAIG/InGuard --local-dir weights
pip install -r requirements.txt
python scripts/verify_pipeline.py \
  --model z-image-turbo \
  --stage components \
  --device cpu

Use --stage quick for file and manifest checks. End-to-end generation also requires the corresponding base model and a suitable GPU; see the main InGuard README for complete instructions.

Intended use

These weights are intended for research on generation-time safety screening, prompt-embedding enhancement, and intermediate-latent risk detection with the supported base models.

They are not a standalone image-generation model and must not be treated as a complete content-safety solution. Performance can vary across prompts, languages, model revisions, sampling settings, and content outside the released evaluation distribution. Users remain responsible for downstream validation and compliance with applicable law and platform policy.

Base-model terms

The supported base models are not redistributed here. Download them from their respective providers and comply with their individual licenses and access terms.

License

The InGuard guardrail weights are released under the Apache License 2.0. See LICENSE for details.

Citation

@article{wang2026inguard,
  title   = {InGuard: Towards Generalized Inner Guardrail for
             Safe Text-to-Image Generation},
  author  = {Wang, Zeyu and Li, Xiaodan and Li, Zhiwen and
             Chen, Yuefeng and Xue, Hui},
  journal = {arXiv preprint arXiv:2609.27620},
  year    = {2026},
  doi     = {10.48550/arXiv.2609.27620},
  url     = {https://arxiv.org/abs/2609.27620}
}

Identity and Version

Repository
Alibaba-AAIG/InGuard
Publisher
Alibaba-AAIG
Task
Text to image
Modality
Image
Library
pytorch
Parameters
Not stated by the source
Languages
Not stated by the source
Revision
93513aa37e4782baa3e54841f9d13eab4ec3d613
First published
2026-09-23
Last updated
2026-09-24

Files and Weights

21 files, 2.0 GB in total. The weights are 10 files totalling 2.0 GB in pth.

Weights10 files · 2.0 GB
Configuration6 files · 3.1 KB
Documentation2 files · 14.8 KB
Repository3 files · 13.8 KB
Every file
FileTypeSizeSHA-256
latent_detector/flux2-klein-base-9b/model.pthWeights363.3 MB 9a30a6853ec8
latent_detector/hunyuan-image-2_1/model.pthWeights363.5 MB afc20c391e39
latent_detector/internvl-u/model.pthWeights363.2 MB 222da8078532
latent_detector/qwen-image-2512/model.pthWeights363.2 MB 91706b29f585
latent_detector/z-image-turbo/model.pthWeights363.2 MB 7c2b406a8dd9
pe_mlp/flux2-klein-base-9b/model.pthWeights63.1 MB 13900b727aa2
pe_mlp/hunyuan-image-2_1/model.pthWeights27.4 MB 1c9fde613768
pe_mlp/internvl-u/model.pthWeights29.5 MB 16a75a6c6294
pe_mlp/qwen-image-2512/model.pthWeights27.4 MB 9017e5e0b845
pe_mlp/z-image-turbo/model.pthWeights23.2 MB 53d0ee5a53a1
latent_detector/flux2-klein-base-9b/config.jsonConfiguration412 B —
latent_detector/hunyuan-image-2_1/config.jsonConfiguration410 B —
latent_detector/internvl-u/config.jsonConfiguration403 B —
latent_detector/qwen-image-2512/config.jsonConfiguration408 B —
latent_detector/z-image-turbo/config.jsonConfiguration406 B —
manifest.jsonConfiguration1.1 KB —
LICENSEDocumentation11.3 KB —
README.mdDocumentation3.4 KB —
.gitattributesRepository1.5 KB —
latent_detector/.DS_StoreRepository6.1 KB —
pe_mlp/.DS_StoreRepository6.1 KB —

License and Download

License
apache-2.0
Access
Open weights, no gate
Download size
2.0 GB
Download from Alibaba-AAIG

Released by Alibaba-AAIG through its official repository on Hugging Face. Read the license.

Built From

  • Derived from InternVL-U/InternVL-U
  • Described by arXiv:2609.27620

Memory Requirements

PrecisionWeights in memory
As published2.0 GB

Weights only, from the published parameter count; the key-value cache and runtime add to this.

Questions About InGuard

Can I use InGuard commercially?

Yes. InGuard is released under Apache License 2.0. The Apache License 2.0 is a permissive open-source license. It permits commercial use, modification and redistribution. It requires keeping the license and copyright notices and any NOTICE file, stating significant changes, and it includes an express patent grant from contributors.

Similar Models

GGUF, Safetensors, and MLX quantized formats of Qwen/Qwen-Image-2.1 for local image generation using the original upstream base weights. Q4KM is recommended for the best balance of size and quality for GGUF. INT8 ConvRot and NVFP4 offer high performance on supported GPUs, while MLX formats are optimized for Apple Silicon. Companion model files packaged for ComfyUI: Use the model with ComfyUI and ComfyUI-GGUF. All required companion files (GGUF transformer, text encoder, and VAE) are hosted directly in this repository. Download the files and place them in their respective ComfyUI directories: 1. Install ComfyUI-GGUF: Use the maintained fork with native Qwen-Image 2.1 support by cloning…

Open weights other gguf

GGUF quantizations of Qwen/Qwen-Image-2.1 for local image generation using the original upstream base weights. Q4KM is recommended for the best balance of size and quality. Companion model files packaged for ComfyUI: Use the model with ComfyUI and ComfyUI-GGUF. All required companion files (GGUF transformer, text encoder, and VAE) are hosted directly in this repository. Download the files and place them in their respective ComfyUI directories: 1. Install ComfyUI-GGUF: Use the maintained fork with native Qwen-Image 2.1 support by cloning leejet/ComfyUI-GGUF into your custom nodes: (Note: If you have the older city96/ComfyUI-GGUF installed and encounter an Unknown model architecture! error…

Open weights other gguf

Model · Text to image

Qwen-Image-2.1-GGUF

Unsloth AI

This is a GGUF quantized version of Qwen-Image-2.1. unsloth/Qwen-Image-2.1-GGUF uses Unsloth Dynamic 2.0 methodology for SOTA performance. - Important layers are upcasted to higher precision, per tensor, from a measured sensitivity scan. - Run these with Unsloth Desktop, stable-diffusion.cpp and more. A GGUF is the denoiser only, so it needs the VAE and the Qwen3-VL text encoder alongside it. See below for image editing operating inside of Unsloth Desktop: Rendered with the Q4KM denoiser and the Q4KM text encoder, 1024x1024, 20 steps, cfg 6.0, euler. We are excited to open-source Qwen-Image-2.1, a unified text-to-image generation and image editing model in the Qwen family. With just 7B…

Open weights other

Model · Text to image

Z-Image-Turbo-GGUF

Unsloth AI

Welcome to the official repository for the Z-Image(造相)project! Z-Image is a powerful and highly efficient image generation model with 6B parameters. Currently there are three variants: - Z-Image-Turbo – A distilled version of Z-Image that matches or exceeds leading competitors with only 8 NFEs (Number of Function Evaluations). It offers sub-second inference latency on enterprise-grade H800 GPUs and fits comfortably within 16G VRAM consumer devices. It excels in photorealistic image generation, bilingual text rendering (English & Chinese), and robust instruction adherence. - Z-Image-Base – The non-distilled foundation model. By releasing this checkpoint, we aim to unlock the full potential…

Open weights apache-2.0 ggml

Model · Text to image

Juggernaut-XL-v9

RunDiffusion

The SDXL ecosystem is the single most mature corner of open image generation, and v9 is its most refined photorealism checkpoint. Choose Juggernaut XL v9 when you want: - Photorealism that holds up under scrutiny — skin texture, micro-contrast, and natural lighting that translates from concept to print. - Reasonable hardware — runs comfortably on 8 GB of VRAM, unlike newer DiT-based models that demand 16+ GB. - The full SDXL toolbox — drop-in compatibility with the thousands of SDXL ControlNets, IP-Adapter variants, AnimateDiff, regional prompting tools, and LoRAs already in your workflow. - Battle-tested reliability — 26+ months in production, used in agencies, studios, and shipping…

Open weights creativeml-openrail-m diffusers

Model · Text to image

Qwen-Image-Lightning

Lightx2v

Please refer to Qwen-Image-Lightning github to learn how to use the models. make sure to install diffusers from main (pip install git+https://github.com/huggingface/diffusers.git)

Open weights apache-2.0 diffusers