找回密码
 立即注册
搜索
楼主: 伊莉伊莉雅

[科技] AI小画家本地部署简单上手(更新colab NovelAI)

 火.. [复制链接]
     
发表于 2022-10-10 13:39 来自手机 | 显示全部楼层
本帖最后由 mooerfoes 于 2022-10-10 13:42 编辑
伊莉伊莉雅 发表于 2022-10-10 13:31
既然你有这个想法,那么建议你去翻下github的wiki,因为操作比较复杂,三两句也说不清。 ...

了解了,谢谢,之前没搞清楚这个应该叫Textual Inversion所以一头雾水()
回复

使用道具 举报

     
发表于 2022-10-10 16:17 | 显示全部楼层
有没有别的网盘/种子磁链的整合包。。
回复

使用道具 举报

头像被屏蔽
     
发表于 2022-10-10 17:37 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

发表于 2022-10-10 17:50 | 显示全部楼层
为啥群号搜索不到
回复

使用道具 举报

头像被屏蔽
     
发表于 2022-10-10 18:24 来自手机 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

     
发表于 2022-10-10 18:47 | 显示全部楼层
有人在本地训练embedding么,这个是需要多大显存?
8G显存每次都失败,搜了下也没看到解决办法
回复

使用道具 举报

     
发表于 2022-10-10 20:12 | 显示全部楼层
常年用不上python,也没搞过..
这下好了..
回复

使用道具 举报

     
发表于 2022-10-10 22:09 | 显示全部楼层
unclea 发表于 2022-10-10 05:51
突破77 prompt的感觉是不是没啥大用?看似自动增长,但多出来的prompt没卵用

—— 来自 OPPO PEEM00, Andr ...

没用,固定种子测一下就明确了

回复

使用道具 举报

     
发表于 2022-10-10 22:15 | 显示全部楼层
希望科技能进步到一键安装替换本子内容为喜欢画师的那个地步

同时感恩活在科学技术蒸蒸日上人人能摘成果的好日子

人话:什么时候能有一键替换本子内容啊

回复

使用道具 举报

     
发表于 2022-10-10 22:26 | 显示全部楼层
发现那个novalai的整合包用 16xx的bat启动 我没显卡的电脑都能跑起来
回复

使用道具 举报

     
发表于 2022-10-10 22:35 | 显示全部楼层
没有度盘会员所以打算BT下模型然后自己搭,看上去不麻烦,但忙了一个晚上还是被莫名其妙的报错阻止我自己搭的想法……


本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
回复

使用道具 举报

     
发表于 2022-10-10 22:45 | 显示全部楼层
GN-010 发表于 2022-10-10 22:35
没有度盘会员所以打算BT下模型然后自己搭,看上去不麻烦,但忙了一个晚上还是被莫名其妙的报错阻止我自己搭 ...

看起来就是网络问题 pytorch下载一半失败了 可以看下网络是不是稳定 或者去下载一个cuda版的torch手动装一下也行
回复

使用道具 举报

     
发表于 2022-10-10 22:47 | 显示全部楼层
GN-010 发表于 2022-10-10 22:35
没有度盘会员所以打算BT下模型然后自己搭,看上去不麻烦,但忙了一个晚上还是被莫名其妙的报错阻止我自己搭 ...

改下pip的源地址吧
电脑用户文件夹下建一个pip文件夹,里面放一个pip.ini文件,内容:
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
回复

使用道具 举报

头像被屏蔽
     
发表于 2022-10-10 23:20 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

     
 楼主| 发表于 2022-10-11 10:26 来自手机 | 显示全部楼层
meltykiss 发表于 2022-10-10 17:37
setup安装deepdanbooru库老是报错,按道理 ...

emmmm,下载中断确实是网络问题,确定走代理了吗?用clash或者proxifer了吗?
回复

使用道具 举报

     
发表于 2022-10-11 10:27 | 显示全部楼层
整合包太大了,有单独下载模型得链接吗?
回复

使用道具 举报

     
 楼主| 发表于 2022-10-11 10:28 来自手机 | 显示全部楼层
Bernoulli 发表于 2022-10-11 10:27
整合包太大了,有单独下载模型得链接吗?

A1111压缩包版就是单独下模型啊,直接下最新v4完整包,2g,然后再自己下模型。
回复

使用道具 举报

头像被屏蔽
     
发表于 2022-10-11 10:58 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

     
发表于 2022-10-11 10:58 | 显示全部楼层
伊莉伊莉雅 发表于 2022-10-11 10:28
A1111压缩包版就是单独下模型啊,直接下最新v4完整包,2g,然后再自己下模型。 ...

