Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thinh-vu/ai_artist
Image generator using Stable Diffusion AI model
https://github.com/thinh-vu/ai_artist
art-generator image-generator image-prompt stable-diffusion text-to-image
Last synced: 2 months ago
JSON representation
Image generator using Stable Diffusion AI model
- Host: GitHub
- URL: https://github.com/thinh-vu/ai_artist
- Owner: thinh-vu
- License: mit
- Created: 2022-11-05T13:40:50.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-06-08T05:37:20.000Z (over 1 year ago)
- Last Synced: 2024-10-15T00:05:00.937Z (2 months ago)
- Topics: art-generator, image-generator, image-prompt, stable-diffusion, text-to-image
- Language: Jupyter Notebook
- Homepage:
- Size: 6.4 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# I. INTRODUCTION
`ai_artist` made generating images easy using the Stable Diffusion AI model.
# II. HOW TO USE THIS PROJECT
> View a quick demo video [here](https://www.youtube.com/watch?v=L6uo5F2SS9o&t=31s&ab_channel=Python%E1%BB%A8ngD%E1%BB%A5ng)## 2.1. Install this package
- Using pip to install the pre-built package on Pypip `pip install ai_artist`
- If you want to use the latest **ai_artist** version instead of the stable one, you can install it from the source with the following command:
`pip install git+https://github.com/thinh-vu/ai_artist.git@main`_(*) You might need to insert a `!` before your command when running terminal commands on Google Colab._
## 2.2. Set up your project
1. Input the Huggingface token key to the Google Colab form, run the code to save login info by the `login()` function
2. Import the whole package to your project: `from ai_artist import *`
3. Install dependencies: `!pip install transformers`
4. Set up the environment: `initialize()`
5. Set up the pipeline: `pipe = pipegen()`## 2.3. Start generating images
6. Provide your image description to the prompt: `image = image_gen("YOUR_IMAGE_DESCRIPTION", pipe)`
7. Save your image `image.save(f'INPUT_YOUR_IMAGE_NAME')`# III. RERERENCES
## 3.1. Get the HuggingFace API key**Generate a token key** with a **read** permission. Read the doc [here](https://huggingface.co/docs/hub/security-tokens)
**About Huggingface**
> [Huggingface](https://huggingface.co/about) is a community and data science platform that provides:
> - Tools that enable users to build, train and deploy ML models based on open source (OS) code and technologies.
> - A place where a broad community of data scientists, researchers, and ML engineers can come together and share ideas, get support and contribute to open source projects.## 3.2. Google Colab and GPU runtime are highly recommended
Go to the Google Colab menu: Select `Runtime` > `Change runtime type` and make sure that `GPU` has been chosen. You can run this AI model way faster with GPU on Google Colab than the normal CPU or your personal computer.![gpu_setting](https://raw.githubusercontent.com/thinh-vu/ur_audio_sub/main/src/Google%20Colab%20runtime%20GPU.png)
### Stable Diffusion & StabilityAI
- Stable Diffusion on Github: [here](https://github.com/CompVis/stable-diffusion)- Stable Diffusion prompt guide and examples [here](https://strikingloo.github.io/stable-diffusion-vs-dalle-2)
# IV. 🙋♂️ CONTACT INFORMATION
---
If you want to support my open-source projects, you can "buy me a coffee" via [Patreon](https://patreon.com/thinhvu?utm_medium=clipboard_copy&utm_source=copyLink&utm_campaign=creatorshare_creator) or Momo e-wallet (VN). Your support will help to maintain my blog hosting fee & to develop high-quality content.
Momo QR
![momo-qr](https://github.com/thinh-vu/vnstock/blob/main/src/momo-qr-thinhvu.jpeg?raw=true)