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",
            ]   
        }
    ]
}
相关推荐
CSDN121108 小时前
麒麟 V10 安装 Node-RED、IEC 104 协议插件及界面汉化
linux·编辑器·vim
起名真的太难了17 小时前
Vim基本操作与Ollama部署指南
linux·编辑器·vim
sunoo-22917 小时前
【C 语言标准 IO 入门】第二天学习笔记:文件操作核心函数 + 实战案例 + 踩坑合集
linux·笔记·vscode·学习
2501_9160088917 小时前
Swift多环境配置:利用Scheme实现灵活的多环境管理
开发语言·ide·vscode·ios·个人开发·swift·敏捷流程
小妖同学学AI18 小时前
GitHub上16k星的“未来编辑器”:像Notion一样排版,像ChatGPT一样自动续写
编辑器·github·notion
晨曦花锦18 小时前
Vim基础操作与Ollama模型管理,顺便配置Nginx反向代理
linux·nginx·编辑器·vim
New_Horizons66618 小时前
Vscode终端激活Conda虚拟环境
ide·vscode·conda
青 春 记 忆1 天前
零基础入门Python11|Git实战:为任务管理器建立版本历史
开发语言·git·vscode·python·python3.11
️学习的小王2 天前
Anaconda国内镜像配置与conda常用命令
ide·经验分享·python·conda
雾沉川2 天前
Rust IDE 选型:除 VS Code 之外,RustRover 非商业场景可免费使用
ide·vscode·rust