lint
This commit is contained in:
parent
c9fd7a730a
commit
1071e17626
@ -526,7 +526,7 @@ func ListRunningHandler(cmd *cobra.Command, args []string) error {
|
|||||||
var data [][]string
|
var data [][]string
|
||||||
|
|
||||||
for _, m := range models.Models {
|
for _, m := range models.Models {
|
||||||
if len(args) == 0 || strings.HasPrefix(m.Name, args[0]) {
|
if len(args) == 0 || strings.HasPrefix(m.Model, args[0]) {
|
||||||
var procStr string
|
var procStr string
|
||||||
switch {
|
switch {
|
||||||
case m.SizeVRAM == 0:
|
case m.SizeVRAM == 0:
|
||||||
@ -540,7 +540,7 @@ func ListRunningHandler(cmd *cobra.Command, args []string) error {
|
|||||||
cpuPercent := math.Round(float64(sizeCPU) / float64(m.Size) * 100)
|
cpuPercent := math.Round(float64(sizeCPU) / float64(m.Size) * 100)
|
||||||
procStr = fmt.Sprintf("%d%%/%d%% CPU/GPU", int(cpuPercent), int(100-cpuPercent))
|
procStr = fmt.Sprintf("%d%%/%d%% CPU/GPU", int(cpuPercent), int(100-cpuPercent))
|
||||||
}
|
}
|
||||||
data = append(data, []string{m.Name, m.Digest[:12], format.HumanBytes(m.Size), procStr, format.HumanTime(m.ExpiresAt, "Never")})
|
data = append(data, []string{m.Model, m.Digest[:12], format.HumanBytes(m.Size), procStr, format.HumanTime(m.ExpiresAt, "Never")})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -800,7 +800,6 @@ func (s *Server) ListModelsHandler(c *gin.Context) {
|
|||||||
|
|
||||||
// tag should never be masked
|
// tag should never be masked
|
||||||
models = append(models, api.ListModelResponse{
|
models = append(models, api.ListModelResponse{
|
||||||
Model: n.DisplayShortest(),
|
|
||||||
Name: n.DisplayShortest(),
|
Name: n.DisplayShortest(),
|
||||||
Size: m.Size(),
|
Size: m.Size(),
|
||||||
Digest: m.digest,
|
Digest: m.digest,
|
||||||
@ -1219,7 +1218,6 @@ func (s *Server) ProcessHandler(c *gin.Context) {
|
|||||||
|
|
||||||
mr := api.ProcessModelResponse{
|
mr := api.ProcessModelResponse{
|
||||||
Model: model.ShortName,
|
Model: model.ShortName,
|
||||||
Name: model.ShortName,
|
|
||||||
Size: int64(v.estimatedTotal),
|
Size: int64(v.estimatedTotal),
|
||||||
SizeVRAM: int64(v.estimatedVRAM),
|
SizeVRAM: int64(v.estimatedVRAM),
|
||||||
Digest: model.Digest,
|
Digest: model.Digest,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user