mirror of
https://github.com/kohya-ss/sd-scripts.git
synced 2026-04-09 06:45:09 +00:00
lower ram usage
This commit is contained in:
@@ -150,7 +150,9 @@ def train(args):
|
|||||||
|
|
||||||
# モデルを読み込む
|
# モデルを読み込む
|
||||||
text_encoder, vae, unet, _ = train_util.load_target_model(args, weight_dtype)
|
text_encoder, vae, unet, _ = train_util.load_target_model(args, weight_dtype)
|
||||||
|
# unnecessary, but work on low-ram device
|
||||||
|
text_encoder.to("cuda")
|
||||||
|
unet.to("cuda")
|
||||||
# モデルに xformers とか memory efficient attention を組み込む
|
# モデルに xformers とか memory efficient attention を組み込む
|
||||||
train_util.replace_unet_modules(unet, args.mem_eff_attn, args.xformers)
|
train_util.replace_unet_modules(unet, args.mem_eff_attn, args.xformers)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user