Documentation
¶
Index ¶
- type CPUInfo
- type ClientWrapper
- func (c ClientWrapper) Ping(ctx context.Context) error
- func (c ClientWrapper) QueueStatus(ctx context.Context) (*EstimationData, error)
- func (c ClientWrapper) SysInfo(ctx context.Context) (*SystemInfo, error)
- func (c ClientWrapper) Text2Image(ctx context.Context, req *gen.Text2imgapiSdapiV1Txt2imgPostJSONRequestBody) (*Text2imgapiSdapiV1Txt2imgPostResponse, error)
- type EstimationData
- type NvidiaGPUModels
- type Parameters
- type RAMInfo
- type SystemInfo
- type Text2imgapiSdapiV1Txt2imgPostResponse
- type TorchEnv
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientWrapper ¶
type ClientWrapper struct {
// contains filtered or unexported fields
}
func New ¶
func New(url string) (*ClientWrapper, error)
func (ClientWrapper) QueueStatus ¶
func (c ClientWrapper) QueueStatus(ctx context.Context) (*EstimationData, error)
func (ClientWrapper) SysInfo ¶
func (c ClientWrapper) SysInfo(ctx context.Context) (*SystemInfo, error)
func (ClientWrapper) Text2Image ¶
func (c ClientWrapper) Text2Image(ctx context.Context, req *gen.Text2imgapiSdapiV1Txt2imgPostJSONRequestBody) (*Text2imgapiSdapiV1Txt2imgPostResponse, error)
type EstimationData ¶
type EstimationData struct {
Msg string `json:"msg"`
Rank interface{} `json:"rank"` // Can be null or another type
QueueSize int `json:"queue_size"`
AvgEventProcessTime float64 `json:"avg_event_process_time"`
AvgEventConcurrentProcessTime float64 `json:"avg_event_concurrent_process_time"`
RankEta interface{} `json:"rank_eta"` // Can be null or another type
QueueEta int `json:"queue_eta"`
}
type NvidiaGPUModels ¶
type NvidiaGPUModels []string
NvidiaGPUModels is a custom type that can hold either a single model or multiple models.
func (*NvidiaGPUModels) UnmarshalJSON ¶
func (m *NvidiaGPUModels) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the unmarshaling logic for NvidiaGPUModels to handle both a single string and an array of strings.
type Parameters ¶
type Parameters struct {
Prompt string `json:"prompt"`
NegativePrompt string `json:"negative_prompt"`
Styles interface{} `json:"styles"`
Seed int `json:"seed"`
Subseed int `json:"subseed"`
SubseedStrength float64 `json:"subseed_strength"`
SeedResizeFromH int `json:"seed_resize_from_h"`
SeedResizeFromW int `json:"seed_resize_from_w"`
SamplerName interface{} `json:"sampler_name"`
BatchSize int `json:"batch_size"`
NIter int `json:"n_iter"`
Steps int `json:"steps"`
CfgScale float64 `json:"cfg_scale"`
Width int `json:"width"`
Height int `json:"height"`
RestoreFaces interface{} `json:"restore_faces"`
Tiling interface{} `json:"tiling"`
DoNotSaveSamples bool `json:"do_not_save_samples"`
DoNotSaveGrid bool `json:"do_not_save_grid"`
Eta interface{} `json:"eta"`
DenoisingStrength interface{} `json:"denoising_strength"`
SMinUncond interface{} `json:"s_min_uncond"`
SChurn interface{} `json:"s_churn"`
STmax interface{} `json:"s_tmax"`
STmin interface{} `json:"s_tmin"`
SNoise interface{} `json:"s_noise"`
OverrideSettings interface{} `json:"override_settings"`
OverrideSettingsRestoreAfterwards bool `json:"override_settings_restore_afterwards"`
RefinerCheckpoint interface{} `json:"refiner_checkpoint"`
RefinerSwitchAt interface{} `json:"refiner_switch_at"`
DisableExtraNetworks bool `json:"disable_extra_networks"`
Comments interface{} `json:"comments"`
EnableHr bool `json:"enable_hr"`
FirstphaseWidth int `json:"firstphase_width"`
FirstphaseHeight int `json:"firstphase_height"`
HrScale float64 `json:"hr_scale"`
HrUpscaler interface{} `json:"hr_upscaler"`
HrSecondPassSteps int `json:"hr_second_pass_steps"`
HrResizeX int `json:"hr_resize_x"`
HrResizeY int `json:"hr_resize_y"`
HrCheckpointName interface{} `json:"hr_checkpoint_name"`
HrSamplerName interface{} `json:"hr_sampler_name"`
HrPrompt string `json:"hr_prompt"`
HrNegativePrompt string `json:"hr_negative_prompt"`
SamplerIndex string `json:"sampler_index"`
ScriptName interface{} `json:"script_name"`
ScriptArgs []interface{} `json:"script_args"`
SendImages bool `json:"send_images"`
SaveImages bool `json:"save_images"`
AlwaysonScripts interface{} `json:"alwayson_scripts"`
}
type SystemInfo ¶
type SystemInfo struct {
Platform string `json:"Platform"`
Python string `json:"Python"`
Version string `json:"Version"`
Commit string `json:"Commit"`
ScriptPath string `json:"Script path"`
DataPath string `json:"Data path"`
ExtensionsDir string `json:"Extensions dir"`
Checksum string `json:"Checksum"`
Commandline []string `json:"Commandline"`
TorchEnvInfo TorchEnv `json:"Torch env info"`
CPU CPUInfo `json:"CPU"`
RAM RAMInfo `json:"RAM"`
}
type Text2imgapiSdapiV1Txt2imgPostResponse ¶
type Text2imgapiSdapiV1Txt2imgPostResponse struct {
Images []string `json:"images"`
Parameters Parameters `json:"parameters"`
Info string `json:"info"`
}
type TorchEnv ¶
type TorchEnv struct {
TorchVersion string `json:"torch_version"`
IsDebugBuild string `json:"is_debug_build"`
CudaCompiledVersion string `json:"cuda_compiled_version"`
GCCVersion string `json:"gcc_version"`
ClangVersion string `json:"clang_version"`
CmakeVersion string `json:"cmake_version"`
OS string `json:"os"`
LibcVersion string `json:"libc_version"`
PythonVersion string `json:"python_version"`
PythonPlatform string `json:"python_platform"`
IsCudaAvailable string `json:"is_cuda_available"`
CudaRuntimeVersion string `json:"cuda_runtime_version"`
CudaModuleLoading string `json:"cuda_module_loading"`
NvidiaDriverVersion string `json:"nvidia_driver_version"`
NvidiaGPUModels NvidiaGPUModels `json:"nvidia_gpu_models"`
CudnnVersion string `json:"cudnn_version"`
PipVersion string `json:"pip_version"`
PipPackages []string `json:"pip_packages"`
CondaPackages []string `json:"conda_packages"`
CPUInfo []string `json:"cpu_info"`
}
Click to show internal directories.
Click to hide internal directories.