NovelAI初体验
背景
初体验
安装
下载 novelAI (显示已经内置一个模型了)
wget https://pub-2fdef7a2969f43289c42ac5ae3412fd4.r2.dev/naifu.tar
tar xf naifu.tar
cd ./naifu
下载模型(可选)
wget https://pub-2fdef7a2969f43289c42ac5ae3412fd4.r2.dev/animefull-latest.tar
安装依赖
pip install virtualenv
bash ./setup.sh
./venv/bin/python -m pip install pytorch_lightning==1.7.7
启动
./run.sh
结果
Starting Hydra Node HTTP TOKEN=None
2023-02-10 08:32:35,683 INFO config.py(4934) - CPU: Intel(R) Xeon(R) Gold 6342 CPU @ 2.80GHz
2023-02-10 08:32:35,683 INFO config.py(4934) - GPU: NVIDIA A100-SXM4-80GB
2023-02-10 08:32:35,683 INFO config.py(4934) - GPU RAM: 42gb
2023-02-10 08:32:35,683 INFO config.py(4934) - MODEL: stable-diffusion
2023-02-10 08:32:35,684 INFO models.py(4934) - Loading model from folder models/animefull-final-pruned
Loading model from models/animefull-final-pruned/model.ckpt
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
making attention of type 'vanilla' with 512 in_channels
Working with z of shape (1, 4, 64, 64) = 16384 dimensions.
making attention of type 'vanilla' with 512 in_channels
Started frozen clip class
2023-02-10 08:33:05,991 INFO models.py(4934) - Using VAE from models/animevae.pt
2023-02-10 08:33:05,991 INFO models.py(4934) - CLIP: Using penultimate layer
2023-02-10 08:33:06,000 INFO models.py(4934) - Using EMA
2023-02-10 08:33:15,649 INFO config.py(4934) - Models loaded in 39.97s
Generating tag embedding index for 39193 tags.
Loaded tag suggestion model using phrase embeddings
INFO: Started server process [4934]
INFO: Waiting for application startup.
2023-02-10 08:33:24,539 INFO main.py(4934) - FastAPI Started, serving
INFO: Application startup complete.
INFO: Uvicorn running on http://0.0.0.0:6969 (Press CTRL+C to quit)
使用
访问 http://localhost:6969
prompt
输入 prompt 即可,效果见
图片左下角的数字,是图片的seed。图片保存下来的话,是没有数字的。
性能的话:
INFO: 127.0.0.1:47080 - "GET /predict-tags?prompt=bird HTTP/1.1" 200 OK
100%|█████████████████| 28/28 [00:02<00:00, 10.25it/s]
2023-02-10 09:01:11,249 INFO main.py(4934) - Request took 4.025 seconds
切换风格
点 Variations
图片增强
点 Enhance
参考
- Linux一键部署NovelAI(AutoDL亲测可用)
- Sorry NovelAI(這不是一期提供Colab版Naifu腳本的影片):
https://www.youtube.com/watch?v=TyIL7XjMUaw&t=225s
- 使用150元矿渣卡,无需公网IP和注册域名,在家搭建自己的全球AI绘画服务器
- AI 杀疯了,NovelAI开源教程