Skip to content

Commit 28860ce

Browse files
committed
feat: add tiny dream stable diffusion support
Signed-off-by: Gianluca Boiano <[email protected]>
1 parent 89ff123 commit 28860ce

File tree

13 files changed

+162
-30
lines changed

13 files changed

+162
-30
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ ENV BUILD_TYPE=${BUILD_TYPE}
1616
ENV EXTERNAL_GRPC_BACKENDS="huggingface-embeddings:/build/backend/python/sentencetransformers/run.sh,petals:/build/backend/python/petals/run.sh,transformers:/build/backend/python/transformers/run.sh,sentencetransformers:/build/backend/python/sentencetransformers/run.sh,autogptq:/build/backend/python/autogptq/run.sh,bark:/build/backend/python/bark/run.sh,diffusers:/build/backend/python/diffusers/run.sh,exllama:/build/backend/python/exllama/run.sh,vall-e-x:/build/backend/python/vall-e-x/run.sh,vllm:/build/backend/python/vllm/run.sh,exllama2:/build/backend/python/exllama2/run.sh,transformers-musicgen:/build/backend/python/transformers-musicgen/run.sh"
1717

1818
ENV GALLERIES='[{"name":"model-gallery", "url":"github:go-skynet/model-gallery/index.yaml"}, {"url": "github:go-skynet/model-gallery/huggingface.yaml","name":"huggingface"}]'
19-
ARG GO_TAGS="stablediffusion tts"
19+
ARG GO_TAGS="stablediffusion tinydream tts"
2020

2121
RUN apt-get update && \
2222
apt-get install -y ca-certificates curl patch pip cmake && apt-get clean

Makefile

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ PIPER_VERSION?=5386f3ed8e8ff6d9474832aa9a9a6a8d7b337d6a
3333
# stablediffusion version
3434
STABLEDIFFUSION_VERSION?=902db5f066fd137697e3b69d0fa10d4782bd2c2f
3535

36+
# tinydream version
37+
TINYDREAM_VERSION?=772a9c0d9aaf768290e63cca3c904fe69faf677a
38+
3639
export BUILD_TYPE?=
3740
export STABLE_BUILD_TYPE?=$(BUILD_TYPE)
3841
export CMAKE_ARGS?=
@@ -128,6 +131,11 @@ ifeq ($(findstring stablediffusion,$(GO_TAGS)),stablediffusion)
128131
OPTIONAL_GRPC+=backend-assets/grpc/stablediffusion
129132
endif
130133

134+
ifeq ($(findstring tinydream,$(GO_TAGS)),tinydream)
135+
# OPTIONAL_TARGETS+=go-tiny-dream/libtinydream.a
136+
OPTIONAL_GRPC+=backend-assets/grpc/tinydream
137+
endif
138+
131139
ifeq ($(findstring tts,$(GO_TAGS)),tts)
132140
# OPTIONAL_TARGETS+=go-piper/libpiper_binding.a
133141
# OPTIONAL_TARGETS+=backend-assets/espeak-ng-data
@@ -171,6 +179,14 @@ sources/go-stable-diffusion:
171179
sources/go-stable-diffusion/libstablediffusion.a:
172180
$(MAKE) -C sources/go-stable-diffusion libstablediffusion.a
173181

182+
## tiny-dream
183+
sources/go-tiny-dream:
184+
git clone --recurse-submodules https://github.com/M0Rf30/go-tiny-dream sources/go-tiny-dream
185+
cd sources/go-tiny-dream && git checkout -b build $(TINYDREAM_VERSION) && git submodule update --init --recursive --depth 1
186+
187+
sources/go-tiny-dream/libtinydream.a:
188+
$(MAKE) -C sources/go-tiny-dream libtinydream.a
189+
174190
## RWKV
175191
sources/go-rwkv:
176192
git clone --recurse-submodules $(RWKV_REPO) sources/go-rwkv
@@ -231,7 +247,7 @@ sources/go-piper/libpiper_binding.a: sources/go-piper
231247
backend/cpp/llama/llama.cpp:
232248
$(MAKE) -C backend/cpp/llama llama.cpp
233249

234-
get-sources: backend/cpp/llama/llama.cpp sources/go-llama sources/go-llama-ggml sources/go-ggml-transformers sources/gpt4all sources/go-piper sources/go-rwkv sources/whisper.cpp sources/go-bert sources/go-stable-diffusion
250+
get-sources: backend/cpp/llama/llama.cpp sources/go-llama sources/go-llama-ggml sources/go-ggml-transformers sources/gpt4all sources/go-piper sources/go-rwkv sources/whisper.cpp sources/go-bert sources/go-stable-diffusion sources/go-tiny-dream
235251
touch $@
236252

