Commit Graph

79 Commits

Author SHA1 Message Date
Zimeng Xiong
fe6936449d Add Qwen-Image-Layered support for image decomposition into RGBA layers
This PR adds support for the Qwen-Image-Layered model, which decomposes an input
image into semantically disentangled RGBA layers for layer-based editing workflows.

## Features
- New CLI command: \`mflux-generate-qwen-layered\`
- Decomposes images into N RGBA layers (default 4)
- Supports 6-bit quantization for ~29GB memory usage (vs 55GB BF16)
- Resolution buckets: 640 and 1024

## Architecture
- RGBA-VAE (4-channel) with 3D temporal convolutions for layer handling
- Layer3D RoPE: 3D positional encoding [layer, height, width]
- Uses base QwenTransformer with extended RoPE for multi-layer sequences
- Condition image encoded as layer_index=-1 for proper decomposition

## New Files
- \`src/mflux/models/qwen_layered/\` - Full model implementation
  - \`model/qwen_layered_vae/\` - RGBA-VAE encoder/decoder
  - \`model/qwen_layered_transformer/\` - Layer3D RoPE
  - \`weights/\` - Weight mapping and definitions
  - \`variants/i2l/\` - Image-to-Layers pipeline
  - \`cli/\` - Command-line interface

## Usage
\`\`\`sh
mflux-generate-qwen-layered \\
  --image input.png \\
  --layers 4 \\
  --steps 50 \\
  -q 6 \\
  --output-dir ./layers
\`\`\`

## Documentation
Added comprehensive documentation to README.md including:
- TOC entry
- CLI argument reference
- Usage examples and tips
- Memory requirements

Tested on M4 Max 48GB with 6-bit quantization.
2025-12-22 08:08:20 -08:00
Filip Strand
0ade9a504c
Fix/lora save bloat (#293) 2025-12-06 19:35:57 +01:00
Filip Strand
f45082f880
Small LoRA improvements (#291) 2025-12-05 03:18:27 +01:00
Filip Strand
a404632d07
Release 0.13.1 (#290) 2025-12-04 00:45:24 +01:00
Filip Strand
8e5609132c
Release 0.13.0 (#289) 2025-12-03 22:40:44 +01:00
Filip Strand
6551e9f6a1
Update dependencies (#288) 2025-12-03 22:13:55 +01:00
Filip Strand
37d202d0df
Add support for Z-image Turbo & major improvements for weight loading and parameter resolution (#284) 2025-12-03 15:19:32 +01:00
Filip Strand
eb83175680
Fix: Auto-download tokenizer files for FIBO-vlm when missing (#283) 2025-11-27 18:15:56 +01:00
Filip Strand
2e28a987c7
Release 0.12.0 (#282) 2025-11-27 16:30:37 +01:00
Filip Strand
c2c860f4de
Add Bria FIBO support (#279)
Co-authored-by: Filip Strand <filip@host-022.local>
2025-11-27 13:01:55 +01:00
Filip Strand
2e92984125
Release 0.11.1 (#278)
Co-authored-by: Filip Strand <filip@Host-022.local>
2025-11-13 01:05:29 +01:00
Filip Strand
d4005efac0
Rename QwenImageEditPlus to QwenImageEdit (#277)
Co-authored-by: Filip Strand <filip@Host-022.local>
2025-11-11 17:07:36 +01:00
Filip Strand
bb5392ef2d
Remove legacy QwenImageEdit model, keep only QwenImageEditPlus (#276)
Co-authored-by: Filip Strand <filip@Host-022.local>
2025-11-11 16:38:02 +01:00
Filip Strand
f9768b2e1c
Qwen image edit (#274)
Co-authored-by: Filip Strand <filip@Host-022.local>
2025-11-11 16:25:58 +01:00
Filip Strand
d314aa6889
Release 0.11.0 (#271) 2025-10-14 00:34:27 +02:00
Alessandro Rizzo
83354c3921
Add XMP/IPTC metadata support (#267)
Co-authored-by: filipstrand <strand.filip@gmail.com>
2025-10-12 14:45:28 +02:00
Anthony Wu
6947a23d6c
Scheduler interface implementation. Implement pre-existing linear scheduler only. (#258)
Co-authored-by: Anthony Wu <pls-file-gh-issue@users.noreply.github.com>
Co-authored-by: filipstrand <strand.filip@gmail.com>
2025-10-12 12:20:40 +02:00
Filip Strand
98e03a46f2
Add Qwen Image support (#269) 2025-10-06 07:41:14 +02:00
Anthony Wu
8c2cefdd51
Update tests/image_generation image comparison logic to allow similar images that are _close enough_ (#263)
Co-authored-by: Anthony Wu <pls-file-gh-issue@users.noreply.github.com>
Co-authored-by: filipstrand <strand.filip@gmail.com>
2025-09-08 16:49:54 +02:00
Anthony Wu
0d9af4f380
Python 3.13 sentencepiece and torch unblocked (#259)
Co-authored-by: Anthony Wu <pls-file-gh-issue@users.noreply.github.com>
2025-08-31 22:06:26 +02:00
Anthony Wu
aca69703d3
make mflux a namespace package (prepare for mflux.mcp) (#249)
Co-authored-by: Anthony Wu <pls-file-gh-issue@users.noreply.github.com>
2025-08-23 15:21:46 +02:00
Filip Strand
beee9b9509
Add support for FLUX.1-Krea-dev model (#241) 2025-08-03 00:41:00 +02:00
filipstrand
d4c6acc97a Set mflux version to 0.9.6 2025-07-20 12:04:02 +02:00
Filip Strand
d20f623581
Proper: Revert back to mlx==0.26.1 (#239) 2025-07-20 12:01:01 +02:00
filipstrand
eba6c64f60 Revert "Release 0.9.6 (#238)"
This reverts commit dc3a564b51.
2025-07-20 11:58:55 +02:00
Filip Strand
dc3a564b51
Release 0.9.6 (#238) 2025-07-20 11:58:37 +02:00
filipstrand
3073b9feea Release 0.9.5 with import fixes 2025-07-17 12:07:41 +02:00
Filip Strand
3c5df450cc
Release v.0.9.4 (#237) 2025-07-17 11:12:53 +02:00
Anthony Wu
42bf9e3d4d
Hot Fix: coldstart weight download (version 0.9.3) (#235) 2025-07-08 20:19:34 -07:00
Anthony Wu
842be6dde2
🏗️ uv build backend update (#232)
Co-authored-by: Anthony Wu <pls-file-gh-issue@users.noreply.github.com>
2025-07-07 08:22:49 +02:00
Filip Strand
b86a5bae30
Release 0.9.1 (#230) 2025-07-04 18:34:52 +02:00
Anthony Wu
11beed80df
🧹 Cleanup/bump pre-commits; intro mypy config, quick type ignores/fixes (#221)
Co-authored-by: Anthony Wu <pls-file-gh-issue@users.noreply.github.com>
2025-07-04 00:40:20 +02:00
Filip Strand
b250cdd922
Release 0.9 (#222) 2025-06-28 00:03:01 +02:00
Filip Strand
7388a856e5
Add Flux1.Kontext[dev] support (#219) 2025-06-27 23:37:19 +02:00
Anthony Wu
0125103634
➡️➡️ Tab Tab for zsh: CLI completion generator (#208)
Co-authored-by: Anthony Wu <pls-file-gh-issue@users.noreply.github.com>
Co-authored-by: filipstrand <strand.filip@gmail.com>
2025-06-27 15:48:51 +02:00
Anthony Wu
6c3ba1e065
🗂️ Cache Refactor - use platformdirs helper (#201)
Co-authored-by: Anthony Wu <pls-file-gh-issue@users.noreply.github.com>
2025-06-27 13:59:43 +02:00
Filip Strand
9a20e83331
Small additions before 0.8.0 (#209) 2025-06-14 10:02:04 +02:00
Filip Strand
847404748f
Generalise in-context functionality (#203)
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: filipstrand <filipstrand@users.noreply.github.com>
2025-06-12 09:01:07 +02:00
Filip Strand
13bfb24964
Concept Attention (#199) 2025-06-04 19:27:03 +02:00
Filip Strand
aaae64ad6e
Bump MLX version (#200) 2025-06-04 16:35:40 +02:00
Anthony Wu
d3e71328b2
LORA_LIBRARY_PATH for Unix-style resource discovery (#198)
Co-authored-by: Anthony Wu <pls-file-gh-issue@users.noreply.github.com>
Co-authored-by: filipstrand <strand.filip@gmail.com>
2025-06-04 16:33:31 +02:00
Filip Strand
fa56f33161
Add upscaling support (#184) 2025-05-22 19:40:27 +02:00
filipstrand
63bf8710d1 v.0.7.1 2025-05-06 07:09:51 +02:00
filipstrand
2039d0fc54 v.0.7.0 2025-04-25 10:54:42 +02:00
filipstrand
74ab9acf15 Remove torchvision dependency 2025-04-24 15:43:38 +02:00
filipstrand
d376f9c931 FLUX.1 Tools | Redux & Depth 2025-04-24 09:08:21 +02:00
filipstrand
80b1bcc353 Bump upper mlx version 2025-04-19 12:59:56 +02:00
filipstrand
b9615e0d19 Bump upper mlx version 2025-03-29 13:36:05 +01:00
filipstrand
d4d98186e2 FLUX.1 Tools | Fill 2025-03-16 11:12:34 +01:00
filipstrand
4f88376830 v.0.6.2 2025-03-13 22:11:16 +01:00