Instructions to use benjamin-paine/aniportrait with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use benjamin-paine/aniportrait with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("benjamin-paine/aniportrait", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
When using model name -m in command line is it like this? SG161222/Realistic_Vision_V6.0_B1_noVAE
Does it then need to be loaded each inference run? Thanks
Hello,
The --model-file or -m argument corresponds to when using the --single-file argument, which requires a special kind of checkpoint format that I made for this project to enable the aniportrait pipeline to be condensed to a single file. At the moment there are only two checkpoints I know of that are formatted this way - aniportrait.safetensors and aniportrait.fp16.safetensors in this repository.
At the moment, there is no way to use a different Stable Diffusion checkpoint with this repository. Both UNets (2D and 3D) are trained for AniPortrait, and there is text encoder, so the only portion of a stable diffusion checkpoint that could apply is the VAE - and this is frequently not included in checkpoints because it's usually not trained beyond the original stable diffusion VAEs. For that reason, I don't plan on adding this ability for the time being.
Ok thanks!