This script, vae_sd1.5_image_gen_loop.py, generates images using Variational Autoencoder (VAE) and Stable Diffusion 1.5 (SD1.5) models in a loop. It leverages the IP-Adapter for enhanced face ID processing. The script ensures the setup of necessary dependencies, checks for sufficient disk space, and processes images with specified models to generate high-fidelity outputs.
incoming_images directory multiple times based on the specified number of loops.Clone Repository and Set Up Virtual Environment (Optional):
cd vae_sd1.5_image_gen_pipeline
python -m venv kumori_venv
source kumori_venv/bin/activate # On Windows use `.\kumori_venv\Scripts\activate`
Install Dependencies: The script will automatically install required dependencies during execution.
Ensure Necessary Files:
Place any initial images for processing in the shared/incoming_images directory.
Set Global Variables:
Edit the following section in vae_sd1.5_image_gen_loop.py to configure prompts, image dimensions, and generation parameters:
# ###########################
# #### GLOBAL VARIABLES ####
# ###########################
# Prompt configuration
PROMPT = "human"
NEGATIVE_PROMPT = "(deformed iris, deformed pupils, semi-realistic), text, (worst quality:2), (low quality:2), (normal quality:2), jpeg artifacts, ugly, duplicate, morbid, mutilated, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, mutation, deformed, blurry, dehydrated, bad anatomy, bad proportions, extra limbs, cloned face, disfigured, gross proportions, malformed limbs, missing arms, missing legs, extra arms, extra legs, fused fingers, too many fingers, flash, text"
# Image generation parameters
NUM_SAMPLES = 2 # Number of samples to generate per image
IMAGE_WIDTH = 1024 # Width of output images
IMAGE_HEIGHT = 1024 # Height of output images
NUM_INFERENCE_STEPS = 50 # Number of inference steps for image generation
# Loop configuration
NUM_LOOPS = 3 # Number of loops to repeat the process
# ###########################
Run the Script: Execute the script to start the image generation process:
python vae_sd1.5_image_gen_loop.py
Generated Images:
The generated images will be saved in the generated_images directory.
Debug Images:
Any debug images will be saved in the debug_images directory (if enabled in the code).
2 commits
Python
100.0%
This script, vae_sd1.5_image_gen_loop.py, generates images using Variational Autoencoder (VAE) and Stable Diffusion 1.5 (SD1.5) models in a loop. It leverages the IP-Adapter for enhanced face ID processing. The script ensures the setup of necessary dependencies, checks for sufficient disk space, and processes images with specified models to generate high-fidelity outputs.
incoming_images directory multiple times based on the specified number of loops.Clone Repository and Set Up Virtual Environment (Optional):
cd vae_sd1.5_image_gen_pipeline
python -m venv kumori_venv
source kumori_venv/bin/activate # On Windows use `.\kumori_venv\Scripts\activate`
Install Dependencies: The script will automatically install required dependencies during execution.
Ensure Necessary Files:
Place any initial images for processing in the shared/incoming_images directory.
Set Global Variables:
Edit the following section in vae_sd1.5_image_gen_loop.py to configure prompts, image dimensions, and generation parameters:
# ###########################
# #### GLOBAL VARIABLES ####
# ###########################
# Prompt configuration
PROMPT = "human"
NEGATIVE_PROMPT = "(deformed iris, deformed pupils, semi-realistic), text, (worst quality:2), (low quality:2), (normal quality:2), jpeg artifacts, ugly, duplicate, morbid, mutilated, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, mutation, deformed, blurry, dehydrated, bad anatomy, bad proportions, extra limbs, cloned face, disfigured, gross proportions, malformed limbs, missing arms, missing legs, extra arms, extra legs, fused fingers, too many fingers, flash, text"
# Image generation parameters
NUM_SAMPLES = 2 # Number of samples to generate per image
IMAGE_WIDTH = 1024 # Width of output images
IMAGE_HEIGHT = 1024 # Height of output images
NUM_INFERENCE_STEPS = 50 # Number of inference steps for image generation
# Loop configuration
NUM_LOOPS = 3 # Number of loops to repeat the process
# ###########################
Run the Script: Execute the script to start the image generation process:
python vae_sd1.5_image_gen_loop.py
Generated Images:
The generated images will be saved in the generated_images directory.
Debug Images:
Any debug images will be saved in the debug_images directory (if enabled in the code).
2 commits
Python
100.0%