Commit Graph

189 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
filipstrand
88a541f329 Fix VLM error with transformers v.5 2025-12-03 23:54:57 +01:00
filipstrand
c5f8b73d9d Fix import 2025-12-03 22:50:02 +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
1278bafc53
Support additional Qwen LoRA naming conventions (#270) 2025-10-11 16:00:25 +02:00
Filip Strand
98e03a46f2
Add Qwen Image support (#269) 2025-10-06 07:41:14 +02:00
Anthony Wu
49af3504e6
Fix: loading non-quantized saved models (#261)
Co-authored-by: Anthony Wu <pls-file-gh-issue@users.noreply.github.com>
2025-09-08 14:30:33 +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
filipstrand
e4315ae7f9 Allow "dev-krea" alias too 2025-08-04 20:04:12 +02:00
Filip Strand
482a2d06c9
Fix bug when loading in weights after a resumed training run (#245) 2025-08-03 12:46:31 +02:00
Filip Strand
beee9b9509
Add support for FLUX.1-Krea-dev model (#241) 2025-08-03 00:41:00 +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
7df35522f5 Fix imports after empty mflux init file 2025-07-17 12:00:40 +02:00
filipstrand
7ab1e4b276 Fix PyPI upload and reorder release process
- Fix PyPI upload to only include valid distribution files (.whl and .tar.gz)
- Reorder release process to publish to PyPI before creating git tags/GitHub releases
- Prevents .gitignore upload errors and ensures cleaner rollback on PyPI failures
2025-07-17 11:36:41 +02:00
filipstrand
fd15a72cda Empty init file 2025-07-17 11:29:44 +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
a187bbbab0
🗃️ Implement Local-first behavior to be resilient when HF/network is down (#226)
Co-authored-by: Anthony Wu <pls-file-gh-issue@users.noreply.github.com>
2025-07-05 13:55:17 +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
7388a856e5
Add Flux1.Kontext[dev] support (#219) 2025-06-27 23:37:19 +02:00
Anthony Wu
b26a1d66b3
🖼️↗️ Add scale factor support for image upscaling dimensions (#215)
Co-authored-by: Anthony Wu <pls-file-gh-issue@users.noreply.github.com>
Co-authored-by: filipstrand <strand.filip@gmail.com>
2025-06-27 19:51:00 +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
filipstrand
d2296ec197 Fix error in lora_layers causing lora training to fail 2025-06-12 23:38:52 +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
Anthony Wu
c31326ff33
Support prompt text via stdin. e.g. LLMs can generate prompts that directly feed into mflux. (#204)
Co-authored-by: Anthony Wu <pls-file-gh-issue@users.noreply.github.com>
2025-06-11 07:31:46 +02:00
filipstrand
55dd6ee3e8 Reuse existing method in joint transformer 2025-06-04 22:34:06 +02:00
Filip Strand
13bfb24964
Concept Attention (#199) 2025-06-04 19:27:03 +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
Filip Strand
eff3812421
Cleanup FluxFill mask args (#195) 2025-05-22 13:02:18 +02:00
Filip Strand
bc2d73d477
DepthPro additional refactor (#193) 2025-05-20 20:20:59 +02:00
Filip Strand
477af82248
Remove PyTorch dependency for DepthPro (#192) 2025-05-20 19:32:22 +02:00
Anthony Wu
d20f2833da
🪫 Battery Saver - manage power over long batch operations (#189)
Co-authored-by: Anthony Wu <pls-file-gh-issue@users.noreply.github.com>
Co-authored-by: filipstrand <strand.filip@gmail.com>
2025-05-19 17:13:41 +02:00
Anthony Wu
4b56633e6c
Add support for --prompt-file for dynamic prompt updates in large batches (#185)
Co-authored-by: Anthony Wu <pls-file-gh-issue@users.noreply.github.com>
Co-authored-by: filipstrand <strand.filip@gmail.com>
2025-05-19 17:10:52 +02:00