https://qiita.com/kitsume/items/d1a27316504f83b84bea
pip install git+https://github.com/huggingface/diffusers
pip install torch==1.13.0 torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu116
pip install transformers
pip install accelerate
推論 ※ GTX 3070 (VRAM 8GB)でも、2つのオプションをいれることで、768×1024の推論が可能. (5〜6GB程度の使用率.)
pipe.enable_attention_slicing()
pipe.enable_sequential_cpu_offload()
https://huggingface.co/docs/diffusers/optimization/fp16 https://baskmedia.jp/novelai-code-of-the-elements1/