mirror of
https://github.com/GayPizzaSpecifications/stable-diffusion-rpc.git
synced 2025-08-05 14:31:32 +00:00
Job management and preparation for multi-hosting.
This commit is contained in:
63
Common/host.proto
Normal file
63
Common/host.proto
Normal file
@ -0,0 +1,63 @@
|
||||
/**
|
||||
* Host management for the Stable Diffusion RPC service.
|
||||
*/
|
||||
syntax = "proto3";
|
||||
package gay.pizza.stable.diffusion;
|
||||
import "shared.proto";
|
||||
|
||||
/**
|
||||
* Utilize a prefix of 'Sd' for Swift.
|
||||
*/
|
||||
option swift_prefix = "Sd";
|
||||
option java_multiple_files = true;
|
||||
|
||||
/**
|
||||
* Represents a request to list the models available on the host.
|
||||
*/
|
||||
message ListModelsRequest {}
|
||||
|
||||
/**
|
||||
* Represents a response to listing the models available on the host.
|
||||
*/
|
||||
message ListModelsResponse {
|
||||
/**
|
||||
* The available models on the Stable Diffusion server.
|
||||
*/
|
||||
repeated ModelInfo available_models = 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents a request to load a model into a specified compute unit.
|
||||
*/
|
||||
message LoadModelRequest {
|
||||
/**
|
||||
* The model name to load onto the compute unit.
|
||||
*/
|
||||
string model_name = 1;
|
||||
|
||||
/**
|
||||
* The compute units to load the model onto.
|
||||
*/
|
||||
ComputeUnits compute_units = 2;
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents a response to loading a model.
|
||||
*/
|
||||
message LoadModelResponse {}
|
||||
|
||||
/**
|
||||
* The model service, for management and loading of models.
|
||||
*/
|
||||
service ModelService {
|
||||
/**
|
||||
* Lists the available models on the host.
|
||||
* This will return both models that are currently loaded, and models that are not yet loaded.
|
||||
*/
|
||||
rpc ListModels(ListModelsRequest) returns (ListModelsResponse);
|
||||
|
||||
/**
|
||||
* Loads a model onto a compute unit.
|
||||
*/
|
||||
rpc LoadModel(LoadModelRequest) returns (LoadModelResponse);
|
||||
}
|
Reference in New Issue
Block a user