sjtuplayer / anomalydiffusion

[AAAI 2024] AnomalyDiffusion: Few-Shot Anomaly Image Generation with Diffusion Model
MIT License
159 stars 22 forks source link

Multi gpu settings configuration file #6

Closed CVKim closed 8 months ago

CVKim commented 8 months ago

trainer: benchmark: True

max_steps: 300000

max_steps: 3000
accelerator: 'gpu'
gpus: '2' # error '0,1'

"args": [
    "--spatial_encoder_embedding",
    "--data_enhance",
    "--base", "configs/latent-diffusion/txt2img-1p4B-finetune-encoder+embedding.yaml",
    "-t",
    "--actual_resume", "models/ldm/text2img-large/model.ckpt",
    "-n", "test",
    "--gpus", "2", # error '0,1'
    "--init_word", "anomaly",
    "--mvtec_path", "F:/Dataset/mvtec_anomaly_detection"
],
"env": {
    "CUDA_VISIBLE_DEVICES": "0,1",
    "path_to_mvtec_dataset": "F:/Dataset/mvtec_anomaly_detection"
}

The above args and txt2img-1p4b-finetune-encoder+embedding.yaml are part of my current configuration. I have two 3080 GPUs and want to train using multi-GPU setup. However, I encounter errors when loading the model with the configuration as specified above. How should I set up my configuration and arguments to enable multi-GPU training without issues?

boxbox2 commented 7 months ago

Hi, could you tell me how to solve the problem of multi-card training? or just use a single card for training. I have two 8g gpus