This repository contains the code for an Instagram AI bot that generates and posts anime pictures. The bot utilizes a deep learning model, specifically a Denoising Diffusion Probabilistic Model (DDPM), implemented with PyTorch. The generated images are then automatically posted to Instagram: Dailly Anime DDPM.
- Generate high-quality anime images using a DDPM.
- Automatically post generated images to an Instagram account.
- Customizable posting schedule.
-
Clone the repository:
git clone https://github.com/Kazedaa/Daily-DDPM-Anime cd Daily-DDPM-Anime
-
Create and activate a virtual environment:
conda create -n anime_ddpm python=3.10 conda activate anime_ddpm
-
Install the required dependencies:
pip install -r requirements.txt
-
Set up Instagram credentials:
Create a
.env
file in the root directory of the project and add your Instagram credentials:INSTAGRAM_USERNAME=your_instagram_username INSTAGRAM_PASSWORD=your_instagram_password
-
Generate and post an image:
python post.py
-
Schedule automatic posting:
Use a task scheduler (like cron jobs on Unix systems or Task Scheduler on Windows) to run the
post_image.py
script at your desired intervals.
DDPMs are generative models that use a diffusion process to generate high-quality images. The process involves gradually adding noise to training data and then learning to reverse this process to create new data samples. The model was trained on several Anime face images from the Dataset: Anime Face Dataset.
The model is built using PyTorch and follows the standard DDPM architecture:
- Forward Diffusion Process: Adds Gaussian noise to the images over a series of timesteps.
- Reverse Diffusion Process: Trains a neural network to denoise the images, step by step, to generate new samples.
- U-Net Backbone: A simple Unet with Alternating Residual and Attention Block along with Sinusoidal Positional Embedding.
- Noise Schedule: Controls the amount of noise added at each time step during the forward process a Linear Noise Schedule was used.
- Loss Function: Mean Squared Error (MSE) between the denoised output and the original image.
Note: The Instagram account is no longer active since Instagram banned the proxy. If you have any solutions please feel free to post an Issue or contact me (the Author).