Spaces:
Sleeping
Sleeping
Factor Studios
commited on
Update websocket_storage.py
Browse files- websocket_storage.py +9 -5
websocket_storage.py
CHANGED
|
@@ -235,7 +235,7 @@ class WebSocketGPUStorage:
|
|
| 235 |
|
| 236 |
# Store state in memory
|
| 237 |
operation = {
|
| 238 |
-
'operation': '
|
| 239 |
'type': 'write',
|
| 240 |
'key': state_key,
|
| 241 |
'data': state_data,
|
|
@@ -318,11 +318,15 @@ class WebSocketGPUStorage:
|
|
| 318 |
model_hash = self._calculate_model_hash(model_path)
|
| 319 |
|
| 320 |
operation = {
|
| 321 |
-
'operation': '
|
| 322 |
'type': 'write',
|
| 323 |
-
'
|
| 324 |
-
'
|
| 325 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
| 326 |
}
|
| 327 |
|
| 328 |
response = self._send_operation(operation)
|
|
|
|
| 235 |
|
| 236 |
# Store state in memory
|
| 237 |
operation = {
|
| 238 |
+
'operation': 'state',
|
| 239 |
'type': 'write',
|
| 240 |
'key': state_key,
|
| 241 |
'data': state_data,
|
|
|
|
| 318 |
model_hash = self._calculate_model_hash(model_path)
|
| 319 |
|
| 320 |
operation = {
|
| 321 |
+
'operation': 'vram',
|
| 322 |
'type': 'write',
|
| 323 |
+
'block_id': f"model_{model_name}",
|
| 324 |
+
'data': model_data,
|
| 325 |
+
'metadata': {
|
| 326 |
+
'hash': model_hash,
|
| 327 |
+
'model_name': model_name,
|
| 328 |
+
'type': 'model'
|
| 329 |
+
}
|
| 330 |
}
|
| 331 |
|
| 332 |
response = self._send_operation(operation)
|