deepfacelab中文网

 找回密码
 立即注册(仅限QQ邮箱)
查看: 1019|回复: 20

stylegan2内存不足

[复制链接]

40

主题

475

帖子

5240

积分

高级丹圣

Rank: 13Rank: 13Rank: 13Rank: 13

积分
5240
 楼主| 发表于 2022-3-4 00:02:04 | 显示全部楼层 |阅读模式
星级打分
  • 1
  • 2
  • 3
  • 4
  • 5
平均分:NAN  参与人数:0  我的评分:未评
最近鼓捣stylegan2,训练模型时内存不足,除了氪金还有没有解决办法,比如说有没有像dfl中bs值之类的?
回复

使用道具 举报

4

主题

110

帖子

4254

积分

高级丹圣

Rank: 13Rank: 13Rank: 13Rank: 13

积分
4254
发表于 2022-3-4 00:55:46 | 显示全部楼层
不懂帮顶
回复

使用道具 举报

0

主题

63

帖子

456

积分

禁止访问

积分
456
发表于 2022-3-4 09:21:33 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

11

主题

162

帖子

886

积分

高级丹师

Rank: 5Rank: 5

积分
886
发表于 2022-3-4 12:20:24 | 显示全部楼层
内存还是显存?
是软件还是源代码?
是软件,有命令行参数吗?
回复 支持 反对

使用道具 举报

40

主题

475

帖子

5240

积分

高级丹圣

Rank: 13Rank: 13Rank: 13Rank: 13

积分
5240
 楼主| 发表于 2022-3-4 15:42:37 | 显示全部楼层
by100 发表于 2022-3-4 12:20
内存还是显存?
是软件还是源代码?
是软件,有命令行参数吗?

colab跑的源代码
报的RAM不足
训练代码
!python run_training.py --num-gpus=1 --data-dir=datasets --config=config-f --dataset=custome_dataset --mirror-augment=true
输出
Local submit - run_dir: results/00000-stylegan2-custome_dataset-1gpu-config-f
dnnlib: Running training.training_loop.training_loop() on localhost...
Streaming data using training.dataset.TFRecordDataset...
tcmalloc: large alloc 4294967296 bytes == 0x55f6ee170000 @  0x7f13fc4ac001 0x7f13f8f767b5 0x7f13f8fdac00 0x7f13f8fdca9f 0x7f13f9073078 0x55f6e63ab424 0x55f6e63ab120 0x55f6e641fb80 0x55f6e641a66e 0x55f6e63ad36c 0x55f6e63ee7b9 0x55f6e63eb6d4 0x55f6e63ad571 0x55f6e641c633 0x55f6e641a02f 0x55f6e62ebe2b 0x55f6e641c633 0x55f6e641a02f 0x55f6e62ebe2b 0x55f6e641c633 0x55f6e63ac9da 0x55f6e641aeae 0x55f6e63ac9da 0x55f6e641b108 0x55f6e641a02f 0x55f6e62ebe2b 0x55f6e641c633 0x55f6e641a02f 0x55f6e62ebe2b 0x55f6e641c633 0x55f6e63ac9da
tcmalloc: large alloc 4294967296 bytes == 0x55f7ee170000 @  0x7f13fc4aa1e7 0x7f13f8f76631 0x7f13f8fdacc8 0x7f13f8fdaf87 0x7f13f9072f58 0x55f6e63ab424 0x55f6e63ab120 0x55f6e641fb80 0x55f6e641a02f 0x55f6e63acaba 0x55f6e641bcd4 0x55f6e641a02f 0x55f6e63acaba 0x55f6e641bcd4 0x55f6e641a02f 0x55f6e63acaba 0x55f6e641bcd4 0x55f6e63ac9da 0x55f6e641aeae 0x55f6e641a02f 0x55f6e63acaba 0x55f6e641f2c0 0x55f6e641a02f 0x55f6e63acaba 0x55f6e641bcd4 0x55f6e641a66e 0x55f6e63ad36c 0x55f6e63ee7b9 0x55f6e63eb6d4 0x55f6e63ad571 0x55f6e641c633
tcmalloc: large alloc 4294967296 bytes == 0x55f8eebcc000 @  0x7f13fc4aa1e7 0x7f13f8f76631 0x7f13f8fdacc8 0x7f13f8fdaf87 0x7f13bb38c235 0x7f13bad0f792 0x7f13bad0fd42 0x7f13bacc8aee 0x55f6e63ab317 0x55f6e63ab120 0x55f6e641f679 0x55f6e63ac9da 0x55f6e641b108 0x55f6e641a1c0 0x55f6e62ebeb0 0x55f6e641c633 0x55f6e641a02f 0x55f6e63acaba 0x55f6e641b108 0x55f6e641a66e 0x55f6e63acaba 0x55f6e641b108 0x55f6e63ac9da 0x55f6e641b108 0x55f6e641a02f 0x55f6e63ad151 0x55f6e63ad571 0x55f6e641c633 0x55f6e641a02f 0x55f6e63acaba 0x55f6e641aeae
Dataset shape = [3, 512, 512]
Dynamic range = [0, 255]
Label size    = 0
Constructing networks...
Setting up TensorFlow plugin "fused_bias_act.cu": Preprocessing... Compiling... Loading... Done.
Setting up TensorFlow plugin "upfirdn_2d.cu": Preprocessing... Compiling... Loading... Done.

