Downloads · 30 days
0
Benkhalifa/STABLE-DIFF-CARTOON
STABLE-DIFF-CARTOON is a machine learning model from Benkhalifa. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This repository contains the fine-tuned Stable Diffusion model for generating cartoonish images. The model has been fine-tuned using DreamBooth on top of SG161222/RealisticVisionV2.0 and is optimized to produce high-q…
Downloads · 30 days
0
Access
Public
Updated Aug 21, 2024
Repo size
2.1 GB
Likes
0
Public
Click a slice to open those files.
.safetensors2.1 GB · 100%
From the Hugging Face model README
This repository contains the fine-tuned Stable Diffusion model for generating cartoonish images. The model has been fine-tuned using DreamBooth on top of SG161222/Realistic_Vision_V2.0 and is optimized to produce high-quality cartoon-style images.
my_dreambooth_model.safetensorsThe model has been trained and fine-tuned to work specifically with images of size 512x512 pixels. This resolution was chosen because it strikes a balance between image quality and computational efficiency, making it suitable for generating detailed images without requiring excessive GPU resources. Using images of this size ensures that the model can focus on generating high-quality features in the cartoon style.
To achieve the best results, ensure that all input images are resized to 512x512 pixels before fine-tuning or generating images. This step is crucial because the model expects inputs of this size, and mismatched dimensions can lead to poor quality or distorted outputs.
!python scripts/512x512.py --input_dir /path/to/your/images --output_dir /path/to/save/512x512/images
Data augmentation is an essential step in preparing your dataset for fine-tuning. It helps improve the model's robustness by exposing it to various transformations of the images, such as flipping, rotation, zooming, and color adjustments. This increased diversity helps the model generalize better to different styles and variations within the cartoonish theme.
A data augmentation script is provided in this repository under the scripts directory. The script applies various transformations to your dataset, ensuring that the model has a rich and diverse set of training images.
!python scripts/data_augmentation.py --input_dir /path/to/your/images --output_dir /path/to/save/augmented/images
Use the provided Google Colab Notebook to fine-tune the model and then test the fine-tuned model . You can find the notebook here. The fine-tuned model will be saved as a '.safetensors' file in your Google Drive.
The dataset used for fine-tuning is hosted on Kaggle. You can access and download it using the following link: Dataset