Skip to content

Commit 5b141d6

Browse files
committed
Document standalone image gen script in README
1 parent e204848 commit 5b141d6

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,21 @@ For hardware, we used a 96GB 700W H100 GPU. Some of the optimizations applied (B
5252

5353
## Run the optimized pipeline
5454

55-
TODO
55+
```
56+
python gen_image.py --prompt "An astronaut standing next to a giant lemon" --output-file output.png --use-cached-model
57+
```
58+
59+
This will include all optimizations and will attempt to use pre-cached binary models
60+
generated via `torch.export` + AOTI. To generate these binaries for subsequent runs, run
61+
the above command without the `--use-cached-model` flag.
5662

5763
> [!IMPORTANT]
58-
> The binaries won't work for hardware that are different from the ones they were obtained on. For example, if the binaries were obtained on an H100, they won't work on A100.
64+
> The binaries won't work for hardware that is sufficiently different from the hardware they were
65+
> obtained on. For example, if the binaries were obtained on an H100, they won't work on A100.
66+
> Further, the binaries are currently Linux-only and include dependencies on specific versions
67+
> of system libs such as libstdc++; they will not work if they were generated in a sufficiently
68+
> different environment than the one present at runtime. The PyTorch Compiler team is working on
69+
> solutions for more portable binaries / artifact caching.
5970
6071
## Benchmarking
6172
[`run_benchmark.py`](./run_benchmark.py) is the main script for benchmarking the different optimization techniques.

gen_image.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,4 @@ def main(args):
2424
if __name__ == "__main__":
2525
parser = create_parser()
2626
args = parser.parse_args()
27-
# use the cached model to minimize latency
28-
args.use_cached_model = True
2927
main(args)

0 commit comments

Comments
 (0)