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",
            ]   
        }
    ]
}
相关推荐
yeziyfx4 小时前
Android Studio制作.9图(点9图/9Patch图)
android·ide·android studio
小冷coding7 小时前
容器管理不再受限!PortainerCE+cpolar打造云端数字指挥中心
编辑器
九河_10 小时前
服务器在线安装插件失败/离线安装VSIX
vscode·extension·pylance
小蕾Java19 小时前
PyCharm 2025:使用图文教程!
ide·python·pycharm
刘登辉21 小时前
idea使用联网缓存的pom进行离线开发
java·ide·intellij-idea·离线开发
小池先生21 小时前
用vscode查日志方便的搜索-复制所有匹配行功能
ide·vscode·编辑器
zstar-_1 天前
FreeGIF:让制作动图变得超简单
编辑器·gif
Deryck_德瑞克1 天前
IDEA编译时报错OOM的解决方案
java·ide·intellij-idea
JH30731 天前
Idea中新建package包,变成了Directory
java·ide·intellij-idea
原小明1 天前
【Conda】Conda虚拟环境配置系统环境变量,Jupter可使用
vscode·python·jupyter·conda