Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -11,6 +11,14 @@ subprocess.run(
|
|
11 |
shell=True,
|
12 |
)
|
13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
|
15 |
import argparse
|
16 |
import os
|
@@ -361,7 +369,7 @@ def main():
|
|
361 |
parser = argparse.ArgumentParser()
|
362 |
|
363 |
parser.add_argument("--num_gpus", type=int, default=1)
|
364 |
-
parser.add_argument("--ckpt", type=str,default='/home/
|
365 |
parser.add_argument("--ema", action="store_true")
|
366 |
parser.add_argument("--precision", default="bf16", choices=["bf16", "fp32"])
|
367 |
parser.add_argument("--hf_token", type=str, default=None, help="huggingface read token for accessing gated repo.")
|
|
|
11 |
shell=True,
|
12 |
)
|
13 |
|
14 |
+
os.makedirs("/home/user/app/checkpoints", exist_ok=True)
|
15 |
+
from huggingface_hub import snapshot_download
|
16 |
+
snapshot_download(
|
17 |
+
repo_id="Alpha-VLLM/Lumina-Image-2.0", local_dir="/home/user/app/checkpoints"
|
18 |
+
)
|
19 |
+
|
20 |
+
hf_token = os.environ["HF_TOKEN"]
|
21 |
+
|
22 |
|
23 |
import argparse
|
24 |
import os
|
|
|
369 |
parser = argparse.ArgumentParser()
|
370 |
|
371 |
parser.add_argument("--num_gpus", type=int, default=1)
|
372 |
+
parser.add_argument("--ckpt", type=str,default='/home/user/app/checkpoints', required=False)
|
373 |
parser.add_argument("--ema", action="store_true")
|
374 |
parser.add_argument("--precision", default="bf16", choices=["bf16", "fp32"])
|
375 |
parser.add_argument("--hf_token", type=str, default=None, help="huggingface read token for accessing gated repo.")
|