vscode accelerate deepspeed配置

accelerate训练

bash 复制代码
{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python: Current File",
            "type": "python",
            "request": "launch",
            // "program": "${file}",
            "module": "accelerate.commands.launch",
            "console": "integratedTerminal",
            "env": {
                "CUDA_VISIBLE_DEVICES": "4,5,6,7"  // 与
            },
            "args": [
                 train sdxl lora
                "--num_processes=4",
                "examples/text_to_image/train_text_to_image_lora_sdxl.py",
                "--dataset_name","lambdalabs/naruto-blip-captions",
                "--output_dir","exp",
                "--resolution","1024", "--random_flip",
                "--train_batch_size","1",
                "--num_train_epochs","2", "--checkpointing_steps","500",
                "--learning_rate","1e-04", "--lr_scheduler","constant", "--lr_warmup_steps","0",
                "--mixed_precision","fp16",
                "--seed","42",
                "--output_dir","sd-naruto-model-lora-sdxl",
                "--validation_prompt","cute dragon creature",
            ]   
        }
    ]
}

accelerate+deepspeed训练

bash 复制代码
{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python: Current File",
            "type": "python",
            "request": "launch",
            // "program": "${file}",
            "module": "accelerate.commands.launch",
            "console": "integratedTerminal",
            "env": {
                "CUDA_VISIBLE_DEVICES": "4,5,6,7"
            },
            "args": [
                 train sdxl lora
                "--config_file","my/deepspeed_config/default_config.yaml",  //跟上面只有这个区别
                "--num_processes=4",
                "examples/text_to_image/train_text_to_image_lora_sdxl.py",
                "--dataset_name","lambdalabs/naruto-blip-captions",
                "--output_dir","exp",
                "--resolution","1024", "--random_flip",
                "--train_batch_size","1",
                "--num_train_epochs","2", "--checkpointing_steps","500",
                "--learning_rate","1e-04", "--lr_scheduler","constant", "--lr_warmup_steps","0",
                "--mixed_precision","fp16",
                "--seed","42",
                "--output_dir","sd-naruto-model-lora-sdxl",
                "--validation_prompt","cute dragon creature",
            ]   
        }
    ]
}
相关推荐
狂野有理4 小时前
Anaconda+Visual Studio Code(问题思考?)
ide·vscode·编辑器
小白宗轩8 小时前
vsCode的java配置
java·vscode·python
414丶小哥8 小时前
Jetbrains系列工具 Idea Websotrm中使用Claude Code
java·ide·intellij-idea·claudecode
zzz海羊10 小时前
VSCode配置java中的lombok
java·开发语言·vscode
船长㉿12 小时前
vim常用命令
linux·编辑器·vim
清蒸鳜鱼13 小时前
【Windows】本地安装Latex(搭配vscode)
ide·vscode·编辑器
( ˶˙⚇˙˶ )୨⚑︎13 小时前
VSCode SSH免密连接主机 GitHub添加SSH密钥
vscode·ssh·github
程序员 _孜然20 小时前
【最详细】android-studio-2025.2.x新版本,导出apk,含jks证书生成
android·ide·android studio
BestOrNothing_20151 天前
Git 中新建学习分支 + 暂存修改 + VSCode 可视化查看改动(超详细教程)
git·vscode·版本控制·开发技巧
FOREVER-Q1 天前
从开发到部署:Docker 化前端应用全流程指南
ide·docker·webstorm