generate_background module#
Generate AI-enhanced images for each image in the output directory.
- generate_background.generate_background(image_file: str, mask_file: str, output_path: str, prompt: str, negative_prompt: str, device: str, pipe: <Mock name='mock.AutoPipelineForInpainting' id='140390611187312'>) None [source]#
Generate and save an enhanced image using a diffusion model for a given image and mask.
- Parameters:
image_file – The path to the image file.
mask_file – The path to the mask file corresponding to the image.
output_path – The path to save the enhanced image.
prompt – The prompt to generate the enhanced image.
device – cpu or cuda (if available).
pipe – The diffusion model.