Animemory Alpha is a bilingual model primarily focused on anime-style image generation. It utilizes a SDXL-type Unet structure and a self-developed bilingual T5-XXL text encoder, achieving good alignment between Chinese and English. We first developed our general model using billion-level data and then tuned the anime model through a series of post-training strategies and curated data. By open-sourcing the Alpha version, we hope to contribute to the development of the anime community, and we greatly value any feedback.
| Developed by | animEEEmpire |
|---|---|
| Model Name | AniMemory-alpha |
| Model type | Diffusion-based text-to-image generative model |
| Download link | Hugging Face |
| Parameter | TextEncoder_1: 5.6B |
| TextEncoder_2: 950M | |
| Unet: 3.1B | |
| VAE: 271M | |
| Context Length | 227 |
| Resolution | Multi-resolution |
1.Install the necessary requirements.
Recommended Python >= 3.10, PyTorch >= 2.3, CUDA >= 12.1.
It is recommended to use Anaconda to create a new environment (Python >=
3.10) conda create -n animemory python=3.10 -y to run the following example.
run pip install git+https://github.com/huggingface/diffusers.git torch==2.3.1 transformers==4.43.0 accelerate==0.31.0 sentencepiece
2.ComfyUI inference.
Go to ComfyUI-Animemory-Loader for comfyui configuration.
3.Diffusers inference.
from diffusers import DiffusionPipeline
import torch
pipe = DiffusionPipeline.from_pretrained("animEEEmpire/AniMemory-alpha", trust_remote_code=True, torch_dtype=torch.bfloat16)
pipe.to("cuda")
prompt = "一只凶恶的狼,猩红的眼神,在午夜咆哮,月光皎洁"
negative_prompt = "nsfw, worst quality, low quality, normal quality, low resolution, monochrome, blurry, wrong, Mutated hands and fingers, text, ugly faces, twisted, jpeg artifacts, watermark, low contrast, realistic"
images = pipe(prompt=prompt,
negative_prompt=negative_prompt,
num_inference_steps=40,
height=1024, width=1024,
guidance_scale=7,
)[0]
images.save("output.png")
pipe.enable_sequential_cpu_offload() to offload the model into CPU for less GPU memory cost (about 14.25 G,
compared to 25.67 G if CPU offload is not enabled), but the inference time will increase significantly(5.18s v.s.
17.74s on A100 40G).4.For faster inference, please refer to our future work.
This repo is released under the Apache 2.0 License.
Animemory Alpha is a bilingual model primarily focused on anime-style image generation. It utilizes a SDXL-type Unet structure and a self-developed bilingual T5-XXL text encoder, achieving good alignment between Chinese and English. We first developed our general model using billion-level data and then tuned the anime model through a series of post-training strategies and curated data. By open-sourcing the Alpha version, we hope to contribute to the development of the anime community, and we greatly value any feedback.
| Developed by | animEEEmpire |
|---|---|
| Model Name | AniMemory-alpha |
| Model type | Diffusion-based text-to-image generative model |
| Download link | Hugging Face |
| Parameter | TextEncoder_1: 5.6B |
| TextEncoder_2: 950M | |
| Unet: 3.1B | |
| VAE: 271M | |
| Context Length | 227 |
| Resolution | Multi-resolution |
1.Install the necessary requirements.
Recommended Python >= 3.10, PyTorch >= 2.3, CUDA >= 12.1.
It is recommended to use Anaconda to create a new environment (Python >=
3.10) conda create -n animemory python=3.10 -y to run the following example.
run pip install git+https://github.com/huggingface/diffusers.git torch==2.3.1 transformers==4.43.0 accelerate==0.31.0 sentencepiece
2.ComfyUI inference.
Go to ComfyUI-Animemory-Loader for comfyui configuration.
3.Diffusers inference.
from diffusers import DiffusionPipeline
import torch
pipe = DiffusionPipeline.from_pretrained("animEEEmpire/AniMemory-alpha", trust_remote_code=True, torch_dtype=torch.bfloat16)
pipe.to("cuda")
prompt = "一只凶恶的狼,猩红的眼神,在午夜咆哮,月光皎洁"
negative_prompt = "nsfw, worst quality, low quality, normal quality, low resolution, monochrome, blurry, wrong, Mutated hands and fingers, text, ugly faces, twisted, jpeg artifacts, watermark, low contrast, realistic"
images = pipe(prompt=prompt,
negative_prompt=negative_prompt,
num_inference_steps=40,
height=1024, width=1024,
guidance_scale=7,
)[0]
images.save("output.png")
pipe.enable_sequential_cpu_offload() to offload the model into CPU for less GPU memory cost (about 14.25 G,
compared to 25.67 G if CPU offload is not enabled), but the inference time will increase significantly(5.18s v.s.
17.74s on A100 40G).4.For faster inference, please refer to our future work.
This repo is released under the Apache 2.0 License.