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",
            ]   
        }
    ]
}
相关推荐
微软Dynamics 365培训2 小时前
Visual Studio Community 2022(VS2022)安装方法
ide·visualstudio·visual studio
基哥的奋斗历程2 小时前
SpringMVC Idea 搭建 部署war
java·ide·intellij-idea
前端小尘2 小时前
多语言插件i18n Ally的使用
javascript·vscode·typescript·json
莲动渔舟2 小时前
国产编辑器EverEdit - 复制为RTF
编辑器·emeditor·everedit
MDY12193 小时前
后端程序打成 JAR 包的详细步骤及解释
java·开发语言·vscode·jar
ForteScarlet4 小时前
Jetbrains 官方微信小程序插件已上线!
前端·ide·微信小程序·小程序
Giser板栗糖6 小时前
vscode——如何让标点总是成对出现
ide·vscode·编辑器
水w7 小时前
【IDEA 2024】学习笔记--文件选项卡
java·开发语言·ide·spring boot·intellij-idea
19999er8 小时前
模板&编辑器(PHP)(小迪网络安全笔记~
开发语言·笔记·安全·web安全·编辑器·php