Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -133,7 +133,18 @@ def clear_history(state, state_):
|
|
133 |
True, state, state_, state.to_gradio_chatbot(), [[], []])
|
134 |
|
135 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
136 |
|
|
|
137 |
conv_mode = "llava_v1"
|
138 |
model_path = 'LanguageBind/Video-LLaVA-7B'
|
139 |
device = 'cuda'
|
@@ -144,7 +155,7 @@ handler = Chat(model_path, conv_mode=conv_mode, load_8bit=load_8bit, load_4bit=l
|
|
144 |
# handler.model.to(dtype=dtype)
|
145 |
if not os.path.exists("temp"):
|
146 |
os.makedirs("temp")
|
147 |
-
|
148 |
print(torch.cuda.memory_allocated())
|
149 |
print(torch.cuda.max_memory_allocated())
|
150 |
|
|
|
133 |
True, state, state_, state.to_gradio_chatbot(), [[], []])
|
134 |
|
135 |
|
136 |
+
conv_mode = "llava_v1"
|
137 |
+
model_path = 'LanguageBind/Video-LLaVA-7B'
|
138 |
+
device = 'cpu'
|
139 |
+
load_8bit = False
|
140 |
+
load_4bit = True
|
141 |
+
dtype = torch.get_default_dtype()
|
142 |
+
handler = Chat(model_path, conv_mode=conv_mode, load_8bit=load_8bit, load_4bit=load_8bit, device=device)
|
143 |
+
# handler.model.to(dtype=dtype)
|
144 |
+
if not os.path.exists("temp"):
|
145 |
+
os.makedirs("temp")
|
146 |
|
147 |
+
'''
|
148 |
conv_mode = "llava_v1"
|
149 |
model_path = 'LanguageBind/Video-LLaVA-7B'
|
150 |
device = 'cuda'
|
|
|
155 |
# handler.model.to(dtype=dtype)
|
156 |
if not os.path.exists("temp"):
|
157 |
os.makedirs("temp")
|
158 |
+
'''
|
159 |
print(torch.cuda.memory_allocated())
|
160 |
print(torch.cuda.max_memory_allocated())
|
161 |
|