只有百度网盘的链接吗?
回复

使用道具 举报

发表于 2022-10-11 11:09 | 显示全部楼层
huiyuanaiy 发表于 2022-10-10 18:47
有人在本地训练embedding么,这个是需要多大显存?
8G显存每次都失败,搜了下也没看到解决办法 ...

YOU NEED 20G OF VRAM
YOU NO LONGER NEED 30.5 GB OF VRAM
回复

使用道具 举报

     
发表于 2022-10-11 13:30 | 显示全部楼层
GN-010 发表于 2022-10-10 22:35
没有度盘会员所以打算BT下模型然后自己搭,看上去不麻烦,但忙了一个晚上还是被莫名其妙的报错阻止我自己搭 ...

Windows上直接双击.bat文件启动。conda安装的程序环境需要将python加入系统环境变量并激活相应环境,最后才是调用python,伱直接调肯定不行的
回复

使用道具 举报

发表于 2022-10-11 16:00 | 显示全部楼层
大家都在关注自动生成图片功能,但novelAI本家的自动续写功能没人讨论吗?这次泄露有没有续写相关的代码和模型?
回复

使用道具 举报

     
发表于 2022-10-11 17:01 | 显示全部楼层
如果有多显卡的有办法让他一起用上来算吗。。。
回复

使用道具 举报

发表于 2022-10-11 17:02 | 显示全部楼层
shorturl.at/lAGMN借楼安利下漫区群的手抄本法术书,整理了下各种咒文/tag以及坛友分享的一些咒语,欢迎添砖加瓦shorturl.at/BTV02
回复

使用道具 举报

     
发表于 2022-10-11 18:23 | 显示全部楼层
patema 发表于 2022-10-10 01:55:25
novel和sd模型混合后二者比例对画面的影响
.75我还真挺喜欢的。

  -- 来自 能搜索的 Stage1官方 Android客户端
回复

使用道具 举报

     
发表于 2022-10-11 18:36 | 显示全部楼层
想试着混合一下不同的采样模式和AI混合比例,但是不知道Y轴该选什么才是切换不同的Sampling method,X轴不同checkpoint name倒是懂了……
回复

使用道具 举报

     
发表于 2022-10-11 19:03 | 显示全部楼层
deepdanbooru上不去啊。。。
回复

使用道具 举报

     
发表于 2022-10-11 19:37 | 显示全部楼层
I:\Program\stable-diffusion-webui-AUTOMATIC1111>call webui.bat
venv "I:\Program\stable-diffusion-webui-AUTOMATIC1111\venv\Scripts\Python.exe"
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Commit hash: 1a0a6a84c3149e236211d547471f5416cd1129f3
Installing requirements for Web UI
Launching Web UI with arguments: --medvram --xformers
Checkpoint nd_latest_ab21ba3c.ckpt [ab21ba3c] not found; loading fallback nd_final.ckpt [925997e9]
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, 32, 32) = 4096 dimensions.
making attention of type 'vanilla' with 512 in_channels
Loading weights [925997e9] from I:\Program\stable-diffusion-webui-AUTOMATIC1111\models\Stable-diffusion\nd_final.ckpt
Error verifying pickled file from I:\Program\stable-diffusion-webui-AUTOMATIC1111\models\Stable-diffusion\nd_final.ckpt:
Traceback (most recent call last):
  File "I:\Program\stable-diffusion-webui-AUTOMATIC1111\modules\safe.py", line 62, in check_pt
    with z.open('archive/data.pkl') as file:
  File "I:\Program\stable-diffusion-webui-AUTOMATIC1111\venv\dep\python\lib\zipfile.py", line 1535, in open
    raise BadZipFile("Bad magic number for file header")
zipfile.BadZipFile: Bad magic number for file header

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "I:\Program\stable-diffusion-webui-AUTOMATIC1111\modules\safe.py", line 80, in load
    check_pt(filename)
  File "I:\Program\stable-diffusion-webui-AUTOMATIC1111\modules\safe.py", line 72, in check_pt
    unpickler.load()
_pickle.UnpicklingError: invalid load key, 'H'.