237253
replace:
@@ -242,6 +258,7 @@ replace:
242258
$(GOCMD) mod edit -replace github.com/ggerganov/whisper.cpp/bindings/go=$(shell pwd)/sources/whisper.cpp/bindings/go
243259
$(GOCMD) mod edit -replace github.com/go-skynet/go-bert.cpp=$(shell pwd)/sources/go-bert
244260
$(GOCMD) mod edit -replace github.com/mudler/go-stable-diffusion=$(shell pwd)/sources/go-stable-diffusion
261+
$(GOCMD) mod edit -replace github.com/M0Rf30/go-tiny-dream=$(shell pwd)/sources/go-tiny-dream
245262
$(GOCMD) mod edit -replace github.com/mudler/go-piper=$(shell pwd)/sources/go-piper
246263

247264
prepare-sources: get-sources replace
@@ -260,6 +277,7 @@ rebuild: ## Rebuilds the project
260277
$(MAKE) -C sources/go-stable-diffusion clean
261278
$(MAKE) -C sources/go-bert clean
262279
$(MAKE) -C sources/go-piper clean
280+
$(MAKE) -C sources/go-tiny-dream clean
263281
$(MAKE) build
264282

265283
prepare: prepare-sources $(OPTIONAL_TARGETS)
@@ -519,9 +537,13 @@ backend-assets/grpc/stablediffusion: backend-assets/grpc
519537
if [ ! -f backend-assets/grpc/stablediffusion ]; then \
520538
$(MAKE) sources/go-stable-diffusion/libstablediffusion.a; \
521539
CGO_LDFLAGS="$(CGO_LDFLAGS)" C_INCLUDE_PATH=$(shell pwd)/sources/go-stable-diffusion/ LIBRARY_PATH=$(shell pwd)/sources/go-stable-diffusion/ \
522-
$(GOCMD) build -ldflags "$(LD_FLAGS)" -tags "$(GO_TAGS)" -o backend-assets/grpc/stablediffusion ./backend/go/image/; \
540+
$(GOCMD) build -ldflags "$(LD_FLAGS)" -tags "$(GO_TAGS)" -o backend-assets/grpc/stablediffusion ./backend/go/image/stablediffusion; \
523541
fi
524542

543+
backend-assets/grpc/tinydream: backend-assets/grpc sources/go-tiny-dream/libtinydream.a
544+
CGO_LDFLAGS="$(CGO_LDFLAGS)" LIBRARY_PATH=$(shell pwd)/go-tiny-dream \
545+
$(GOCMD) build -ldflags "$(LD_FLAGS)" -tags "$(GO_TAGS)" -o backend-assets/grpc/tinydream ./backend/go/image/tinydream
546+
525547
backend-assets/grpc/piper: backend-assets/grpc backend-assets/espeak-ng-data sources/go-piper/libpiper_binding.a
526548
CGO_CXXFLAGS="$(PIPER_CGO_CXXFLAGS)" CGO_LDFLAGS="$(PIPER_CGO_LDFLAGS)" LIBRARY_PATH=$(shell pwd)/sources/go-piper \
527549
$(GOCMD) build -ldflags "$(LD_FLAGS)" -tags "$(GO_TAGS)" -o backend-assets/grpc/piper ./backend/go/tts/

api/openai/image.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func ImageEndpoint(cm *config.ConfigLoader, o *options.Option) func(c *fiber.Ctx
4545
}
4646

4747
if m == "" {
48-
m = model.StableDiffusionBackend
48+
m = model.TinyDreamBackend
4949
}
5050
log.Debug().Msgf("Loading model: %+v", m)
5151

