diff --git a/lib/src/_http_endpoints.dart b/lib/src/_http_endpoints.dart index 7e20e94..49435da 100644 --- a/lib/src/_http_endpoints.dart +++ b/lib/src/_http_endpoints.dart @@ -160,6 +160,13 @@ class ComfyApiHttpEndpoints { return jsonDecode(response.body); } + /// Gets system stats, including OS, Python version, etc. + Future> getSystemStats() async { + final response = await _httpClient.get(Uri.parse('$host/system_stats')); + _validateResponse(response); + return jsonDecode(response.body); + } + /// Gets a list of possible samplers from the object info Future> getKSamplers() async { final objectInfo = await getObjectInfo(); diff --git a/lib/src/comfyui_api.dart b/lib/src/comfyui_api.dart index 251eba1..cb7f73b 100644 --- a/lib/src/comfyui_api.dart +++ b/lib/src/comfyui_api.dart @@ -143,6 +143,10 @@ class ComfyUiApi { Future> getObjectInfo() => _httpEndpoints.getObjectInfo(); + /// Gets system stats from the server + Future> getSystemStats() => + _httpEndpoints.getSystemStats(); + /// Gets a list of possible samplers from the object info Future> getKSamplers() => _httpEndpoints.getKSamplers();