  --gradient_accumulation_steps=4 Some other basic and important parameters to specify include: --pretrained_model_name_or_path: the name of the model on the Hub or a local path to the pretrained model --train_data_dir: path to a folder containing the training dataset (example images) --output_dir: where to save the trained model --push_to_hub: whether to push the trained model to the Hub --checkpointing_steps: frequency of saving a checkpoint as the model trains; this is useful if for some reason training is interrupted, you can continue training from that checkpoint by adding --resume_from_checkpoint to your training command --num_vectors: the number of vectors to learn the embeddings with; increasing this parameter helps the model learn better but it comes with increased training costs --placeholder_token: the special word to tie the learned embeddings to (you must use the word in your prompt for inference) --initializer_token: a single-word that roughly describes the object or style you’re trying to train on --learnable_property: whether you’re training the model to learn a new “style” (for example, Van Gogh’s painting style) or “object” (for example, your dog)  Training script Unlike some of the other training scripts, textual_inversion.py has a custom dataset class, TextualInversionDataset for creating a dataset. You can customize the image size, placeholder token, interpolation method, whether to crop the image, and more. If you need to change how the dataset is created, you can modify TextualInversionDataset. Next, you’ll find the dataset preprocessing code and training loop in the main() function. The script starts by loading the tokenizer, scheduler and model:   Copied # Load tokenizer