Repository navigation
feat: add Fibo 2.0 Dev and Edit Turbo support #2180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| # How to Use | ||
|
|
||
| Fibo 2.0 uses a Fibo diffusion transformer, the standard FLUX.2 VAE, and Qwen3-VL 4B as the LLM text encoder. The Qwen tokenizer is built in. | ||
|
|
||
| ## Download weights | ||
|
|
||
| - Download Fibo 2.0 Dev | ||
| - safetensors: https://huggingface.co/Comfy-Org/Fibo-2.0/tree/main/diffusion_models | ||
| - Download Fibo 2.0 Edit Turbo | ||
| - safetensors: https://huggingface.co/Comfy-Org/Fibo-2.0/tree/main/diffusion_models | ||
| - Download vae | ||
| - safetensors: https://huggingface.co/black-forest-labs/FLUX.2-dev/tree/main | ||
| - Download Qwen3-VL 4B | ||
| - safetensors: https://huggingface.co/Comfy-Org/Fibo-2.0/tree/main/text_encoders | ||
| - gguf: https://huggingface.co/Qwen/Qwen3-VL-4B-Instruct-GGUF/tree/main | ||
|
|
||
| The original Diffusers weights from [briaai/Fibo-2.0-dev](https://huggingface.co/briaai/Fibo-2.0-dev) and [briaai/Fibo-2.0-edit-turbo](https://huggingface.co/briaai/Fibo-2.0-edit-turbo) are also supported. Pass the transformer's `diffusion_pytorch_model.safetensors.index.json` to `--diffusion-model` and keep its shards alongside it. | ||
|
|
||
| INT8 convrot weights load directly; see [INT8 convrot](./int8_convrot.md) for backend requirements. | ||
|
|
||
| ## Examples | ||
|
|
||
| ### Fibo 2.0 Dev | ||
|
|
||
| Dev supports both text-to-image generation and reference-image editing. | ||
|
|
||
| ``` | ||
| .\bin\Release\sd-cli.exe --diffusion-model ..\models\diffusion_models\fibo2_dev_int8_convrot.safetensors --llm ..\models\text_encoders\Qwen3-VL-4B-Instruct-Q4_K_M.gguf --llm_vision ..\models\text_encoders\Qwen3-VL-4B-Instruct-mmproj-BF16.gguf --vae ..\models\vae\flux2_ae.safetensors -p "a lovely cat holding a sign says 'fibo2.cpp'" --cfg-scale 5.0 --sampling-method euler -v --offload-to-cpu | ||
| ``` | ||
|
|
||
| <img src="../assets/fibo2/t2i.png" /> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Add descriptive alternate text to both example images. Both Also applies to: 37-37 🧰 Tools🪛 markdownlint-cli2 (0.23.3)[warning] 31-31: Images should have alternate text (alt text) (MD045, no-alt-text) 🤖 Prompt for AI AgentsSource: Linters/SAST tools |
||
|
|
||
| ``` | ||
| .\bin\Release\sd-cli.exe --diffusion-model ..\models\diffusion_models\fibo2_dev_int8_convrot.safetensors --llm ..\models\text_encoders\Qwen3-VL-4B-Instruct-Q4_K_M.gguf --llm_vision ..\models\text_encoders\Qwen3-VL-4B-Instruct-mmproj-BF16.gguf --vae ..\models\vae\flux2_ae.safetensors -r ..\assets\flux\flux1-dev-q8_0.png -p "change 'flux.cpp' to 'fibo2.cpp'" --cfg-scale 5.0 --sampling-method euler -v --offload-to-cpu | ||
| ``` | ||
|
|
||
| <img src="../assets/fibo2/dev_edit.png" /> | ||
|
|
||
| ### Fibo 2.0 Edit Turbo | ||
|
|
||
| Edit Turbo is distilled for reference-image editing in 4 steps with CFG 1. | ||
|
|
||
| ``` | ||
| .\bin\Release\sd-cli.exe --diffusion-model ..\models\diffusion_models\fibo2_edit_turbo_int8_convrot.safetensors --llm ..\models\text_encoders\Qwen3-VL-4B-Instruct-Q4_K_M.gguf --llm_vision ..\models\text_encoders\Qwen3-VL-4B-Instruct-mmproj-BF16.gguf --vae ..\models\vae\flux2_ae.safetensors -r ..\assets\flux\flux1-dev-q8_0.png -p "change 'flux.cpp' to 'fibo2.cpp'" --cfg-scale 1 --steps 4 --sampling-method euler -v --offload-to-cpu | ||
| ``` | ||
|
|
||
| The BF16 files accept the same options. Use dimensions divisible by 16. Repeat `-r` to use multiple reference images; instructions can refer to `<image_1>`, `<image_2>`, etc. See [Image Editing](./edit.md) for reference-image preprocessing options. Separate GGUF text encoders need their vision projector passed with `--llm_vision` for editing. | ||
|
|
||
| The automatic `fibo2` reference preset combines `resize_single_ref_to_target=true`, `vae_size_buckets=true`, `vae_center_crop=true`, and `vlm_use_vae_input=true`. A single reference is scaled to cover the output dimensions and center-cropped. Multiple references use dimensions divisible by 16, chosen within ±10% of one megapixel to minimize cropping for each image's aspect ratio; `vae_input_max_pixels` overrides that target area. The VAE and vision encoder receive the same crops, with smaller copies used by the vision encoder. These are generic reference-image options and can be overridden individually: for example, `--ref-image-args vae_center_crop=false` uses direct resizing, while `resize_before_vae=false` skips this automatic crop and resize step entirely. | ||
|
|
||
| The vision encoder defaults to `vlm_resize_mode=longest_side,vlm_max_size=768`. Override these with `--ref-image-args`, for example `vlm_max_size=512`, or use `vlm_resize_mode=none` to skip size-based scaling. Vision inputs are still aligned to the encoder's patch grid. | ||
|
|
||
| Plain prompts and structured JSON captions are accepted. This integration uses the caption-only text-rendering path (`render_text_images=False`); it does not generate auxiliary glyph images or expand prompts with Bria VGL. Native Fibo mask preprocessing is not connected to `--mask`. | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -32,7 +32,7 @@ static const ModelSlot k_model_slots[] = { | |||||
| {"clip_vision", "CLIP Vision", {"clip_vision"}, &SDContextParams::clip_vision_path}, | ||||||
| {"t5xxl", "T5", {"text_encoders"}, &SDContextParams::t5xxl_path}, | ||||||
| {"llm", "LLM Text Encoder", {"text_encoders"}, &SDContextParams::llm_path}, | ||||||
| {"llm_vision", "LLM Vision Encoder", {"clip_vision"}, &SDContextParams::llm_vision_path}, | ||||||
| {"llm_vision", "LLM Vision Encoder", {"text_encoders", "clip_vision"}, &SDContextParams::llm_vision_path}, | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win Preserve the legacy For recipes without a Proposed change--- "a/examples/server/model_catalog.cpp"
+++ "b/examples/server/model_catalog.cpp"
@@ -32,7 +32,7 @@
{"clip_vision", "CLIP Vision", {"clip_vision"}, &SDContextParams::clip_vision_path},
{"t5xxl", "T5", {"text_encoders"}, &SDContextParams::t5xxl_path},
{"llm", "LLM Text Encoder", {"text_encoders"}, &SDContextParams::llm_path},
- {"llm_vision", "LLM Vision Encoder", {"text_encoders", "clip_vision"}, &SDContextParams::llm_vision_path},
+ {"llm_vision", "LLM Vision Encoder", {"clip_vision", "text_encoders"}, &SDContextParams::llm_vision_path},
{"tokenizer", "Tokenizer", {"tokenizers"}, &SDContextParams::tokenizer},
{"vae", "VAE", {"vae"}, &SDContextParams::vae_path},
{"audio_vae", "Audio VAE", {"vae"}, &SDContextParams::audio_vae_path},📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| {"tokenizer", "Tokenizer", {"tokenizers"}, &SDContextParams::tokenizer}, | ||||||
| {"vae", "VAE", {"vae"}, &SDContextParams::vae_path}, | ||||||
| {"audio_vae", "Audio VAE", {"vae"}, &SDContextParams::audio_vae_path}, | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| { | ||
| "schema_version": 1, | ||
| "id": "fibo2-dev", | ||
| "name": "Fibo 2.0 Dev", | ||
| "description": "Text-to-image generation and native reference-image editing. Select a separate vision projector for editing when it is not bundled in the text encoder.", | ||
| "model_url": "https://huggingface.co/briaai/Fibo-2.0-dev", | ||
| "slots": [ | ||
| { | ||
| "id": "diffusion_model", | ||
| "required": true | ||
| }, | ||
| { | ||
| "id": "llm", | ||
| "required": true, | ||
| "label": "Qwen 3 VL 4B Text Encoder" | ||
| }, | ||
| { | ||
| "id": "llm_vision", | ||
| "required": false, | ||
| "label": "Vision projector (required for separate GGUF text encoders)" | ||
| }, | ||
| { | ||
| "id": "vae", | ||
| "required": true, | ||
| "label": "FLUX.2 VAE" | ||
| } | ||
| ], | ||
| "defaults": { | ||
| "sampling_method": "euler", | ||
| "cfg_scale": 5, | ||
| "steps": 20, | ||
| "width": 1024, | ||
| "height": 1024 | ||
| }, | ||
| "features": [ | ||
| "flow_shift", | ||
| "ref_images" | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| { | ||
| "schema_version": 1, | ||
| "id": "fibo2-edit-turbo", | ||
| "name": "Fibo 2.0 Edit Turbo", | ||
| "description": "Dedicated reference-image editing checkpoint; supply reference images. Select a separate vision projector when it is not bundled in the text encoder.", | ||
| "model_url": "https://huggingface.co/briaai/Fibo-2.0-edit-turbo", | ||
| "slots": [ | ||
| { | ||
| "id": "diffusion_model", | ||
| "required": true | ||
| }, | ||
| { | ||
| "id": "llm", | ||
| "required": true, | ||
| "label": "Qwen 3 VL 4B Text Encoder" | ||
| }, | ||
| { | ||
| "id": "llm_vision", | ||
| "required": false, | ||
| "label": "Vision projector (required for separate GGUF text encoders)" | ||
| }, | ||
| { | ||
| "id": "vae", | ||
| "required": true, | ||
| "label": "FLUX.2 VAE" | ||
| } | ||
| ], | ||
| "defaults": { | ||
| "sampling_method": "euler", | ||
| "cfg_scale": 1, | ||
| "steps": 4, | ||
| "width": 1024, | ||
| "height": 1024 | ||
| }, | ||
| "features": [ | ||
| "flow_shift", | ||
| "ref_images" | ||
| ] | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Point the editing link to an existing heading.
docs/fibo2.mdhas no#editing-and-turboheading, so this link does not jump to the editing instructions. Link to the existing Edit Turbo heading instead.Proposed change
📝 Committable suggestion
🤖 Prompt for AI Agents