Spaces:
Sleeping
Sleeping
Commit
·
aea387e
1
Parent(s):
e71f8a4
update
Browse files
app.py
CHANGED
|
@@ -27,7 +27,7 @@ if not os.path.exists('images2'):
|
|
| 27 |
|
| 28 |
|
| 29 |
# if not os.path.exists('architecture.jpg'):
|
| 30 |
-
|
| 31 |
|
| 32 |
# if not os.path.exists('gray256.jpg'):
|
| 33 |
# os.system('wget https://huggingface.co/JingyeChen22/textdiffuser2-full-ft/blob/main/gray256.jpg')
|
|
@@ -40,19 +40,19 @@ os.system('ls')
|
|
| 40 |
# # print(img.size)
|
| 41 |
# exit(0)
|
| 42 |
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
|
| 57 |
#### import diffusion models
|
| 58 |
text_encoder = CLIPTextModel.from_pretrained(
|
|
|
|
| 27 |
|
| 28 |
|
| 29 |
# if not os.path.exists('architecture.jpg'):
|
| 30 |
+
os.system('wget https://huggingface.co/JingyeChen22/textdiffuser2-full-ft/tree/main/layout_planner_m1')
|
| 31 |
|
| 32 |
# if not os.path.exists('gray256.jpg'):
|
| 33 |
# os.system('wget https://huggingface.co/JingyeChen22/textdiffuser2-full-ft/blob/main/gray256.jpg')
|
|
|
|
| 40 |
# # print(img.size)
|
| 41 |
# exit(0)
|
| 42 |
|
| 43 |
+
#### import m1
|
| 44 |
+
from fastchat.model import load_model, get_conversation_template
|
| 45 |
+
m1_model_path = './layout_planner_m1'
|
| 46 |
+
m1_model, m1_tokenizer = load_model(
|
| 47 |
+
m1_model_path,
|
| 48 |
+
'cuda',
|
| 49 |
+
1,
|
| 50 |
+
None,
|
| 51 |
+
False,
|
| 52 |
+
False,
|
| 53 |
+
revision="main",
|
| 54 |
+
debug=False,
|
| 55 |
+
)
|
| 56 |
|
| 57 |
#### import diffusion models
|
| 58 |
text_encoder = CLIPTextModel.from_pretrained(
|