WebSocket Worker¶
The WebSocketWorker
encapsulates and serves a single instance of the MotionInferenceWorker
.
For setup, it requires the backend_host
and backend_port
, as well as which checkpoint
to load for the inference worker.
We plan to add more checkpoints in the future, currently there are only two checkpoints available, both from the original CondMDI repository:
random_frames
(Default)- Trained on in-betweening full poses on random frames.
- Good for full-body in-betweening.
random_joints
- Trained on in-betweening random joints (partial poses) on random frames.
- Good for in-betweening partial poses.
models.condmdi.molab_condmdi.websocket_worker
¶
WebSocketWorker
¶
__init__(backend_host='localhost', backend_port=8000, checkpoint='random_frames')
¶
Initialize the WebSocketWorker.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
backend_host
|
str
|
The hostname of the backend server. Defaults to "localhost". |
'localhost'
|
backend_port
|
int
|
The port number of the backend server. Defaults to 8000. |
8000
|
checkpoint
|
str
|
The name of the checkpoint to be used, current choices are "random_frames" (Default) or "random_joints". |
'random_frames'
|
Attributes:
Name | Type | Description |
---|---|---|
inference_worker |
None
|
Placeholder for the inference worker. |
uri |
str
|
The WebSocket URI for registering the worker. |
checkpoint |
str
|
The name of the checkpoint. |
checkpoint_path |
Path
|
The path to the model checkpoint file. |
Raises:
Type | Description |
---|---|
FileNotFoundError
|
If the model checkpoint file is not found at the specified path. |
serve()
async
¶
Connect to the gateway and wait for inference requests.