The file may be malicious, so the program is not going to read it.
You can skip this check with --disable-safe-unpickle commandline argument.
Traceback (most recent call last):
  File "I:\Program\stable-diffusion-webui-AUTOMATIC1111\launch.py", line 165, in <module>
    start_webui()
  File "I:\Program\stable-diffusion-webui-AUTOMATIC1111\launch.py", line 159, in start_webui
    import webui
  File "I:\Program\stable-diffusion-webui-AUTOMATIC1111\webui.py", line 82, in <module>
    shared.sd_model = modules.sd_models.load_model()
  File "I:\Program\stable-diffusion-webui-AUTOMATIC1111\modules\sd_models.py", line 182, in load_model
    load_model_weights(sd_model, checkpoint_info)
  File "I:\Program\stable-diffusion-webui-AUTOMATIC1111\modules\sd_models.py", line 138, in load_model_weights
    if "global_step" in pl_sd:
TypeError: argument of type 'NoneType' is not iterable
Press any key to continue . . .

程序小白,按照A1111懒人包的步骤一路下来然后webui setup到这卡住了
回复

使用道具 举报

     
发表于 2022-10-11 19:41 | 显示全部楼层
mooerfoes 发表于 2022-10-10 13:29
不懂就问,如果想自己训练做个pt文件以模仿某个画师风格应该怎么做?

https://github.com/AUTOMATIC1111 ... i/Textual-Inversion
大概需要8G显存,我目前在尝试跑10万step显示大概需要跑10个小时(cuda满载,3090)
回复

使用道具 举报

     
发表于 2022-10-11 19:57 | 显示全部楼层
setree 发表于 2022-10-11 19:41
https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Textual-Inversion
大概需要8G显存,我 ...

炫耀..拖出去烧了!
回复

使用道具 举报

     
发表于 2022-10-11 20:08 | 显示全部楼层
leafS 发表于 2022-10-11 19:37
I:\Program\stable-diffusion-webui-AUTOMATIC1111>call webui.bat
venv "I:\Program\stable-diffusion-web ...

日志开头都正常,加载ckpt时出错,检查一下下载的文件完整性,可能需要重新下载
回复

使用道具 举报

     
发表于 2022-10-11 20:22 | 显示全部楼层
tianshenst1 发表于 2022-10-11 20:08
日志开头都正常,加载ckpt时出错,检查一下下载的文件完整性,可能需要重新下载 ...

感谢,确实如此,我把整个文件全都删了重新下载就可以了
回复

使用道具 举报

     
发表于 2022-10-11 20:58 | 显示全部楼层
本帖最后由 kuglv 于 2022-10-11 21:59 编辑

下了主楼最开头的压缩包更新到了V5,也下了NAI的模型放进去,但是运行webui_setup.bat的时候会报

venv "G:\NovalAI\SDwebUI-AUTOMATIC1111_221011_V5\venv\Scripts\Python.exe"
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Commit hash: 8acc901ba3a252dc6ab4fabcb41644cf64d1774c
Traceback (most recent call last):
  File "G:\NovalAI\SDwebUI-AUTOMATIC1111_221011_V5\launch.py", line 164, in <module>
    prepare_enviroment()
  File "G:\NovalAI\SDwebUI-AUTOMATIC1111_221011_V5\launch.py", line 120, in prepare_enviroment
    run_python("import torch; assert torch.cuda.is_available(), 'Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check'")
  File "G:\NovalAI\SDwebUI-AUTOMATIC1111_221011_V5\launch.py", line 56, in run_python
    return run(f'"{python}" -c "{code}"', desc, errdesc)
  File "G:\NovalAI\SDwebUI-AUTOMATIC1111_221011_V5\launch.py", line 32, in run
    raise RuntimeError(message)
RuntimeError: Error running command.
Command: "G:\NovalAI\SDwebUI-AUTOMATIC1111_221011_V5\venv\Scripts\python.exe" -c "import torch; assert torch.cuda.is_available(), 'Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check'"

是驱动问题吗?显卡是1070

----------------------------
应该是因为驱动不支持cuda11,更新一下就好了
回复

使用道具 举报

     
发表于 2022-10-11 21:05 | 显示全部楼层
@伊莉伊莉雅
关于TI的性质,我读了一下原论文。比较重要的如下:
1. 可修改性和可重现性(重现学习的样本的特征)是有一个平衡的。小的学习率会提升可修改性,相对的大的学习率可以提升可重现性。“we observe that our baselines outline a distortion-editability trade-off curve, where embeddings that lie closer to the true word distribution (e.g. due to regularization, fewer pseudo-words, or a lower learning rate) can be more easily modified, but fail to capture the details of the target. In contrast, deviating far from the word distribution enables improved reconstruction at the cost of severely diminished editing capabilities”
2. 不建议使用人类的描述来作为学习对象的prompt,可能导致学不到。最好用单独的token。
“we note that the use of human descriptions for the concepts not only fails to capture
their likeness, but also leads to diminished editability. We hypothesize that this is tied to the selectivesimilarity property outlined in Paiss et al. (2022), where vision-and-language models tend to focus on a subset of the semantically meaningful tokens. By using long captions, we increase the chance of the model ignoring our desired setting, focusing only on the object description itself. Our model, meanwhile, uses only a single token and thus minimizes this risk.”
3. 对于学习的图片的数量,不建议太大。最好控制在5张即可。实验中5~25张的变化中,越多越导致分布偏移。
“ Significant increases to dataset sizes leads to larger deviation from the real-word distribution. This impacts editability and offers paltry improvement in reconstruction. Our approach shows the best results with ∼ 5 images.”
4. 原论文中用的步数是5000. 部分对象的学习建议更大的学习率和更小的步数(个人认为按照原学习率的话,步数应该是不要超过5000太多,甚至最好考虑向下调整。)
“All results were produced using 5, 000 optimization steps. We find that these parameters work well for most cases. However, we note that for some concepts, better results can be achieved with fewer steps or with an increased learning rate.”
以上为论文的结论,生成的时候原论文是用的50 DDIM steps,如果变了sampler可能就不同了。(其余训练细节我假设代码完全符合)

回复

使用道具 举报

     
发表于 2022-10-11 21:30 | 显示全部楼层
本帖最后由 setree 于 2022-10-11 21:36 编辑
双月城 发表于 2022-10-11 21:05
@伊莉伊莉雅
关于TI的性质,我读了一下原论文。比较重要的如下:
1. 可修改性和可重现性(重现学习的样本 ...

50 sample以0.005的learning rate跑了20000 step,还是不怎么成人形()也看了下论文,好像没给出建议的learning rate区间?


本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
回复

使用道具 举报

     
发表于 2022-10-11 21:38 | 显示全部楼层
setree 发表于 2022-10-11 21:30
50 sample以0.005的learning rate跑了20000 step,还是不怎么成人形()

我也试不了,但是按照论文里面的说法来的话,
Our experiments were conducted using 2×V100 GPUs with a batch size of 4. The base learning rate was set to 0.005. Following LDM, we further scale the base learning rate by the number of GPUs and the batch size, for an effective 5 rate of 0.04. All results were produced using 5, 000 optimization steps. We find that these parameters work well for most cases. However, we note that for some concepts, better results can be achieved with fewer steps or with an increased learning rate.
你可以尝试少一点的图(5张,更多效果反而更差),更大的学习率,更少的步数。
回复

使用道具 举报

发表于 2022-10-11 21:50 | 显示全部楼层
大江户战士 发表于 2022-10-9 07:17
目前已经基本能够完美复现NAI了

请问为啥一切照做,做出来的颜色怪怪的:


masterpiece, best quality, masterpiece, asuka langley sitting cross legged on a chair
Negative prompt: lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts,signature, watermark, username, blurry, artist name
Steps: 28, Sampler: Euler, CFG scale: 11, Seed: 2870305590, Size: 512x512, Model hash: ab21ba3c, Eta: 0.67

少了一个Clip skip: 2,Model hash不同
但我确实设置Ignore last layers of CLIP model 为 2了,是Model不一样的原因?
回复

使用道具 举报

     
发表于 2022-10-11 22:27 | 显示全部楼层
找了一下发现有NovelAI大包的磁链,没有百度会员的可以试下。
https://www.bilibili.com/read/cv ... id_from=333.337.0.0
回复

使用道具 举报

头像被屏蔽
     
发表于 2022-10-11 22:32 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

     
发表于 2022-10-11 22:45 | 显示全部楼层
双月城 发表于 2022-10-11 21:38
我也试不了,但是按照论文里面的说法来的话,
Our experiments were conducted using 2×V100 GPU ...

实测7 sample,0.04 学习率,5000step生成的pt文件对图片拼贴没有任何影响
设置的Initialization text加不加也都一样...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|上海互联网违法和不良信息举报中心|网上有害信息举报专区|962110 反电信诈骗|举报电话 021-62035905|Stage1st ( 沪ICP备13020230号-1|沪公网安备 31010702007642号 )

GMT+8, 2025-2-3 20:52 , Processed in 0.096895 second(s), 4 queries , Gzip On, Redis On.

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

快速回复 返回顶部 返回列表