Skip to content

feat: add diffusers loader for OpenAI-compatible image generation#6

Merged
alez007 merged 2 commits intomainfrom
feat/diffusers-image-generation
Apr 6, 2026
Merged

feat: add diffusers loader for OpenAI-compatible image generation#6
alez007 merged 2 commits intomainfrom
feat/diffusers-image-generation

Conversation

@alez007
Copy link
Copy Markdown
Owner

@alez007 alez007 commented Apr 6, 2026

What

Add a new diffusers loader for plug-and-play image generation models via HuggingFace Diffusers' AutoPipelineForText2Image. Exposes a new POST /v1/images/generations endpoint returning base64-encoded PNGs.

Why

Fixes lack of support for image generation

How to Test

Run tests

Checklist

  • ruff check . passes
  • ruff format --check . passes
  • pyright passes

Alex M added 2 commits April 6, 2026 04:03
Add a new `diffusers` loader for plug-and-play image generation models
via HuggingFace Diffusers' AutoPipelineForText2Image. Exposes a new
POST /v1/images/generations endpoint returning base64-encoded PNGs.

- Add `image` usecase and `diffusers` loader to config enums
- Add DiffusersConfig (torch_dtype, num_inference_steps, guidance_scale)
- Add DiffusersInfer backend following TransformersInfer pattern
- Add OpenAIServingImage serving layer with run_in_executor for GPU calls
- Add ImageGenerationRequest/Response protocol models
- Add create_image_generation stubs to vllm/transformers/custom backends
- Make model and loader mandatory fields in YashaModelConfig
- Return all models in /v1/models regardless of usecase
- Add accelerate and diffusers dependencies
- Update docs and README
@alez007 alez007 merged commit 8b49de2 into main Apr 6, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant