AutoTrain documentation

DreamBooth Parameters

You are viewing v0.8.21 version. A newer version v0.8.24 is available.
Hugging Face's logo
Join the Hugging Face community

and get access to the augmented documentation experience

to get started

DreamBooth Parameters

class autotrain.trainers.dreambooth.params.DreamBoothTrainingParams

< >

( model: str = None vae_model: Optional = None revision: Optional = None tokenizer: Optional = None image_path: str = None class_image_path: Optional = None prompt: str = None class_prompt: Optional = None num_class_images: int = 100 class_labels_conditioning: Optional = None prior_preservation: bool = False prior_loss_weight: float = 1.0 project_name: str = 'dreambooth-model' seed: int = 42 resolution: int = 512 center_crop: bool = False train_text_encoder: bool = False batch_size: int = 4 sample_batch_size: int = 4 epochs: int = 1 num_steps: int = None checkpointing_steps: int = 500 resume_from_checkpoint: Optional = None gradient_accumulation: int = 1 disable_gradient_checkpointing: bool = False lr: float = 0.0001 scale_lr: bool = False scheduler: str = 'constant' warmup_steps: int = 0 num_cycles: int = 1 lr_power: float = 1.0 dataloader_num_workers: int = 0 use_8bit_adam: bool = False adam_beta1: float = 0.9 adam_beta2: float = 0.999 adam_weight_decay: float = 0.01 adam_epsilon: float = 1e-08 max_grad_norm: float = 1.0 allow_tf32: bool = False prior_generation_precision: Optional = None local_rank: int = -1 xformers: bool = False pre_compute_text_embeddings: bool = False tokenizer_max_length: Optional = None text_encoder_use_attention_mask: bool = False rank: int = 4 xl: bool = False mixed_precision: Optional = None token: Optional = None push_to_hub: bool = False username: Optional = None validation_prompt: Optional = None num_validation_images: int = 4 validation_epochs: int = 50 checkpoints_total_limit: Optional = None validation_images: Optional = None logging: bool = False )

Parameters

  • model (str) — Name of the model to be used for training.
  • vae_model (Optional[str]) — Name of the VAE model to be used, if any.
  • revision (Optional[str]) — Specific model version to use.
  • tokenizer (Optional[str]) — Tokenizer to be used, if different from the model.
  • image_path (str) — Path to the training images.
  • class_image_path (Optional[str]) — Path to the class images.
  • prompt (str) — Prompt for the instance images.
  • class_prompt (Optional[str]) — Prompt for the class images.
  • num_class_images (int) — Number of class images to generate.
  • class_labels_conditioning (Optional[str]) — Conditioning labels for class images.
  • prior_preservation (bool) — Enable prior preservation during training.
  • prior_loss_weight (float) — Weight of the prior preservation loss.
  • project_name (str) — Name of the project for output directory.
  • seed (int) — Random seed for reproducibility.
  • resolution (int) — Resolution of the training images.
  • center_crop (bool) — Enable center cropping of images.
  • train_text_encoder (bool) — Enable training of the text encoder.
  • batch_size (int) — Batch size for training.
  • sample_batch_size (int) — Batch size for sampling.
  • epochs (int) — Number of training epochs.
  • num_steps (int) — Maximum number of training steps.
  • checkpointing_steps (int) — Steps interval for checkpointing.
  • resume_from_checkpoint (Optional[str]) — Path to resume training from a checkpoint.
  • gradient_accumulation (int) — Number of gradient accumulation steps.
  • disable_gradient_checkpointing (bool) — Disable gradient checkpointing.
  • lr (float) — Learning rate for training.
  • scale_lr (bool) — Enable scaling of the learning rate.
  • scheduler (str) — Type of learning rate scheduler.
  • warmup_steps (int) — Number of warmup steps for learning rate scheduler.
  • num_cycles (int) — Number of cycles for learning rate scheduler.
  • lr_power (float) — Power factor for learning rate scheduler.
  • dataloader_num_workers (int) — Number of workers for data loading.
  • use_8bit_adam (bool) — Enable use of 8-bit Adam optimizer.
  • adam_beta1 (float) — Beta1 parameter for Adam optimizer.
  • adam_beta2 (float) — Beta2 parameter for Adam optimizer.
  • adam_weight_decay (float) — Weight decay for Adam optimizer.
  • adam_epsilon (float) — Epsilon parameter for Adam optimizer.
  • max_grad_norm (float) — Maximum gradient norm for clipping.
  • allow_tf32 (bool) — Allow use of TF32 for training.
  • prior_generation_precision (Optional[str]) — Precision for prior generation.
  • local_rank (int) — Local rank for distributed training.
  • xformers (bool) — Enable xformers memory efficient attention.
  • pre_compute_text_embeddings (bool) — Pre-compute text embeddings before training.
  • tokenizer_max_length (Optional[int]) — Maximum length for tokenizer.
  • text_encoder_use_attention_mask (bool) — Use attention mask for text encoder.
  • rank (int) — Rank for distributed training.
  • xl (bool) — Enable XL model training.
  • mixed_precision (Optional[str]) — Enable mixed precision training.
  • token (Optional[str]) — Token for accessing the model hub.
  • push_to_hub (bool) — Enable pushing the model to the hub.
  • username (Optional[str]) — Username for the model hub.
  • validation_prompt (Optional[str]) — Prompt for validation images.
  • num_validation_images (int) — Number of validation images to generate.
  • validation_epochs (int) — Epoch interval for validation.
  • checkpoints_total_limit (Optional[int]) — Total limit for checkpoints.
  • validation_images (Optional[str]) — Path to validation images.
  • logging (bool) — Enable logging using TensorBoard.

DreamBoothTrainingParams

< > Update on GitHub