@@ -82,8 +82,13 @@ func ImageEndpoint(cm *config.ConfigLoader, o *options.Option) func(c *fiber.Ctx
8282
log.Debug().Msgf("Parameter Config: %+v", config)
8383

8484
// XXX: Only stablediffusion is supported for now
85-
if config.Backend == "" {
85+
switch config.Backend {
86+
case "stablediffusion":
8687
config.Backend = model.StableDiffusionBackend
88+
case "tinydream":
89+
config.Backend = model.TinyDreamBackend
90+
default:
91+
config.Backend = model.TinyDreamBackend
8792
}
8893

8994
sizeParts := strings.Split(input.Size, "x")

backend/go/image/main.go renamed to backend/go/image/stablediffusion/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ var (
1515
func main() {
1616
flag.Parse()
1717

18-
if err := grpc.StartServer(*addr, &StableDiffusion{}); err != nil {
18+
if err := grpc.StartServer(*addr, &Image{}); err != nil {
1919
panic(err)
2020
}
2121
}

backend/go/image/stablediffusion.go renamed to backend/go/image/stablediffusion/stablediffusion.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,20 @@ import (
88
"github.com/go-skynet/LocalAI/pkg/stablediffusion"
99
)
1010

11-
type StableDiffusion struct {
11+
type Image struct {
1212
base.SingleThread
1313
stablediffusion *stablediffusion.StableDiffusion
1414
}
1515

16-
func (sd *StableDiffusion) Load(opts *pb.ModelOptions) error {
16+
func (image *Image) Load(opts *pb.ModelOptions) error {
1717
var err error
1818
// Note: the Model here is a path to a directory containing the model files
19-
sd.stablediffusion, err = stablediffusion.New(opts.ModelFile)
19+
image.stablediffusion, err = stablediffusion.New(opts.ModelFile)
2020
return err
2121
}
2222

23-
func (sd *StableDiffusion) GenerateImage(opts *pb.GenerateImageRequest) error {
24-
return sd.stablediffusion.GenerateImage(
23+
func (image *Image) GenerateImage(opts *pb.GenerateImageRequest) error {
24+
return image.stablediffusion.GenerateImage(
2525
int(opts.Height),
2626
int(opts.Width),
2727
int(opts.Mode),

backend/go/image/tinydream/main.go

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package main
2+
3+
// Note: this is started internally by LocalAI and a server is allocated for each model
4+
5+
import (
6+
"flag"
7+
8+
grpc "github.com/go-skynet/LocalAI/pkg/grpc"
9+
)
10+
11+
var (
12+
addr = flag.String("addr", "localhost:50051", "the address to connect to")
13+
)
14+
15+
func main() {
16+
flag.Parse()
17+
18+
if err := grpc.StartServer(*addr, &Image{}); err != nil {
19+
panic(err)
20+
}
21+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
package main
2+
3+
// This is a wrapper to statisfy the GRPC service interface
4+
// It is meant to be used by the main executable that is the server for the specific backend type (falcon, gpt3, etc)
5+
import (
6+
"github.com/go-skynet/LocalAI/pkg/grpc/base"
7+
pb "github.com/go-skynet/LocalAI/pkg/grpc/proto"
8+
"github.com/go-skynet/LocalAI/pkg/tinydream"
9+
)
10+
11+
type Image struct {
12+
base.SingleThread
13+
tinydream *tinydream.TinyDream
14+
}
15+
16+
func (image *Image) Load(opts *pb.ModelOptions) error {
17+
var err error
18+
// Note: the Model here is a path to a directory containing the model files
19+
image.tinydream, err = tinydream.New(opts.ModelFile)
20+
return err
21+
}
22+
23+
func (image *Image) GenerateImage(opts *pb.GenerateImageRequest) error {
24+
return image.tinydream.GenerateImage(
25+
int(opts.Height),
26+
int(opts.Width),
27+
int(opts.Step),
28+
int(opts.Seed),
29+
opts.PositivePrompt,
30+
opts.NegativePrompt,
31+
opts.Dst)
32+
}

go.mod

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ module github.com/go-skynet/LocalAI
33
go 1.21
44

55
require (
6+
github.com/M0Rf30/go-tiny-dream v0.0.0-20231120185742-d617ddbd38e8
67
github.com/donomii/go-rwkv.cpp v0.0.0-20230715075832-c898cd0f62df
78
github.com/ggerganov/whisper.cpp/bindings/go v0.0.0-20230628193450-85ed71aaec8e
89
github.com/go-audio/wav v1.1.0
9-
github.com/go-skynet/bloomz.cpp v0.0.0-20230529155654-1834e77b83fa
1010
github.com/go-skynet/go-bert.cpp v0.0.0-20230716133540-6abe312cded1
1111
github.com/go-skynet/go-ggml-transformers.cpp v0.0.0-20230714203132-ffb09d7dd71e
1212
github.com/go-skynet/go-llama.cpp v0.0.0-20231009155254-aeba71ee8428
@@ -17,7 +17,6 @@ require (
1717
github.com/imdario/mergo v0.3.16
1818
github.com/json-iterator/go v1.1.12
1919
github.com/mholt/archiver/v3 v3.5.1
20-
github.com/mudler/go-ggllm.cpp v0.0.0-20230709223052-862477d16eef
2120
github.com/mudler/go-processmanager v0.0.0-20230818213616-f204007f963c
2221
github.com/mudler/go-stable-diffusion v0.0.0-20230605122230-d89260f598af
2322
github.com/nomic-ai/gpt4all/gpt4all-bindings/golang v0.0.0-20231022042237-c25dc5193530

go.sum

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
github.com/M0Rf30/go-tiny-dream v0.0.0-20231120185742-d617ddbd38e8 h1:NNby8tDvwbkZ50uKsdgtrlfutsipmOsiI+C2YUNIwaU=
2+
github.com/M0Rf30/go-tiny-dream v0.0.0-20231120185742-d617ddbd38e8/go.mod h1:UOf2Mb/deUri5agct5OJ4SLWjhI+kZKbsUVUeRb24I0=
13
github.com/andybalholm/brotli v1.0.1/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y=
24
github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/cCs=
35
github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=
@@ -39,8 +41,6 @@ github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
3941
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
4042
github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY=
4143
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
42-
github.com/go-skynet/bloomz.cpp v0.0.0-20230529155654-1834e77b83fa h1:gxr68r/6EWroay4iI81jxqGCDbKotY4+CiwdUkBz2NQ=
43-
github.com/go-skynet/bloomz.cpp v0.0.0-20230529155654-1834e77b83fa/go.mod h1:wc0fJ9V04yiYTfgKvE5RUUSRQ5Kzi0Bo4I+U3nNOUuA=
4444
github.com/go-skynet/go-bert.cpp v0.0.0-20230716133540-6abe312cded1 h1:yXvc7QfGtoZ51tUW/YVjoTwAfh8HG88XU7UOrbNlz5Y=
4545
github.com/go-skynet/go-bert.cpp v0.0.0-20230716133540-6abe312cded1/go.mod h1:fYjkCDRzC+oRLHSjQoajmYK6AmeJnmEanV27CClAcDc=
4646
github.com/go-skynet/go-ggml-transformers.cpp v0.0.0-20230714203132-ffb09d7dd71e h1:4reMY29i1eOZaRaSTMPNyXI7X8RMNxCTfDDBXYzrbr0=
@@ -71,7 +71,6 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw
7171
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
7272
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
7373
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
74-
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
7574
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
7675
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
7776
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
@@ -125,18 +124,12 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w
125124
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
126125
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
127126
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
128-
github.com/mudler/go-ggllm.cpp v0.0.0-20230709223052-862477d16eef h1:OJZtJ5vYhlkTJI0RHIl62kOkhiINQEhZgsXlwmmNDhM=
129-
github.com/mudler/go-ggllm.cpp v0.0.0-20230709223052-862477d16eef/go.mod h1:00giAi/vwF8LX29JBjkPQhtASsivPnGNzB6sdmk8JGE=
130127
github.com/mudler/go-piper v0.0.0-20230621222733-56b8a81b4760 h1:OFVkSxR7CRSRSNm5dvpMRZwmSwWa8EMMnHbc84fW5tU=
131128
github.com/mudler/go-piper v0.0.0-20230621222733-56b8a81b4760/go.mod h1:O7SwdSWMilAWhBZMK9N9Y/oBDyMMzshE3ju8Xkexwig=
132129
github.com/mudler/go-processmanager v0.0.0-20230818213616-f204007f963c h1:CI5uGwqBpN8N7BrSKC+nmdfw+9nPQIDyjHHlaIiitZI=
133130
github.com/mudler/go-processmanager v0.0.0-20230818213616-f204007f963c/go.mod h1:gY3wyrhkRySJtmtI/JPt4a2mKv48h/M9pEZIW+SjeC0=
134131
github.com/mudler/go-stable-diffusion v0.0.0-20230605122230-d89260f598af h1:XFq6OUqsWQam0OrEr05okXsJK/TQur3zoZTHbiZD3Ks=
135132
github.com/mudler/go-stable-diffusion v0.0.0-20230605122230-d89260f598af/go.mod h1:8ufRkpz/S/9ahkaxzZ5i4WMgO9w4InEhuRoT7vK5Rnw=
136-
github.com/nomic-ai/gpt4all/gpt4all-bindings/golang v0.0.0-20231013181651-22de3c56bdd4 h1:82J4t94Mmt0lva/OoxNlHkKrMSdSUZXkAjTFnlFFsow=
137-
github.com/nomic-ai/gpt4all/gpt4all-bindings/golang v0.0.0-20231013181651-22de3c56bdd4/go.mod h1:4T3CHXyrt+7FQHXaxULZfPjHbD8/99WuDDJa0YVZARI=
138-
github.com/nomic-ai/gpt4all/gpt4all-bindings/golang v0.0.0-20231016205817-9a19c740ee84 h1:AiFzd+M2Uxz67fdn4nCnKR70me5yf88rXhoqhvfRDak=
139-
github.com/nomic-ai/gpt4all/gpt4all-bindings/golang v0.0.0-20231016205817-9a19c740ee84/go.mod h1:4T3CHXyrt+7FQHXaxULZfPjHbD8/99WuDDJa0YVZARI=
140133
github.com/nomic-ai/gpt4all/gpt4all-bindings/golang v0.0.0-20231022042237-c25dc5193530 h1:YXMxHwHMB9jCBo2Yu5gz3mTB3T1TnZs/HmPLv15LUSA=
141134
github.com/nomic-ai/gpt4all/gpt4all-bindings/golang v0.0.0-20231022042237-c25dc5193530/go.mod h1:4T3CHXyrt+7FQHXaxULZfPjHbD8/99WuDDJa0YVZARI=
142135
github.com/nwaples/rardecode v1.1.0 h1:vSxaY8vQhOcVr4mm5e8XllHWTiM4JF507A0Katqw7MQ=
@@ -153,8 +146,6 @@ github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xl
153146
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
154147
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
155148
github.com/onsi/gomega v1.16.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY=
156-
github.com/onsi/gomega v1.28.0 h1:i2rg/p9n/UqIDAMFUJ6qIUUMcsqOuUHgbpbu235Vr1c=
157-
github.com/onsi/gomega v1.28.0/go.mod h1:A1H2JE76sI14WIP57LMKj7FVfCHx3g3BcZVjJG8bjX8=
158149
github.com/onsi/gomega v1.28.1 h1:MijcGUbfYuznzK/5R4CPNoUP/9Xvuo20sXfEm6XxoTA=
159150
github.com/onsi/gomega v1.28.1/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ=
160151
github.com/otiai10/mint v1.6.1 h1:kgbTJmOpp/0ce7hk3H8jiSuR0MXmpwWRfqUdKww17qg=
@@ -216,8 +207,6 @@ github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0h
216207
github.com/tklauser/numcpus v0.6.0/go.mod h1:FEZLMke0lhOUG6w2JadTzp0a+Nl8PF/GFkQ5UVIcaL4=
217208
github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk=
218209
github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY=
219-
github.com/tmc/langchaingo v0.0.0-20231016073620-a02d4fdc0f3a h1:BziGpoF5ZVWMDy6Z1adXnYndRye2fiYWZlmknUFksGA=
220-
github.com/tmc/langchaingo v0.0.0-20231016073620-a02d4fdc0f3a/go.mod h1:SiwyRS7sBSSi6f3NB4dKENw69X6br/wZ2WRkM+8pZWk=
221210
github.com/tmc/langchaingo v0.0.0-20231019140956-c636b3da7701 h1:LquLgmFiKf6eDXdwoUKCIGn5NsR34cLXC6ySYhiE6bA=
222211
github.com/tmc/langchaingo v0.0.0-20231019140956-c636b3da7701/go.mod h1:SiwyRS7sBSSi6f3NB4dKENw69X6br/wZ2WRkM+8pZWk=
223212
github.com/ulikunitz/xz v0.5.8/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
@@ -309,12 +298,8 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T
309298
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
310299
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
311300
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
312-
google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U=
313-
google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM=
314301
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4=
315302
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M=
316-
google.golang.org/grpc v1.58.3 h1:BjnpXut1btbtgN/6sp+brB2Kbm2LjNXnidYujAVbSoQ=
317-
google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0=
318303
google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk=
319304
google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98=
320305
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=

pkg/model/initializers.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ const (
3535
RwkvBackend = "rwkv"
3636
WhisperBackend = "whisper"
3737
StableDiffusionBackend = "stablediffusion"
38+
TinyDreamBackend = "tinydream"
3839
PiperBackend = "piper"
3940
LCHuggingFaceBackend = "langchain-huggingface"
4041

@@ -59,6 +60,7 @@ var AutoLoadBackends []string = []string{
5960
RwkvBackend,
6061
WhisperBackend,
6162
StableDiffusionBackend,
63+
TinyDreamBackend,
6264
PiperBackend,
6365
}
6466

0 commit comments

Comments
 (0)