Skip to content

Commit 7e92c5b

Browse files
shirayupcuenca
andauthored
Fix typos (huggingface#718)
* Fix typos * Update examples/dreambooth/train_dreambooth.py Co-authored-by: Pedro Cuenca <[email protected]> Co-authored-by: Pedro Cuenca <[email protected]>
1 parent 4d1cce2 commit 7e92c5b

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

docs/source/optimization/fp16.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ print(pipe.unet.conv_out.state_dict()["weight"].stride()) # (2880, 9, 3, 1)
120120
pipe.unet.to(memory_format=torch.channels_last) # in-place operation
121121
print(
122122
pipe.unet.conv_out.state_dict()["weight"].stride()
123-
) # (2880, 1, 960, 320) haveing a stride of 1 for the 2nd dimension proves that it works
123+
) # (2880, 1, 960, 320) having a stride of 1 for the 2nd dimension proves that it works
124124
```
125125

126126
## Tracing

examples/dreambooth/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ accelerate launch train_dreambooth.py \
6262
### Training with prior-preservation loss
6363

6464
Prior-preservation is used to avoid overfitting and language-drift. Refer to the paper to learn more about it. For prior-preservation we first generate images using the model with a class prompt and then use those during training along with our data.
65-
According to the paper, it's recommened to generate `num_epochs * num_samples` images for prior-preservation. 200-300 works well for most cases.
65+
According to the paper, it's recommended to generate `num_epochs * num_samples` images for prior-preservation. 200-300 works well for most cases.
6666

6767
```bash
6868
export MODEL_NAME="CompVis/stable-diffusion-v1-4"

examples/dreambooth/train_dreambooth.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,19 +58,19 @@ def parse_args():
5858
"--instance_prompt",
5959
type=str,
6060
default=None,
61-
help="The prompt with identifier specifing the instance",
61+
help="The prompt with identifier specifying the instance",
6262
)
6363
parser.add_argument(
6464
"--class_prompt",
6565
type=str,
6666
default=None,
67-
help="The prompt to specify images in the same class as provided intance images.",
67+
help="The prompt to specify images in the same class as provided instance images.",
6868
)
6969
parser.add_argument(
7070
"--with_prior_preservation",
7171
default=False,
7272
action="store_true",
73-
help="Flag to add prior perservation loss.",
73+
help="Flag to add prior preservation loss.",
7474
)
7575
parser.add_argument("--prior_loss_weight", type=float, default=1.0, help="The weight of prior preservation loss.")
7676
parser.add_argument(
@@ -214,7 +214,7 @@ def parse_args():
214214

215215
class DreamBoothDataset(Dataset):
216216
"""
217-
A dataset to prepare the instance and class images with the promots for fine-tuning the model.
217+
A dataset to prepare the instance and class images with the prompts for fine-tuning the model.
218218
It pre-processes the images and the tokenizes prompts.
219219
"""
220220

examples/test_examples.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class SubprocessCallException(Exception):
4040
def run_command(command: List[str], return_stdout=False):
4141
"""
4242
Runs `command` with `subprocess.check_output` and will potentially return the `stdout`. Will also properly capture
43-
if an error occured while running `command`
43+
if an error occurred while running `command`
4444
"""
4545
try:
4646
output = subprocess.check_output(command, stderr=subprocess.STDOUT)

0 commit comments

Comments
 (0)