Instructions to use Shanav12/CartoonModel with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Shanav12/CartoonModel with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("Shanav12/CartoonModel", dtype=torch.bfloat16, device_map="cuda") prompt = "Turn this cat into a dog" input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png") image = pipe(image=input_image, prompt=prompt).images[0] - Notebooks
- Google Colab
- Kaggle
| { | |
| "_class_name": "StableDiffusionXLImg2ImgPipeline", | |
| "_diffusers_version": "0.29.1", | |
| "_name_or_path": "stabilityai/stable-diffusion-xl-refiner-1.0", | |
| "feature_extractor": [ | |
| null, | |
| null | |
| ], | |
| "force_zeros_for_empty_prompt": false, | |
| "image_encoder": [ | |
| null, | |
| null | |
| ], | |
| "requires_aesthetics_score": true, | |
| "scheduler": [ | |
| "diffusers", | |
| "EulerDiscreteScheduler" | |
| ], | |
| "text_encoder": [ | |
| null, | |
| null | |
| ], | |
| "text_encoder_2": [ | |
| "transformers", | |
| "CLIPTextModelWithProjection" | |
| ], | |
| "tokenizer": [ | |
| null, | |
| null | |
| ], | |
| "tokenizer_2": [ | |
| "transformers", | |
| "CLIPTokenizer" | |
| ], | |
| "unet": [ | |
| "diffusers", | |
| "UNet2DConditionModel" | |
| ], | |
| "vae": [ | |
| "diffusers", | |
| "AutoencoderKL" | |
| ] | |
| } | |