From 50c4cb0167c75284c5a8abdb62dda3e34a2402c6 Mon Sep 17 00:00:00 2001 From: binmakeswell Date: Thu, 10 Nov 2022 14:51:47 +0800 Subject: [PATCH] [NFC] remove redundant dependency (#1869) * remove redundant config * remove redundant dependency --- examples/images/diffusion/README.md | 2 +- .../diffusion/configs/train_deepspeed.yaml | 117 ------------------ examples/images/diffusion/environment.yaml | 1 - 3 files changed, 1 insertion(+), 119 deletions(-) delete mode 100644 examples/images/diffusion/configs/train_deepspeed.yaml diff --git a/examples/images/diffusion/README.md b/examples/images/diffusion/README.md index 6d188bb48..38878ab71 100644 --- a/examples/images/diffusion/README.md +++ b/examples/images/diffusion/README.md @@ -59,7 +59,7 @@ you should the change the `data.file_path` in the `config/train_colossalai.yaml` ## Training -we provide the script `train.sh` to run the training task , and three Stategy in `configs`:`train_colossalai.yaml`, `train_ddp.yaml`, `train_deepspeed.yaml` +we provide the script `train.sh` to run the training task , and two Stategy in `configs`:`train_colossalai.yaml`, `train_ddp.yaml` for example, you can run the training from colossalai by ``` diff --git a/examples/images/diffusion/configs/train_deepspeed.yaml b/examples/images/diffusion/configs/train_deepspeed.yaml deleted file mode 100644 index 92499de80..000000000 --- a/examples/images/diffusion/configs/train_deepspeed.yaml +++ /dev/null @@ -1,117 +0,0 @@ -model: - base_learning_rate: 1.0e-04 - target: ldm.models.diffusion.ddpm.LatentDiffusion - params: - linear_start: 0.00085 - linear_end: 0.0120 - num_timesteps_cond: 1 - log_every_t: 200 - timesteps: 1000 - first_stage_key: image - cond_stage_key: caption - image_size: 32 - channels: 4 - cond_stage_trainable: false # Note: different from the one we trained before - conditioning_key: crossattn - monitor: val/loss_simple_ema - scale_factor: 0.18215 - use_ema: False - - scheduler_config: # 10000 warmup steps - target: ldm.lr_scheduler.LambdaLinearScheduler - params: - warm_up_steps: [ 10000 ] - cycle_lengths: [ 10000000000000 ] # incredibly large number to prevent corner cases - f_start: [ 1.e-6 ] - f_max: [ 1.e-4 ] - f_min: [ 1.e-10 ] - - unet_config: - target: ldm.modules.diffusionmodules.openaimodel.UNetModel - params: - image_size: 32 # unused - in_channels: 4 - out_channels: 4 - model_channels: 320 - attention_resolutions: [ 4, 2, 1 ] - num_res_blocks: 2 - channel_mult: [ 1, 2, 4, 4 ] - num_heads: 8 - use_spatial_transformer: True - transformer_depth: 1 - context_dim: 768 - use_checkpoint: False - legacy: False - use_fp16: True - - first_stage_config: - target: ldm.models.autoencoder.AutoencoderKL - params: - embed_dim: 4 - monitor: val/rec_loss - ddconfig: - double_z: true - z_channels: 4 - resolution: 256 - in_channels: 3 - out_ch: 3 - ch: 128 - ch_mult: - - 1 - - 2 - - 4 - - 4 - num_res_blocks: 2 - attn_resolutions: [] - dropout: 0.0 - lossconfig: - target: torch.nn.Identity - - cond_stage_config: - target: ldm.modules.encoders.modules.FrozenCLIPEmbedder - params: - use_fp16: True - -data: - target: main.DataModuleFromConfig - params: - batch_size: 4 - wrap: False - train: - target: ldm.data.base.Txt2ImgIterableBaseDataset - params: - file_path: "/data/scratch/diffuser/laion_part0/" - world_size: 1 - rank: 0 - -lightning: - trainer: - accelerator: 'gpu' - devices: 4 - log_gpu_memory: all - max_epochs: 2 - precision: 16 - auto_select_gpus: False - strategy: - target: pytorch_lightning.strategies.DeepSpeedStrategy - params: - stage: 2 - zero_optimization: True - offload_optimizer: False - offload_parameters: False - log_every_n_steps: 2 -# max_steps: 6o - logger: True - default_root_dir: "/tmp/diff_log/" - profiler: pytorch - - logger_config: - wandb: - target: pytorch_lightning.loggers.WandbLogger - params: - name: nowname - save_dir: logdir - offline: opt.debug - id: nowname - - diff --git a/examples/images/diffusion/environment.yaml b/examples/images/diffusion/environment.yaml index 75056efd8..fc529102c 100644 --- a/examples/images/diffusion/environment.yaml +++ b/examples/images/diffusion/environment.yaml @@ -26,7 +26,6 @@ dependencies: - transformers==4.19.2 - torchmetrics==0.6.0 - kornia==0.6 - - deepspeed==0.7.4 - prefetch_generator - -e git+https://github.com/CompVis/taming-transformers.git@master#egg=taming-transformers - -e git+https://github.com/openai/CLIP.git@main#egg=clip