Initial release
Browse filesFiles changed (5)
- HiDream-8B/config.jsonAdded+277
- HiDream-8B/model.safetensorsAdded+3
- PRX-7B/config.jsonAdded+40
- PRX-7B/model.safetensorsAdded+3
- README.mdAdded+72
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277{ "backbone_type": "hidream-o1", "resolution": 2048, "patch_size": 32, "noise_scale": 8.0, "downscale": "area", "prompt": "Transform to matting map while maintaining original composition", "prompt_ids": [ 151644, 872, 198, 8963, 311, 5517, 1280, 2415, 1393, 20337, 4024, 18037, 151645, 198, 151644, 77091, 198, 151669, 151673 ], "refiner": { "channels": 96, "dilations": [ 1, 2, 4, 8, 1, 2, 4, 8 ], "sigma": 24.0, "amplitude": 0.5 }, "backbone": { "add_cross_attention": false, "architectures": [ "Qwen3VLForConditionalGeneration" ], "bad_words_ids": null, "begin_suppress_tokens": null, "bos_token_id": null, "chunk_size_feed_forward": 0, "cross_attention_hidden_size": null, "decoder_start_token_id": null, "diversity_penalty": 0.0, "do_sample": false, "dtype": "bfloat16", "early_stopping": false, "encoder_no_repeat_ngram_size": 0, "eos_token_id": null, "exponential_decay_length_penalty": null, "finetuning_task": null, "forced_bos_token_id": null, "forced_eos_token_id": null, "id2label": { "0": "LABEL_0", "1": "LABEL_1" }, "image_token_id": 151655, "is_decoder": false, "is_encoder_decoder": false, "label2id": { "LABEL_0": 0, "LABEL_1": 1 }, "length_penalty": 1.0, "max_length": 20, "min_length": 0, "model_type": "qwen3_vl", "no_repeat_ngram_size": 0, "num_beam_groups": 1, "num_beams": 1, "num_return_sequences": 1, "output_attentions": false, "output_hidden_states": false, "output_scores": false, "pad_token_id": null, "prefix": null, "problem_type": null, "pruned_heads": {}, "remove_invalid_values": false, "repetition_penalty": 1.0, "return_dict": true, "return_dict_in_generate": false, "sep_token_id": null, "suppress_tokens": null, "task_specific_params": null, "temperature": 1.0, "text_config": { "add_cross_attention": false, "architectures": null, "attention_bias": false, "attention_dropout": 0.0, "bad_words_ids": null, "begin_suppress_tokens": null, "bos_token_id": 151643, "chunk_size_feed_forward": 0, "cross_attention_hidden_size": null, "decoder_start_token_id": null, "diversity_penalty": 0.0, "do_sample": false, "dtype": "bfloat16", "early_stopping": false, "encoder_no_repeat_ngram_size": 0, "eos_token_id": 151645, "exponential_decay_length_penalty": null, "finetuning_task": null, "forced_bos_token_id": null, "forced_eos_token_id": null, "head_dim": 128, "hidden_act": "silu", "hidden_size": 4096, "id2label": { "0": "LABEL_0", "1": "LABEL_1" }, "initializer_range": 0.02, "intermediate_size": 12288, "is_decoder": false, "is_encoder_decoder": false, "label2id": { "LABEL_0": 0, "LABEL_1": 1 }, "length_penalty": 1.0, "max_length": 20, "max_position_embeddings": 262144, "min_length": 0, "model_type": "qwen3_vl_text", "no_repeat_ngram_size": 0, "num_attention_heads": 32, "num_beam_groups": 1, "num_beams": 1, "num_hidden_layers": 36, "num_key_value_heads": 8, "num_return_sequences": 1, "output_attentions": false, "output_hidden_states": false, "output_scores": false, "pad_token_id": null, "prefix": null, "problem_type": null, "pruned_heads": {}, "remove_invalid_values": false, "repetition_penalty": 1.0, "return_dict": true, "return_dict_in_generate": false, "rms_norm_eps": 1e-06, "rope_scaling": { "mrope_interleaved": true, "mrope_section": [ 24, 20, 20 ], "rope_type": "default" }, "rope_theta": 5000000, "sep_token_id": null, "suppress_tokens": null, "task_specific_params": null, "temperature": 1.0, "tf_legacy_loss": false, "tie_encoder_decoder": false, "tie_word_embeddings": false, "tokenizer_class": null, "top_k": 50, "top_p": 1.0, "torchscript": false, "typical_p": 1.0, "use_bfloat16": false, "use_cache": true, "vocab_size": 151936 }, "tf_legacy_loss": false, "tie_encoder_decoder": false, "tie_word_embeddings": false, "tokenizer_class": null, "top_k": 50, "top_p": 1.0, "torchscript": false, "typical_p": 1.0, "use_bfloat16": false, "video_token_id": 151656, "vision_config": { "add_cross_attention": false, "architectures": null, "bad_words_ids": null, "begin_suppress_tokens": null, "bos_token_id": null, "chunk_size_feed_forward": 0, "cross_attention_hidden_size": null, "decoder_start_token_id": null, "deepstack_visual_indexes": [ 8, 16, 24 ], "depth": 27, "diversity_penalty": 0.0, "do_sample": false, "dtype": "bfloat16", "early_stopping": false, "encoder_no_repeat_ngram_size": 0, "eos_token_id": null, "exponential_decay_length_penalty": null, "finetuning_task": null, "forced_bos_token_id": null, "forced_eos_token_id": null, "hidden_act": "gelu_pytorch_tanh", "hidden_size": 1152, "id2label": { "0": "LABEL_0", "1": "LABEL_1" }, "in_channels": 3, "initializer_range": 0.02, "intermediate_size": 4304, "is_decoder": false, "is_encoder_decoder": false, "label2id": { "LABEL_0": 0, "LABEL_1": 1 }, "length_penalty": 1.0, "max_length": 20, "min_length": 0, "model_type": "qwen3_vl", "no_repeat_ngram_size": 0, "num_beam_groups": 1, "num_beams": 1, "num_heads": 16, "num_position_embeddings": 2304, "num_return_sequences": 1, "out_hidden_size": 4096, "output_attentions": false, "output_hidden_states": false, "output_scores": false, "pad_token_id": null, "patch_size": 16, "prefix": null, "problem_type": null, "pruned_heads": {}, "remove_invalid_values": false, "repetition_penalty": 1.0, "return_dict": true, "return_dict_in_generate": false, "sep_token_id": null, "spatial_merge_size": 2, "suppress_tokens": null, "task_specific_params": null, "temperature": 1.0, "temporal_patch_size": 2, "tf_legacy_loss": false, "tie_encoder_decoder": false, "tie_word_embeddings": true, "tokenizer_class": null, "top_k": 50, "top_p": 1.0, "torchscript": false, "typical_p": 1.0, "use_bfloat16": false }, "vision_end_token_id": 151653, "vision_start_token_id": 151652 }}123version https://git-lfs.github.com/spec/v1oid sha256:1a579691c8d9060df3bcf94d3a3331d4267978c8f4ad986e0835cf266e5c4846size 1521832478812345678910111213141516171819202122232425262728293031323334353637383940{ "backbone_type": "prx", "resolution": 1024, "patch_size": 16, "noise_scale": 2.0, "downscale": "bilinear", "prompt": "Transform to matting map while maintaining original composition", "refiner": { "channels": 96, "dilations": [ 1, 2, 4, 8, 1, 2, 4, 8 ], "sigma": 24.0, "amplitude": 0.5 }, "backbone": { "in_channels": 3, "patch_size": 16, "context_in_dim": 2048, "hidden_size": 3584, "mlp_ratio": 3.5, "num_heads": 28, "depth": 24, "axes_dim": [ 64, 64 ], "theta": 10000, "time_factor": 1000.0, "time_max_period": 10000, "bottleneck_size": 768 }}123version https://git-lfs.github.com/spec/v1oid sha256:9bf155f619616f373ec8585d0cf04b6bb804fe01b930ad37f61926e9af604ef1size 14012835444123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172---license: apache-2.0library_name: pytorchpipeline_tag: image-segmentationtags: - image-matting - matting - alpha-matte - diffusion-transformerbase_model: - HiDream-ai/HiDream-O1-Image - Photoroom/prxpixel-t2i---
# High-Fidelity Image Matting with Pixel-Space Diffusion Transformers
[](https://white-yc.github.io/pixelmatte/)[](https://arxiv.org/abs/2611.34929)[](https://github.com/White-YC/pixelmatte)[](https://huggingface.co/spaces/WhiteYC/PixelMatte)
PixelMatte predicts an alpha matte from an image and a trimap with a pixel-space diffusion transformer, in a single networkevaluation and without a VAE. Please visit our [GitHub repository](https://github.com/White-YC/pixelmatte) for how to use thesemodels.
## Structure
```PixelMatte/βββ HiDream-8B/ built on HiDream-O1-Image, network input with short side 2048β βββ config.jsonβ βββ model.safetensorsβββ PRX-7B/ built on PRX, network input with short side 1024 βββ config.json βββ model.safetensors```
Each `model.safetensors` contains the backbone, LayerShift and the High-Pass Refiner, stored in bfloat16. No text encoder orVAE is needed.
## Usage
```pythonfrom PIL import Imagefrom pixelmatte import PixelMattePipeline # from the GitHub repository
pipe = PixelMattePipeline.from_pretrained("WhiteYC/PixelMatte", subfolder="HiDream-8B") # or subfolder="PRX-7B"alpha = pipe(Image.open("photo.jpg"), Image.open("trimap.png")) # float32 array [H, W] in [0, 1]```
The trimap is a single-channel image of the same size as the photo: 0 marks background, 255 foreground and any value inbetween (usually 128) the unknown region.
## BibTeX
```bibtex@misc{yang2026pixelmatte, title = {High-Fidelity Image Matting with Pixel-Space Diffusion Transformers}, author = {Baihan Yang and Xin Lin and Yufan Wei and Baiang Li and Yuheng Liu and Juanxi Tian and Xiaohui Xie and Truong Nguyen}, year = {2026}, eprint = {2611.34929}, archivePrefix = {arXiv}, primaryClass = {cs.CV}, url = {https://arxiv.org/abs/2611.34929}}```
## Licence
The weights are released under the Apache License 2.0. `HiDream-8B` is fine-tuned from[HiDream-O1-Image](https://huggingface.co/HiDream-ai/HiDream-O1-Image) (MIT licence) and `PRX-7B` from[PRX](https://huggingface.co/Photoroom/prxpixel-t2i) (Apache License 2.0).HiDream-8B/config.jsonAdded+277
HiDream-8B/model.safetensorsAdded+3
PRX-7B/config.jsonAdded+40
PRX-7B/model.safetensorsAdded+3
README.mdAdded+72