Skip to content

Add image gen recipe#102

Draft
dunnoconnor wants to merge 1 commit intomainfrom
mdoc/flux2
Draft

Add image gen recipe#102
dunnoconnor wants to merge 1 commit intomainfrom
mdoc/flux2

Conversation

@dunnoconnor
Copy link
Copy Markdown
Member

This pull request introduces a new backend API for text-to-image generation using OpenAI-compatible diffusion models and makes minor dependency metadata adjustments in the frontend. The main focus is the addition of an image_generation recipe and API endpoint, enabling the generation of images from text prompts with configurable parameters and performance tracking.

Backend: Text-to-Image Generation Feature

  • New image generation API and implementation:
    • Added image_generation.py under src/recipes, providing a FastAPI endpoint (/api/recipes/image-generation) for generating images from text prompts using OpenAI-compatible endpoints. Supports configurable parameters (resolution, steps, guidance scale, negative prompts), returns base64-encoded images, and tracks generation duration. Also includes an endpoint to fetch the recipe's source code for frontend display.
    • Registered the new router in main.py to make the image generation endpoints available. [1] [2]

Frontend: Dependency Metadata Adjustments

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