FLUX.1-schnell is a cutting-edge image generation tool powered by an AI model developed by Black Forest Labs. This state-of-the-art model is available through Hugging Face’s inference API and enables users to generate high-quality, unique images based on their text prompts. This application is a MERN stack implementation of the text-to-image model using Hugging Face's inference API.
- About
- Features
- Usage
- Installation
- Configuration
- Running the Application
- Contributing
FLUX.1-schnell interprets complex text descriptions to create visually stunning images, offering a versatile tool for creative professionals, marketers, and artists. This project applies web development, APIs, and the MERN stack to test full-stack solution-building skills in an exciting AI-driven project.
- Text-to-Image Generation: Generate images from text prompts using the FLUX.1-schnell AI model.
- Gallery Storage: Last 20 generated images saved in local storage.
- Full-Screen View: View images in full-screen mode.
- Request Limits: Up to 10 image generation requests per user per hour, with a global limit of 25 requests per hour.
- Enter a Prompt: Type a description of the image you want to create.
- Generate Image: Click "Generate Image" to start the process.
- Wait for the Result: Image generation takes just a few seconds.
- View the Generated Image: Your image will be displayed below the form.
- Gallery Storage: View the last 20 generated images in the Gallery.
- Request Limits: Up to 10 requests per user per hour, with a global limit of 25 requests per hour.
- Node.js (v14 or higher)
- npm (v6 or higher)
git clone https://github.com/M-YasirGhaffar/flux.1-schnell-ai-image-generator
cd flux.1-schnell-ai-image-generator
Navigate to both the client and server directories and install the dependencies:
cd client
npm install
cd ../server
npm install
Create a .env
file in both the
client
and
server
directories based on the .env.example
files provided.
VITE_API_URL=https://your-api-url.com/api/generate-image/
PORT=8000
HUGGING_FACE_API_KEY=your-hugging-face-api-key
cd server
npm start
In a new terminal window:
cd client
npm run dev
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.