Skip to content

Add SeFi-Image pipeline#14084

Open
jmliu206 wants to merge 1 commit into
huggingface:mainfrom
jmliu206:sefi-image-diffusers
Open

Add SeFi-Image pipeline#14084
jmliu206 wants to merge 1 commit into
huggingface:mainfrom
jmliu206:sefi-image-diffusers

Conversation

@jmliu206

@jmliu206 jmliu206 commented Jun 29, 2026

Copy link
Copy Markdown

What does this PR do?

Adds Diffusers support for SeFi-Image, including:

  • SeFiTransformer2DModel
  • SeFiPipeline
  • a conversion script for original SeFi checkpoints
  • API docs and ToC entries
  • fast model and pipeline tests

The pipeline supports loading converted SeFi checkpoints via from_pretrained, Qwen3-VL prompt encoding, SeFi dual-time denoising, classifier-free guidance for non-turbo checkpoints, turbo step validation, real checkpoint conversion, and model CPU offload.

Validation

PYTHONPATH=src python -m pytest tests/models/transformers/test_models_transformer_sefi.py tests/pipelines/sefi/test_pipeline_sefi.py -q
# 50 passed, 3 skipped, 6 warnings in 103.23s

PYTHONPATH=src ruff check docs/source/en/api/models/sefi_transformer2d.md docs/source/en/api/pipelines/sefi.md scripts/convert_sefi_to_diffusers.py src/diffusers/models/transformers/transformer_sefi.py src/diffusers/pipelines/sefi tests/models/transformers/test_models_transformer_sefi.py tests/pipelines/sefi/test_pipeline_sefi.py
# All checks passed!

PYTHONPATH=src ruff format --check scripts/convert_sefi_to_diffusers.py src/diffusers/models/transformers/transformer_sefi.py src/diffusers/pipelines/sefi tests/models/transformers/test_models_transformer_sefi.py tests/pipelines/sefi/test_pipeline_sefi.py
# 7 files already formatted

git diff --check
# passed

Before submitting

  • Did you use an AI agent (Claude Code, Codex, Cursor, etc.) to help with this PR? If so:
  • Did you read the contributor guideline?
  • Did you read our philosophy doc? (important for complex PRs)
  • Was this discussed/approved via a GitHub issue or the forum? Please add a link to it if that's the case.
    Add SeFi-Image pipeline #14086
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?
  • Are you the author (or part of the team) of the model/pipeline (only applicable for model/pipeline related PRs)?

Who can review?

Potential reviewers for pipelines/models: @yiyixuxu @dg845 @asomoza

@github-actions github-actions Bot added documentation Improvements or additions to documentation models tests utils pipelines size/L PR with diff > 200 LOC labels Jun 29, 2026
@jmliu206 jmliu206 mentioned this pull request Jun 29, 2026
2 tasks
@jmliu206 jmliu206 marked this pull request as ready for review June 29, 2026 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation models pipelines size/L PR with diff > 200 LOC tests utils

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant