|
发表于 2023-3-17 08:42:36
|
显示全部楼层
楼主,N卡970 4G的显存,老是报错
untimeError:CUDA out of memory.Tried to allocate 30.00 MiB (GPU 0:4.00 GiB total capacity:2.68 GiB already allocated:7.35 MiB free
2.73 GiB reserved in total by PyTorch)If reserved memory i
该这么调整train.ps1的参数呢,自己搞不定了,谢谢
$resolution = "256,256" # image resolution w,h. 图片分辨率,宽,高
$batch_size = 1 # batch size
$max_train_epoches = 10 # max train epoches | 最大训练 epoch
$save_every_n_epochs = 2 # save every n epochs | 每 N 个 epoch 保存一次
$network_dim = 32 # network dim | 常用 4~128,不是越大越好
$network_alpha = 16 # network alpha | 常用与 network_dim 相同的值或者采用较小的值
$train_unet_only = 1 # train U-Net only | 仅训练 U-Net,开启这个会牺牲效果大幅减少显存使用。
$train_text_encoder_only = 0 # train Text Encoder only | 仅训练 文本编码器 |
|