ig-follower to download all images of post in instagram which is developed by myself.def png_add_random_background(image_path:str, out_dir:str):
img = Image.open(image_path)
path = Path(image_path)
if not path.is_file() and not path.suffix.endswith('.png'):
print("This is not a PNG file")
return
background_color = random.choice(background_colors)
image_size = img.size
if img.size[0] > img.size[1]:
image_size = (image_size[0],image_size[0])
elif image_size[1] > image_size[0]:
image_size = (image_size[1],image_size[1])
bg = Image.new("RGB", image_size, background_color)
bg.paste(img, mask=img.split()[-1])
if out_dir[-1] != "/":
out_dir += "/"
print(path.stem)
bg.save(f"{out_dir}{path.stem}.png", "PNG")
kohya-LoRA-dreambooth.ipynbLatest version of kohya-LoRA-dreambooth.ipynb can be found at here.ref: Stable Diffusion Artnetwork_dim and network_alpha the model size will around 16MB. However, if you have >50 images please chosen large size of above parameters.num_epochs, it may at least 100 based on some discussion on Internetstable-diffusion-webui/models/Lora/You will find the LoRA at
The following is details of configuration of generated image.Positive Prompt<lora:model_t1dataset_v1-000225:1>, (((t1model))), ((1girl)) portrait photo of 8k ultra realistic, lens flare, atmosphere, glow, detailed, intricate, full of colour, cinematic lighting, trending on artstation, hyperrealistic, focused, extreme details, cinematic, masterpiece,
(nsfw), paintings, sketches, (worst quality:2), (low quality:2), (normal quality:2), lowres, normal quality, ((monochrome)), ((grayscale)), skin spots, acnes, skin blemishes, age spot, glans, extra fingers, fewer fingers (watermark:1.2) white letters:1/1
Steps: 60, Sampler: DPM++ 2M Karras, CFG scale: 7, Size: 768x768
© 2025 jerrykhh