Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ MaxDiffusion started as a fork of [Diffusers](https://github.com/huggingface/dif

Whether you are forking MaxDiffusion for your own needs or intending to contribute back to the community, a full suite of tests can be found in `tests` and `src/maxdiffusion/tests`.

To run unit tests, simply run:
To run unit tests simply run:
```
python -m pytest
```
Expand Down
4 changes: 1 addition & 3 deletions docs/getting_started/first_run.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ multiple hosts.
1. Clone MaxDiffusion in your TPU VM.
1. Within the root directory of the MaxDiffusion `git` repo, install dependencies by running:
```bash
pip3 install jax[tpu] -f https://storage.googleapis.com/jax-releases/libtpu_releases.html
pip3 install -r requirements.txt
pip3 install .
bash setup.sh MODE=stable
```

## Getting Starting: Multihost development
Expand Down
3 changes: 3 additions & 0 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,6 @@ fi

# Install dependencies from requirements.txt
pip3 install -U -r requirements.txt

# Install maxdiffusion
pip3 install -U .
1 change: 1 addition & 0 deletions src/maxdiffusion/configs/base_xl_lightning.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ ici_tensor_parallelism: 1
# Dataset
# Replace with dataset path or train_data_dir. One has to be set.
dataset_name: ''
dataset_type: 'tf'
train_data_dir: ''
dataset_config_name: ''
jax_cache_dir: ''
Expand Down
2 changes: 1 addition & 1 deletion src/maxdiffusion/max_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def write_metrics_for_gcs(metrics, step, config, running_metrics):
"""Writes metrics to gcs"""
metrics_dict_step = _prepare_metrics_for_json(metrics, step, config.run_name)
running_metrics.append(metrics_dict_step)
if (step + 1) % config.log_period == 0 or step == config.steps - 1:
if (step + 1) % config.log_period == 0 or step == config.max_train_steps - 1:
start_step = (step // config.log_period) * config.log_period
metrics_filename = f"metrics_step_{start_step:06}_to_step_{step:06}.txt"
with open(metrics_filename, "w", encoding="utf8") as metrics_for_gcs:
Expand Down