Cartoon Diffusion
Turn a photo into a cartoon. Diffusion model and Python library, both published.
PythonMIT
What it does
A image-to-cartoon pipeline built on Stable Diffusion techniques and fine-tuned on the Google Cartoon Set avatar dataset from Kaggle. Published as two things: the trained model, and a Python library that wraps it so converting an image is a two-line call rather than a training setup.
Install
pip install cartoon-diffusionUsage
from cartoon_diffusion import CartoonifyDiffusionPipeline
# Load the pipeline
pipeline = CartoonifyDiffusionPipeline.from_pretrained("wizcodes12/image_to_cartoonify")
# Convert an image to a cartoon
cartoon = pipeline("path/to/selfie.jpg")
cartoon.save("cartoon_output.png")
# Or pass a PIL Image
from PIL import Image
image = Image.open("selfie.jpg")
cartoon = pipeline(image)
cartoon.save("cartoon_output.png")Built with
- Python
- Stable Diffusion
- Diffusers
- PyTorch
- Computer Vision
Get it
Need something like this built for you?
We build production AI systems and developer tooling for clients, delivered end to end and handed over to your own accounts.