a 16GB GPU. You’ll need at least 24GB VRAM to use this option.
Pass the --train_text_encoder argument to the training script to enable finetuning the text_encoder and unet:


Pytorch

Hide Pytorch content



	Copied
export MODEL_NAME="CompVis/stable-diffusion-v1-4"
export INSTANCE_DIR="./dog"
export CLASS_DIR="path_to_class_images"
export OUTPUT_DIR="path_to_saved_model"

accelerate launch train_dreambooth.py \
  --pretrained_model_name_or_path