Spaces:
Runtime error
Runtime error
Kunpeng Song
commited on
Commit
·
5feb88f
1
Parent(s):
0b29f0b
fix zero
Browse files- .DS_Store +0 -0
- app.py +2 -3
- env_test.sh +10 -0
.DS_Store
CHANGED
Binary files a/.DS_Store and b/.DS_Store differ
|
|
app.py
CHANGED
@@ -24,10 +24,9 @@ def inference(rgb, subject, prompt, strength, seed):
|
|
24 |
|
25 |
if model is None:
|
26 |
from model_lib.modules import MoMA_main_modal
|
27 |
-
|
28 |
|
29 |
-
|
30 |
-
generated_image = rgb
|
31 |
|
32 |
return generated_image
|
33 |
|
|
|
24 |
|
25 |
if model is None:
|
26 |
from model_lib.modules import MoMA_main_modal
|
27 |
+
model = MoMA_main_modal(args).to(device, dtype=torch.float16)
|
28 |
|
29 |
+
generated_image = model.generate_images(rgb, subject, prompt, strength=strength, seed=seed)
|
|
|
30 |
|
31 |
return generated_image
|
32 |
|
env_test.sh
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
pip uninstall flash-attn
|
2 |
+
|
3 |
+
git clone https://github.com/haotian-liu/LLaVA.git
|
4 |
+
cd LLaVA
|
5 |
+
|
6 |
+
pip install --upgrade pip # enable PEP 660 support
|
7 |
+
pip install -e .
|
8 |
+
|
9 |
+
pip install -e ".[train]"
|
10 |
+
pip install flash-attn --no-build-isolation --no-cache-dir
|