Skip to content

deepanshu9012/Text_to_Image_Generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

9 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Text-to-Image Generator with Stable Diffusion

This project is a simple, yet powerful, text-to-image generator built using the Hugging Face Diffusers library and Google Colab. It allows users to create high-quality images from text prompts using the Stable Diffusion model.

Features

  • Easy Setup: All dependencies are installed directly within the notebook.
  • Secure Authentication: Uses Google Colab's built-in secrets manager to securely handle your Hugging Face token.
  • GPU Accelerated: Leverages Google Colab's T4 GPU for fast image generation.
  • Interactive: Prompts the user for a text description to generate a unique image.

Getting Started ๐Ÿš€

To run this project, you will need a Google account and a Hugging Face account.

Prerequisites

  • A Google Account to access Google Colab.
  • A Hugging Face Account to get an access token.

Setup Instructions

  1. Open the Notebook in Colab: Click the "Open in Colab" badge at the top of the notebook file on GitHub.

  2. Get Your Hugging Face Token:

    • Log in to your Hugging Face account.
    • Navigate to Settings > Access Tokens.
    • Create a new token with a Read or Fine-grained role (and Inference permissions if using the latter).
    • Copy your new token.
  3. Store the Token as a Colab Secret:

    • In the Colab notebook, click the ๐Ÿ”‘ icon on the left-hand side to open the Secrets panel.
    • Click "Add new secret."
    • For the Name, use HF_TOKEN. For the Value, paste the token you just copied.
    • Ensure "Notebook access" is toggled on.
  4. Run the Notebook:

    • Run all the cells in the notebook (Runtime > Run all).
    • The notebook will install the necessary libraries and load the Stable Diffusion model.
    • When prompted, enter your image description, and the generator will produce an image for you!

Project Structure

  • Text_to_Image_Generator.ipynb: The main Colab notebook containing all the code.
  • README.md: This file, which provides an overview of the project.

Contributing

This is a simple project, but contributions are welcome! If you find any bugs or have suggestions for improvements, please open an issue or submit a pull request.

About

Text to Image Generator using GenAi

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors