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",
            ]   
        }
    ]
}
相关推荐
love530love11 小时前
将 ChatCut MCP 插件从 Codex 桌面应用移植到 WorkBuddy —— 完整适配实录
ide·人工智能·windows·视频剪辑·ai agent
小李不困还能学14 小时前
PyCharm下载安装与配置教程
ide·python·pycharm
知福致福15 小时前
vscode连接远程服务器登录codex插件一直卡在gpt图标页,不跳转浏览器登录
服务器·vscode·gpt
广东帝工16 小时前
桥梁智能防撞主动预警系统——架构、体系、预警机制
编辑器
A小调的码农17 小时前
OPENOCD+MSYS+VSCODE:从“灯不亮“到“终于亮了“
ide·vscode·stm32·单片机·编辑器
AI的探索之旅17 小时前
让 Claude Code 直接操刀画原理图和 PCB:VSCode 插件接外部 API 全流程
linux·ide·vscode·嵌入式硬件·编辑器
广东帝工17 小时前
桥梁防撞(防船撞)智能预警系统
编辑器
hkj880819 小时前
vscode提交gitee远程仓库出现Permission denied (publickey)解决方法
ide·vscode·gitee
女神下凡19 小时前
WorkBuddy、TraeWork、QWork 完整区别对比
ide·人工智能·笔记
李顿波19 小时前
Ai IDE / Ai Agent 一览!
ide·人工智能