G                             Params    OutputShape         WeightShape     
---                           ---       ---                 ---            
latents_in                    -         (?, 512)            -               
labels_in                     -         (?, 0)              -               
lod                           -         ()                  -               
dlatent_avg                   -         (512,)              -               
G_mapping/latents_in          -         (?, 512)            -               
G_mapping/labels_in           -         (?, 0)              -               
G_mapping/Normalize           -         (?, 512)            -               
G_mapping/Dense0              262656    (?, 512)            (512, 512)      
G_mapping/Dense1              262656    (?, 512)            (512, 512)      
G_mapping/Dense2              262656    (?, 512)            (512, 512)      
G_mapping/Dense3              262656    (?, 512)            (512, 512)      
G_mapping/Dense4              262656    (?, 512)            (512, 512)      
G_mapping/Dense5              262656    (?, 512)            (512, 512)      
G_mapping/Dense6              262656    (?, 512)            (512, 512)      
G_mapping/Dense7              262656    (?, 512)            (512, 512)      
G_mapping/Broadcast           -         (?, 16, 512)        -               
G_mapping/dlatents_out        -         (?, 16, 512)        -               
Truncation/Lerp               -         (?, 16, 512)        -               
G_synthesis/dlatents_in       -         (?, 16, 512)        -               
G_synthesis/4x4/Const         8192      (?, 512, 4, 4)      (1, 512, 4, 4)  
G_synthesis/4x4/Conv          2622465   (?, 512, 4, 4)      (3, 3, 512, 512)
G_synthesis/4x4/ToRGB         264195    (?, 3, 4, 4)        (1, 1, 512, 3)  
G_synthesis/8x8/Conv0_up      2622465   (?, 512, 8, 8)      (3, 3, 512, 512)
G_synthesis/8x8/Conv1         2622465   (?, 512, 8, 8)      (3, 3, 512, 512)
G_synthesis/8x8/Upsample      -         (?, 3, 8, 8)        -               
G_synthesis/8x8/ToRGB         264195    (?, 3, 8, 8)        (1, 1, 512, 3)  
G_synthesis/16x16/Conv0_up    2622465   (?, 512, 16, 16)    (3, 3, 512, 512)
G_synthesis/16x16/Conv1       2622465   (?, 512, 16, 16)    (3, 3, 512, 512)
G_synthesis/16x16/Upsample    -         (?, 3, 16, 16)      -               
G_synthesis/16x16/ToRGB       264195    (?, 3, 16, 16)      (1, 1, 512, 3)  
G_synthesis/32x32/Conv0_up    2622465   (?, 512, 32, 32)    (3, 3, 512, 512)
G_synthesis/32x32/Conv1       2622465   (?, 512, 32, 32)    (3, 3, 512, 512)
G_synthesis/32x32/Upsample    -         (?, 3, 32, 32)      -               
G_synthesis/32x32/ToRGB       264195    (?, 3, 32, 32)      (1, 1, 512, 3)  
G_synthesis/64x64/Conv0_up    2622465   (?, 512, 64, 64)    (3, 3, 512, 512)
G_synthesis/64x64/Conv1       2622465   (?, 512, 64, 64)    (3, 3, 512, 512)
G_synthesis/64x64/Upsample    -         (?, 3, 64, 64)      -               
G_synthesis/64x64/ToRGB       264195    (?, 3, 64, 64)      (1, 1, 512, 3)  
G_synthesis/128x128/Conv0_up  1442561   (?, 256, 128, 128)  (3, 3, 512, 256)
G_synthesis/128x128/Conv1     721409    (?, 256, 128, 128)  (3, 3, 256, 256)
G_synthesis/128x128/Upsample  -         (?, 3, 128, 128)    -               
G_synthesis/128x128/ToRGB     132099    (?, 3, 128, 128)    (1, 1, 256, 3)  
G_synthesis/256x256/Conv0_up  426369    (?, 128, 256, 256)  (3, 3, 256, 128)
G_synthesis/256x256/Conv1     213249    (?, 128, 256, 256)  (3, 3, 128, 128)
G_synthesis/256x256/Upsample  -         (?, 3, 256, 256)    -               
G_synthesis/256x256/ToRGB     66051     (?, 3, 256, 256)    (1, 1, 128, 3)  
G_synthesis/512x512/Conv0_up  139457    (?, 64, 512, 512)   (3, 3, 128, 64)
G_synthesis/512x512/Conv1     69761     (?, 64, 512, 512)   (3, 3, 64, 64)  
G_synthesis/512x512/Upsample  -         (?, 3, 512, 512)    -               
G_synthesis/512x512/ToRGB     33027     (?, 3, 512, 512)    (1, 1, 64, 3)   
G_synthesis/images_out        -         (?, 3, 512, 512)    -               
G_synthesis/noise0            -         (1, 1, 4, 4)        -               
G_synthesis/noise1            -         (1, 1, 8, 8)        -               
G_synthesis/noise2            -         (1, 1, 8, 8)        -               
G_synthesis/noise3            -         (1, 1, 16, 16)      -               
G_synthesis/noise4            -         (1, 1, 16, 16)      -               
G_synthesis/noise5            -         (1, 1, 32, 32)      -               
G_synthesis/noise6            -         (1, 1, 32, 32)      -               
G_synthesis/noise7            -         (1, 1, 64, 64)      -               
G_synthesis/noise8            -         (1, 1, 64, 64)      -               
G_synthesis/noise9            -         (1, 1, 128, 128)    -               
G_synthesis/noise10           -         (1, 1, 128, 128)    -               
G_synthesis/noise11           -         (1, 1, 256, 256)    -               
G_synthesis/noise12           -         (1, 1, 256, 256)    -               
G_synthesis/noise13           -         (1, 1, 512, 512)    -               
G_synthesis/noise14           -         (1, 1, 512, 512)    -               
images_out                    -         (?, 3, 512, 512)    -               
---                           ---       ---                 ---            
Total                         30276583                                      


