dflow_2b
Preview, version 0.215. The model is still training, so checkpoints and behaviour will change between releases. Generations are still uneven, expect some seed hunting.
dflow_2b is an indie text-to-image model, trained from scratch on a single GPU, mostly on photographs and classical art.
It takes ordinary captions and JSON layout captions. The layout format is close to MOSS-Image's, and MOSS-Image layouts are converted internally.
The package contains the weights, the dflow inference code and ComfyUI nodes.
Example gallery ยท Manual ยท Technical report ยท Release notes
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
What's included
model.safetensors: the 2B denoiser.text_encoder/: the part of T5Gemma 2 270M the model uses, under the Gemma Terms of Use.dflow/: the Python inference package.comfyui/: ComfyUI nodes and example workflows.
The autoencoder, dinac3_96, is our own and downloads automatically on first use. The technical report covers the architecture and training.
Requirements
Python 3.12 or later, PyTorch 2.13 with CUDA, and an NVIDIA GPU with bfloat16 support and about 7 GB of free VRAM.
Generation is compiled with torch.compile. The first image takes an extra 30
to 45 seconds while it compiles; after that, an 832ร1216 image takes about 10
seconds on an RTX 4090.
ComfyUI
The repository is a ComfyUI custom-node folder. Download it into
custom_nodes and install its requirements:
cd ComfyUI/custom_nodes
hf download data-archetype/dflow_2b --local-dir dflow_2b
pip install -r dflow_2b/requirements.txt
Load dflow_2b/comfyui/workflows/dflow_default.json, or drag any image from the
gallery onto the canvas to get the workflow that made it. Start
ComfyUI with --preview-method auto for live previews.
Python
hf download data-archetype/dflow_2b --local-dir dflow_2b
pip install -e dflow_2b
from dflow.inference import GenerationSettings
from dflow.pipeline import DFlowPipeline
pipe = DFlowPipeline.from_pretrained("dflow_2b")
image = pipe("A lighthouse on a cliff at dusk.", GenerationSettings(seed=7)).images[0]
image.save("lighthouse.png", pnginfo=pipe.png_info(image))
from_pretrained also takes the Hub id data-archetype/dflow_2b, in which case
the files go to the Hugging Face cache. If you have diffusers installed, a thin
diffusers-style wrapper is available as
dflow.diffusers_pipeline.DFlowDiffusersPipeline.
Prompts
Write captions the way you would describe a photo or a painting: the subject, the setting, the light and the medium. Long prompts are fine, up to 6,144 tokens.
Put text you want in the image in double quotes, as in
A shop sign that reads "OPEN LATE". The model reads quoted text letter by
letter, which helps with spelling.
A layout describes the picture as a whole and then lists its elements, each
with a label, a caption and a box [y0, x0, y1, x1] on a 0โ1000 scale. Text
elements carry the exact string to render:
{"summary": {"canvas": "single",
"caption": "A travel poster of a mountain above a lake."},
"frame": {"caption": "The peak sits in the upper middle.",
"palette": ["#F3E6C8", "#2F5D62"]},
"items": [
{"label": "object", "caption": "A snow-capped mountain.",
"box_2d": [250, 180, 620, 820]},
{"label": "text", "caption": "The title in tall serif capitals.",
"text": "SILVER LAKE", "box_2d": [120, 110, 220, 890]}]}
Use it as the prompt in Python, or paste it into the DFlow Layout Encode node. MOSS-Image layout prompts and editable drafts go in the same places. The manual covers every field and works through a full poster.
Limitations
- It is a preview, and quality varies from prompt to prompt and seed to seed.
- Hands and anatomy often go wrong.
- Small text and long passages of text are hit and miss.
- Above about one megapixel results get less reliable. For large images, move the self-attention gain towards 0.
- Styles far from photography and classical art are weaker.
You are responsible for how you use the model and its outputs.
Licence
- The weights, the
dflowpackage, the documentation and the gallery images: ModelGo Attribution-NonCommercial 2.0 (MG-BY-NC-2.0). SeeLICENSEandNOTICE. comfyui/and the root__init__.py: GPL-3.0. Seecomfyui/LICENSE.text_encoder/: Gemma is provided under and subject to the Gemma Terms of Use found at gemma.ai/resources/terms. A copy is intext_encoder/LICENSE-GEMMA.md.- dinac3_96 has its own licence, in its repository.
Third-party material is listed in ATTRIBUTION.md.
Citation
@misc{dflow_2b,
title = {dflow\_2b},
author = {{Data Archetype}},
year = {2026},
url = {https://huggingface.co/data-archetype/dflow_2b},
note = {Preview release, version 0.215}
}
- Downloads last month
- 26







