Instructions to use AnticPan/Anima-Role-Ref-KV with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use AnticPan/Anima-Role-Ref-KV 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("circlestone-labs/Anima", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("AnticPan/Anima-Role-Ref-KV") 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
- Local Apps Settings
- Draw Things
Download diffusers/adapter_config.json from AnticPan/Anima-Role-Ref-KV: direct link, hf CLI and curl.
- Browser
- Download file 242 Bytes
-
https://huggingface.co/AnticPan/Anima-Role-Ref-KV/resolve/main/diffusers/adapter_config.json
- Command line
-
hf download hf://AnticPan/Anima-Role-Ref-KV/diffusers/adapter_config.json
-
curl -L -o adapter_config.json https://huggingface.co/AnticPan/Anima-Role-Ref-KV/resolve/main/diffusers/adapter_config.json
242 Bytes
| { | |
| "r": 128, | |
| "lora_alpha": 128, | |
| "target_modules": [ | |
| "attn1.to_q", | |
| "attn1.to_k", | |
| "attn1.to_v", | |
| "attn1.to_out.0", | |
| "ff.net.0.proj", | |
| "ff.net.2" | |
| ], | |
| "peft_type": "LORA", | |
| "bias": "none", | |
| "inference_mode": true | |
| } | |