Skip to content

Commit ccd337a

Browse files
committed
Add OUTPUT_DIR env var to inference script"
1 parent a865d50 commit ccd337a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

examples/research_projects/pytorch_xla/training/text_to_image/inference_sdxl.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,13 @@
99
import torch_xla.runtime as xr
1010

1111
CACHE_DIR = os.environ.get("CACHE_DIR", '/mnt/bbahl/xla_cache/')
12+
OUTPUT_DIR = os.environ.get("OUTPUT_DIR", '/mnt/bbahl/trained-model/')
1213
if CACHE_DIR:
1314
xr.initialize_cache(CACHE_DIR, readonly=False)
1415

1516

1617
device = xm.xla_device()
17-
model_path = "/mnt/bbahl/trained-model"
18+
model_path = OUTPUT_DIR
1819
pipe = StableDiffusionXLPipeline.from_pretrained(
1920
model_path,
2021
torch_dtype=torch.bfloat16

0 commit comments

Comments
 (0)