Words to Images: Instantly.
Built with the tools and technologies:
This project generates unique product images from randomly generated names. Using AI, it combines text-to-image generation with a streamlined workflow, creating novel visuals for marketing, design, or creative exploration. Ideal for designers, marketers, or anyone needing quick, visually appealing product mockups.
Feature | Summary | |
---|---|---|
⚙️ | Architecture |
|
🔌 | Integrations |
|
└── text-to-image-item-generator/
├── environment.yml
├── main.py
├── nice_images_generated
└── pytorch-check.py
TEXT-TO-IMAGE-ITEM-GENERATOR/
__root__
environment.yml - environment.yml specifies the project's Python environment, ensuring reproducibility
- It defines necessary packages for text-to-image generation, including PyTorch with CUDA 11.8 support, Hugging Face libraries (Transformers, Diffusers), and related dependencies
- This file facilitates consistent setup across different machines, enabling seamless execution of the text-to-image generation application.main.py - The program generates a short, random product name using a large language model
- It then leverages a diffusion model to create and display an image based on this generated name
- The process incorporates random seed generation for variability and utilizes a pre-trained model for both text and image generation, offering a streamlined workflow for creative content generation.pytorch-check.py - Pytorch-check.py verifies PyTorch and CUDA installations
- It reports the PyTorch version, CUDA version used during PyTorch's build, and CUDA availability
- This pre-flight check ensures the necessary deep learning dependencies are correctly configured before executing the main application, preventing runtime errors.
Before getting started with text-to-image-item-generator, ensure your runtime environment meets the following requirements:
- Programming Language: Python 3.11
- Package Manager: Conda
- Architecture: CUDA 11.8 (You can find different architectures and versions on the official PyTorch website - check
main.py
comments for links) - Disk Space: ~60GB - local models and environment dependencies + a few GB for necessary tools
Install text-to-image-item-generator using the following method:
- Clone the text-to-image-item-generator repository:
git clone https://github.com/Eyelor/text-to-image-item-generator
- Navigate to the project directory:
cd text-to-image-item-generator
- Install the project dependencies:
Before doing this, you can check which architecture is best for your GPU or CPU. In my case, for the RTX 20xx series, CUDA 11.8 was the best choice. Do your research to find the right architecture for your hardware and choose compatible versions for other dependencies accordingly in the environment.yml
file.
Using conda
conda env create -f environment.yml
Run text-to-image-item-generator using the following commands:
Using conda
conda activate text-to-image-item-generator_env
Using python
python main.py
If something is not working properly, check the files for comments.
Run the configuration test using the following command:
Using python
python pytorch-check.py
Based on the response from this test, you can see which versions of PyTorch
and CUDA
you are using and whether they are available.
This project is protected under the Apache 2.0 License. For more details, refer to the LICENSE file.