D                    Params    OutputShape         WeightShape     
---                  ---       ---                 ---            
images_in            -         (?, 3, 512, 512)    -               
labels_in            -         (?, 0)              -               
512x512/FromRGB      256       (?, 64, 512, 512)   (1, 1, 3, 64)   
512x512/Conv0        36928     (?, 64, 512, 512)   (3, 3, 64, 64)  
512x512/Conv1_down   73856     (?, 128, 256, 256)  (3, 3, 64, 128)
512x512/Skip         8192      (?, 128, 256, 256)  (1, 1, 64, 128)
256x256/Conv0        147584    (?, 128, 256, 256)  (3, 3, 128, 128)
256x256/Conv1_down   295168    (?, 256, 128, 128)  (3, 3, 128, 256)
256x256/Skip         32768     (?, 256, 128, 128)  (1, 1, 128, 256)
128x128/Conv0        590080    (?, 256, 128, 128)  (3, 3, 256, 256)
128x128/Conv1_down   1180160   (?, 512, 64, 64)    (3, 3, 256, 512)
128x128/Skip         131072    (?, 512, 64, 64)    (1, 1, 256, 512)
64x64/Conv0          2359808   (?, 512, 64, 64)    (3, 3, 512, 512)
64x64/Conv1_down     2359808   (?, 512, 32, 32)    (3, 3, 512, 512)
64x64/Skip           262144    (?, 512, 32, 32)    (1, 1, 512, 512)
32x32/Conv0          2359808   (?, 512, 32, 32)    (3, 3, 512, 512)
32x32/Conv1_down     2359808   (?, 512, 16, 16)    (3, 3, 512, 512)
32x32/Skip           262144    (?, 512, 16, 16)    (1, 1, 512, 512)
16x16/Conv0          2359808   (?, 512, 16, 16)    (3, 3, 512, 512)
16x16/Conv1_down     2359808   (?, 512, 8, 8)      (3, 3, 512, 512)
16x16/Skip           262144    (?, 512, 8, 8)      (1, 1, 512, 512)
8x8/Conv0            2359808   (?, 512, 8, 8)      (3, 3, 512, 512)
8x8/Conv1_down       2359808   (?, 512, 4, 4)      (3, 3, 512, 512)
8x8/Skip             262144    (?, 512, 4, 4)      (1, 1, 512, 512)
4x4/MinibatchStddev  -         (?, 513, 4, 4)      -               
4x4/Conv             2364416   (?, 512, 4, 4)      (3, 3, 513, 512)
4x4/Dense0           4194816   (?, 512)            (8192, 512)     
Output               513       (?, 1)              (512, 1)        
scores_out           -         (?, 1)              -               
---                  ---       ---                 ---            
Total                28982849                                      

