Skip to content

Commit 0bf4357

Browse files
committed
path fix.
1 parent 812b163 commit 0bf4357

File tree

10 files changed

+616
-4
lines changed

10 files changed

+616
-4
lines changed

base.png

1.07 MB
Loading

compile_last.png

1.04 MB
Loading

compile_last.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Loading pipeline components...: 0%| | 0/7 [00:00<?, ?it/s]You set `add_prefix_space`. The tokenizer needs to be converted from the slow tokenizers
2+
Loading pipeline components...: 29%|██▊ | 2/7 [00:00<00:00, 9.52it/s]
3+
Loading checkpoint shards: 0%| | 0/3 [00:00<?, ?it/s]Loading checkpoint shards: 100%|██████████| 3/3 [00:00<00:00, 51.82it/s]
4+
Loading pipeline components...: 71%|███████▏ | 5/7 [00:00<00:00, 13.99it/s]
5+
Loading checkpoint shards: 0%| | 0/2 [00:00<?, ?it/s]Loading checkpoint shards: 100%|██████████| 2/2 [00:00<00:00, 65.67it/s]
6+
Loading pipeline components...: 100%|██████████| 7/7 [00:00<00:00, 15.05it/s]
7+
time mean/var: tensor([4.3879, 4.3965, 4.3994, 4.3941, 4.3931, 4.3900, 4.3813, 4.3718, 4.3671,
8+
4.3671]) 4.384819507598877 0.00015030684880912304

just_compile.png

1.04 MB
Loading

just_compile.txt

Lines changed: 407 additions & 0 deletions
Large diffs are not rendered by default.

log.txt

Lines changed: 185 additions & 0 deletions
Large diffs are not rendered by default.

log_base.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Loading pipeline components...: 0%| | 0/7 [00:00<?, ?it/s]You set `add_prefix_space`. The tokenizer needs to be converted from the slow tokenizers
2+
Loading pipeline components...: 43%|████▎ | 3/7 [00:00<00:00, 11.90it/s]
3+
Loading checkpoint shards: 0%| | 0/3 [00:00<?, ?it/s]Loading checkpoint shards: 100%|██████████| 3/3 [00:00<00:00, 50.62it/s]
4+
Loading pipeline components...: 71%|███████▏ | 5/7 [00:00<00:00, 12.37it/s]
5+
Loading checkpoint shards: 0%| | 0/2 [00:00<?, ?it/s]Loading checkpoint shards: 100%|██████████| 2/2 [00:00<00:00, 63.95it/s]
6+
Loading pipeline components...: 100%|██████████| 7/7 [00:00<00:00, 14.82it/s]
7+
time mean/var: tensor([6.6733, 6.6850, 6.6962, 6.7148, 6.7146, 6.7150, 6.7231, 6.7184, 6.7057,
8+
6.7117]) 6.705780982971191 0.00025744145386852324

optimized_flux_inference.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ def load_pipeline(args):
1212
is_timestep_distilled = not pipeline.transformer.config.guidance_embeds
1313

1414
transformer_package_path = os.path.join(
15-
args.cache_dir, "exported_transformer.pt2" if is_timestep_distilled else "exported_dev_transformer.pt"
15+
args.cache_dir, "exported_transformer.pt2" if is_timestep_distilled else "exported_dev_transformer.pt2"
1616
)
1717
decoder_package_path = os.path.join(
18-
args.cache_dir, "exported_decoder.pt2" if is_timestep_distilled else "exported_dev_decoder.pt"
18+
args.cache_dir, "exported_decoder.pt2" if is_timestep_distilled else "exported_dev_decoder.pt2"
1919
)
2020
loaded_transformer = load_package(transformer_package_path)
2121
loaded_decoder = load_package(decoder_package_path)

output.png

990 KB
Loading

utils/pipeline_utils.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,9 @@ def _example_tensor(*shape):
270270
}
271271

272272
# Possibly serialize model out
273-
transformer_package_path = os.path.join(cache_dir, "exported_transformer.pt2")
273+
transformer_package_path = os.path.join(
274+
cache_dir, "exported_transformer.pt2" if is_timestep_distilled else "exported_dev_transformer.pt2"
275+
)
274276
if serialize:
275277
# Apply export
276278
exported_transformer: torch.export.ExportedProgram = torch.export.export(
@@ -305,7 +307,9 @@ def _example_tensor(*shape):
305307
vae_decode_kwargs = {"return_dict": False}
306308

307309
# Possibly serialize model out
308-
decoder_package_path = os.path.join(cache_dir, "exported_decoder.pt2")
310+
decoder_package_path = os.path.join(
311+
cache_dir, "exported_decoder.pt2" if is_timestep_distilled else "exported_dev_decoder.pt2"
312+
)
309313
if serialize:
310314
# Apply export
311315
exported_decoder: torch.export.ExportedProgram = torch.export.export(

0 commit comments

Comments
 (0)