This project is a web application that generates realistic images using the Flux AI model. It features a Next.js frontend with ShadCN UI components and a Node.js backend with Express.
- Generate realistic images based on text prompts
- Customize image generation parameters:
- Aspect ratio
- Number of outputs
- Inference steps
- Guidance
- Seed
- Output format and quality
- Option to disable safety checker for uncensored results
- Responsive design with a starry background
- Frontend:
- Next.js 14
- React 18
- ShadCN UI components
- Tailwind CSS
- Backend:
- Node.js
- Express
- Replicate API for AI image generation
- Node.js (v14 or later)
- npm (v6 or later)
-
Clone the repository:
git clone https://github.com/your-username/flux-image-generator.git cd flux-image-generator
-
Install frontend dependencies:
cd frontend npm install
-
Install backend dependencies:
cd ../backend npm install
-
Set up environment variables: Create a
.env
file in the backend directory with your Replicate API token:REPLICATE_API_TOKEN=your_api_token_here
-
Start the backend server:
cd backend node index.js
-
In a new terminal, start the frontend development server:
cd frontend npm run dev
-
Open your browser and navigate to
http://localhost:3000
to use the application.
- Enter a text prompt describing the image you want to generate.
- Adjust the generation parameters as desired.
- Click the "Generate Image" button.
- Wait for the image to be generated and displayed.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.