-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Expand file tree
/
Copy pathanima-preview.py
More file actions
19 lines (17 loc) · 975 Bytes
/
anima-preview.py
File metadata and controls
19 lines (17 loc) · 975 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from diffsynth.pipelines.anima_image import AnimaImagePipeline, ModelConfig
import torch
pipe = AnimaImagePipeline.from_pretrained(
torch_dtype=torch.bfloat16,
device="cuda",
model_configs=[
ModelConfig(model_id="circlestone-labs/Anima", origin_file_pattern="split_files/diffusion_models/anima-preview.safetensors"),
ModelConfig(model_id="circlestone-labs/Anima", origin_file_pattern="split_files/text_encoders/qwen_3_06b_base.safetensors"),
ModelConfig(model_id="circlestone-labs/Anima", origin_file_pattern="split_files/vae/qwen_image_vae.safetensors"),
],
tokenizer_config=ModelConfig(model_id="Qwen/Qwen3-0.6B", origin_file_pattern="./"),
tokenizer_t5xxl_config=ModelConfig(model_id="stabilityai/stable-diffusion-3.5-large", origin_file_pattern="tokenizer_3/")
)
pipe.load_lora(pipe.dit, "./models/train/anima-preview_lora/epoch-4.safetensors")
prompt = "a dog"
image = pipe(prompt=prompt, seed=0)
image.save("image.jpg")