Building TensorFlow graph...
Initializing logs...
Training for 25000 kimg...

tick 0     kimg 0.1      lod 0.00  minibatch 32   time 3m 22s       sec/tick 202.3   sec/kimg 1580.55 maintenance 0.0    gpumem 8.5
Downloading http://d36zk2xti64re0.cloudfront ... ion_v3_features.pkl ... done
tcmalloc: large alloc 4294967296 bytes == 0x55fb44f30000 @  0x7f13fc4ac001 0x7f13f8f767b5 0x7f13f8fdac00 0x7f13f8fdca9f 0x7f13f9073078 0x55f6e63ab424 0x55f6e63ab120 0x55f6e641fb80 0x55f6e641a66e 0x55f6e63ad36c 0x55f6e63ee7b9 0x55f6e63eb6d4 0x55f6e63ad571 0x55f6e641c633 0x55f6e641a02f 0x55f6e62ebe2b 0x55f6e641c633 0x55f6e63ac9da 0x55f6e641b108 0x55f6e649ea18 0x55f6e649e64f 0x55f6e641b350 0x55f6e641a02f 0x55f6e63acaba 0x55f6e641bcd4 0x55f6e641a02f 0x55f6e63ad36c 0x55f6e63ad571 0x55f6e641c633 0x55f6e641a02f 0x55f6e63acaba
^C
回复 支持 反对

使用道具 举报

11

主题

162

帖子

886

积分

高级丹师

Rank: 5Rank: 5

积分
886
发表于 2022-3-4 17:05:41 | 显示全部楼层
masker 发表于 2022-3-4 15:42
colab跑的源代码
报的RAM不足
训练代码

完整的错误信息...
回复 支持 反对

使用道具 举报

11

主题

162

帖子

886

积分

高级丹师

Rank: 5Rank: 5

积分
886
发表于 2022-3-4 17:11:14 | 显示全部楼层
masker 发表于 2022-3-4 15:42
colab跑的源代码
报的RAM不足
训练代码

调小BS试试
回复 支持 反对

使用道具 举报

40

主题

475

帖子

5240

积分

高级丹圣

Rank: 13Rank: 13Rank: 13Rank: 13

积分
5240
 楼主| 发表于 2022-3-4 17:18:03 | 显示全部楼层

额......好像没有bs值这个参数
回复 支持 反对

使用道具 举报

11

主题

162

帖子

886

积分

高级丹师

Rank: 5Rank: 5

积分
886
发表于 2022-3-4 17:29:40 | 显示全部楼层
masker 发表于 2022-3-4 17:18
额......好像没有bs值这个参数

run_training.py  
这个文件里面 应该有个 import argparse  或者 从其他文件 导入 args
...
算了用这个
! pyrhon run_training.py --help
回复 支持 反对

使用道具 举报

40

主题

475

帖子

5240

积分

高级丹圣

Rank: 13Rank: 13Rank: 13Rank: 13

积分
5240
 楼主| 发表于 2022-3-4 18:14:05 | 显示全部楼层
by100 发表于 2022-3-4 17:29
run_training.py  
这个文件里面 应该有个 import argparse  或者 从其他文件 导入 args
...

调小了bs值还是不行,会不会还有其他参数决定?
回复 支持 反对

使用道具 举报

QQ|Archiver|手机版|deepfacelab中文网 |网站地图

GMT+8, 2024-9-21 03:37 , Processed in 0.106385 second(s), 9 queries , Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

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