mirror of https://github.com/hpcaitech/ColossalAI
modify shell for check
parent
cf4792c975
commit
039854b391
|
@ -6,8 +6,8 @@ HF_DATASETS_OFFLINE=1
|
|||
TRANSFORMERS_OFFLINE=1
|
||||
DIFFUSERS_OFFLINE=1
|
||||
|
||||
# "torch_ddp" "torch_ddp_fp16"
|
||||
for plugin in "low_level_zero" "gemini"; do
|
||||
# "torch_ddp" "torch_ddp_fp16" "low_level_zero"
|
||||
for plugin in "gemini"; do
|
||||
torchrun --nproc_per_node 4 --standalone train_dreambooth_colossalai.py \
|
||||
--pretrained_model_name_or_path="/data/dreambooth/diffuser/stable-diffusion-v1-4" \
|
||||
--instance_data_dir="/data/dreambooth/Teyvat/data" \
|
||||
|
@ -20,5 +20,5 @@ for plugin in "low_level_zero" "gemini"; do
|
|||
--lr_scheduler="constant" \
|
||||
--lr_warmup_steps=0 \
|
||||
--num_class_images=200 \
|
||||
--placement="cuda"
|
||||
--placement="cpu" # "cuda"
|
||||
done
|
||||
|
|
|
@ -487,7 +487,7 @@ def main(args):
|
|||
if args.plugin.startswith('torch_ddp'):
|
||||
plugin = TorchDDPPlugin()
|
||||
elif args.plugin == 'gemini':
|
||||
plugin = GeminiPlugin(placement_policy='cuda', strict_ddp_mode=True, initial_scale=2 ** 5)
|
||||
plugin = GeminiPlugin(placement_policy=args.placement, strict_ddp_mode=True, initial_scale=2 ** 5)
|
||||
elif args.plugin == 'low_level_zero':
|
||||
plugin = LowLevelZeroPlugin(initial_scale=2 ** 5)
|
||||
|
||||
|
|
Loading…
Reference in New Issue