Aller au contenu
ModelPrésentéExterne
Télécharger

Self Flow Diffusers

Diffusers-ready checkpoints for Self-Flow (Self-Supervised Flow Matching), converted from the official Self-Flow release for local/offline use.

TypeOtherVersiondiffusion_pytorch_modelBClasse

Source du modèle

Type
Other
Taille du fichier
319 MB
Version
vdiffusion_pytorch_model
Mis à jour
9 oct. 2026
Source
Hugging Face

Description de la source

Self-Flow-diffusers

Diffusers-ready checkpoints for Self-Flow (Self-Supervised Flow Matching), converted from the official Self-Flow release for local/offline use.

This root folder is a model collection that contains:

  • Self-Flow-XL-2-256

Each subfolder is a self-contained Diffusers model repo with:

  • pipeline.py (SelfFlowPipeline)
  • transformer/transformer_selfflow.py and weights
  • scheduler/scheduling_flow_match_selfflow.py (SelfFlowFlowMatchScheduler, SDE flow matching)
  • scheduler/scheduler_config.json
  • vae/ (stabilityai/sd-vae-ft-ema)

Each variant embeds English id2label in model_index.json, so class labels can be passed as ImageNet ids or English synonym strings.

Demo

Self-Flow-XL-2-256 demo

Class-conditional sample (ImageNet class 207, golden retriever), Self-Flow-XL/2 at 256×256, 250 steps, CFG 3.5, seed 42.

Model Paths

Use paths relative to this root README:

ModelResolutionLocal path
Self-Flow-XL/2256×256./Self-Flow-XL-2-256

Recommended inference

SettingValue
Resolution256×256
SamplerSelf-Flow SDE flow matching
Steps250
CFG scale3.5
Guidance interval(0.0, 0.7) when CFG > 1
Dtypebfloat16 (recommended on Ampere+)
VAEstabilityai/sd-vae-ft-ema

Inference Demo (Diffusers)

from pathlib import Path
import torch
from diffusers import DiffusionPipeline

model_dir = Path("./Self-Flow-XL-2-256").resolve()
device = "cuda" if torch.cuda.is_available() else "cpu"

pipe = DiffusionPipeline.from_pretrained(
    str(model_dir),
    local_files_only=True,
    custom_pipeline=str(model_dir / "pipeline.py"),
    trust_remote_code=True,
    torch_dtype=torch.bfloat16,
)
pipe.to(device)

generator = torch.Generator(device=device).manual_seed(42)

print(pipe.id2label[207])
print(pipe.get_label_ids("golden retriever"))  # [207]

image = pipe(
    class_labels="golden retriever",
    num_inference_steps=250,
    guidance_scale=3.5,
    generator=generator,
).images[0]
image.save("self_flow_xl_256_demo.png")

Sources

1 source
Hugging FacePrincipalVersion eca8fd204a01a85ae6db2684ca55c90f8dc62bc4
huggingface.co/BiliSakura/Self-Flow-diffusers/tree/eca8fd204a01a85ae6db2684ca55c90f8dc62bc4

Vérifié 9 oct.

Artefacts du modèle

1 artefact

Self-Flow-XL-2-256/vae/diffusion_pytorch_model.safetensors

safetensors · 319 MB · SHA-256 703abdcd7c38…30c4 · Hugging Face

Download file

Extraits de sources

2 extraits

--- library_name: diffusers pipeline_tag: unconditional-image-generation tags: - diffusers - self-flow - image-generation - class-conditional - imagenet - flow-matching license: apache-2.0 inference: true widget: - output: url: Self-Flow-XL-2-256/demo.png language: - en --- # Self-Flow-diffusers Diffusers-ready checkpoints for **Self-Flow** (Self-Supervised Flow Matching), converted from the [official Self-Flow release](https://github.com/black-forest-labs/Self-Flow) for local/offline use. This root folder is a model collection that contains: - `Self-Flow-XL-2-256` Each subfolder is a self-contained Diffusers model repo with: - `pipeline.py` (`SelfFlowPipeline`) - `transformer/transformer_selfflow.py` and weights - `scheduler/scheduling_flow_match_selfflow.py` (`SelfFlowFlowMatchScheduler`, SDE flow matching) - `scheduler/scheduler_config.json` - `vae/` (`stabilityai/sd-vae-ft-ema`) Each variant embeds English `id2label` in `model_index.json`, so class labels can be passed as ImageNet ids or English synonym strings. ## Demo ![Self-Flow-XL-2-256 demo](Self-Flow-XL-2-256/demo.png) Class-conditional sample (ImageNet class **207**, golden retriever), `Self-Flow-XL/2` at 256×256, 250 steps, CFG 3.5, seed 42. ## Model Paths Use paths relative to this root README: | Model | Resolution | Local path | | --- | ---: | --- | | Self-Flow-XL/2 | 256×256 | `./Self-Flow-XL-2-256` | ## Recommended inference | Setting | Value | | --- | --- | | Resolution | 256×256 | | Sampler | Self-Flow SDE flow matching | | Steps | 250 | | CFG scale | 3.5 | | Guidance interval | `(0.0, 0.7)` when CFG > 1 | | Dtype | `bfloat16` (recommended on Ampere+) | | VAE | `stabilityai/sd-vae-ft-ema` | ## Inference Demo (Diffusers) ```python from pathlib import Path import torch from diffusers import DiffusionPipeline model_dir = Path("./Self-Flow-XL-2-256").resolve() device = "cuda" if torch.cuda.is_available() else "cpu" pipe = DiffusionPipeline.from_pretrained( str(model_dir), local_files_only=True, custom_pipeline=str(model_dir / "pipeline.py"), trust_remote_code=True, torch_dtype=torch.bfloat16, ) pipe.to(device) generator = torch.Generator(device=device).manual_seed(42) print(pipe.id2label[207]) print(pipe.get_label_ids("golden retriever")) # [207] image = pipe( class_labels="golden retriever", num_inference_steps=250, guidance_scale=3.5, generator=gener...

Source context: 0 downloads · 0 likes · Pipeline unconditional-image-generation · Library diffusers · Repo BiliSakura/Self-Flow-diffusers