update
Browse files- Dockerfile +1 -1
- demo/client.py +18 -2
- demo/demo.sh +8 -3
Dockerfile
CHANGED
@@ -80,4 +80,4 @@ EXPOSE 5003
|
|
80 |
CMD ["bash", "demo/demo.sh"]
|
81 |
|
82 |
# DOCKER_BUILDKIT=1 docker build --ssh default --network=host -t unidisc .
|
83 |
-
# docker run --network=host -it -p 5003:5003 unidisc
|
|
|
80 |
CMD ["bash", "demo/demo.sh"]
|
81 |
|
82 |
# DOCKER_BUILDKIT=1 docker build --ssh default --network=host -t unidisc .
|
83 |
+
# docker run --gpus all --network=host -it -p 5003:5003 unidisc
|
demo/client.py
CHANGED
@@ -1,21 +1,37 @@
|
|
|
|
1 |
from fasthtml.common import *
|
2 |
from fasthtml.svg import *
|
3 |
from monsterui.all import *
|
|
|
4 |
from pathlib import Path
|
5 |
import requests
|
6 |
import base64
|
7 |
from PIL import Image
|
|
|
8 |
import numpy as np
|
9 |
import io
|
10 |
import json
|
11 |
|
12 |
-
|
13 |
|
14 |
SHOW_DEV_BUTTONS = True
|
15 |
DEMO_DIR = Path(__file__).parent
|
16 |
ADD_DEV_FORM = True
|
17 |
|
18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
|
20 |
DEMOS = [
|
21 |
{
|
|
|
1 |
+
print(f"Import 00")
|
2 |
from fasthtml.common import *
|
3 |
from fasthtml.svg import *
|
4 |
from monsterui.all import *
|
5 |
+
print(f"Import 01")
|
6 |
from pathlib import Path
|
7 |
import requests
|
8 |
import base64
|
9 |
from PIL import Image
|
10 |
+
print(f"Import 02")
|
11 |
import numpy as np
|
12 |
import io
|
13 |
import json
|
14 |
|
15 |
+
|
16 |
|
17 |
SHOW_DEV_BUTTONS = True
|
18 |
DEMO_DIR = Path(__file__).parent
|
19 |
ADD_DEV_FORM = True
|
20 |
|
21 |
+
def list_ckpt_files():
|
22 |
+
"""List all files in the ckpts directory."""
|
23 |
+
ckpt_dir = Path("ckpts").absolute()
|
24 |
+
files = []
|
25 |
+
|
26 |
+
if ckpt_dir.exists():
|
27 |
+
for file_path in ckpt_dir.glob("**/*"):
|
28 |
+
if file_path.is_file() or file_path.is_symlink():
|
29 |
+
files.append(str(file_path))
|
30 |
+
|
31 |
+
return sorted(files)
|
32 |
+
|
33 |
+
print(f"CKPT files: {list_ckpt_files()}")
|
34 |
+
|
35 |
|
36 |
DEMOS = [
|
37 |
{
|
demo/demo.sh
CHANGED
@@ -1,6 +1,11 @@
|
|
1 |
#!/bin/bash
|
2 |
|
3 |
-
|
4 |
-
|
5 |
|
6 |
-
uv run python demo/client.py
|
|
|
|
|
|
|
|
|
|
|
|
1 |
#!/bin/bash
|
2 |
|
3 |
+
ls -la /home/appuser/app/ckpts
|
4 |
+
ls -la /home/appuser/app/ckpts/unidisc_interleaved
|
5 |
|
6 |
+
PYTHONUNBUFFERED=1 uv run python demo/client.py &
|
7 |
+
|
8 |
+
PYTHONUNBUFFERED=1 UNIDISC_FORCE_CUDNN_SPDA_CONTEXT=1 uv run python demo/server.py experiments='[large_scale_train,large_scale_train_high_res_interleaved,eval_unified,large_scale_high_res_interleaved_inference]' \
|
9 |
+
trainer.load_from_state_dict="/home/appuser/app/ckpts/unidisc_interleaved/unidisc_interleaved.pt" model.use_custom_vae_ckpt="/home/appuser/app/ckpts/unidisc_interleaved/vq_ds16_t2i.pt" &
|
10 |
+
|
11 |
+
wait
|