mudler / LocalAI

:robot: The free, Open Source alternative to OpenAI, Claude and others. Self-hosted and local-first. Drop-in replacement for OpenAI, running on consumer-grade hardware. No GPU required. Runs gguf, transformers, diffusers and many more models architectures. Features: Generate Text, Audio, Video, Images, Voice Cloning, Distributed inference
https://localai.io
MIT License
22.85k stars 1.74k forks source link

stablediffusion_assets folder is incorrect now #1466

Closed lenaxia closed 3 months ago

lenaxia commented 8 months ago

LocalAI version: v2.0.0 10:23PM INF LocalAI version: v2.0.0 (238fec244ae6c9a66bc7fafd76c7e14671110a6f)

Environment, CPU architecture, OS, and Version:

Linux localai-64b4946689-mcxkk 5.4.0-166-generic #183-Ubuntu SMP Mon Oct 2 11:28:33 UTC 2023 x86_64 GNU/Linux
CPU info:
model name      : Intel(R) Core(TM) i7-6700T CPU @ 2.80GHz
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d arch_capabilities
CPU:    AVX    found OK
CPU:    AVX2   found OK
CPU: no AVX512 found

Describe the bug Applying the Stable diffusion model puts assets into a /models/stablediffusion_assets folder. When calling the image generation endpoint, it complains that it cannot find the folder /models/stablediffusion. Renaming /models/stabledifussion_assets to /models/stablediffusion fixes the problem.

To Reproduce

curl $LOCALAI/models/apply -H "Content-Type: application/json" -d '{
  "url": "github:go-skynet/model-gallery/stablediffusion.yaml"
}'
curl $LOCALAI/v1/images/generations -H "Content-Type: application/json" -d '{
  "prompt": "floating hair, portrait, ((loli)), ((one girl)), cute face, hidden hands, asymmetrical bangs, beautiful detailed eyes, eye shadow, hair ornament, ribbons, bowties, buttons, pleated skirt, (((masterpiece))), ((best quality)), colorful|((part of the head)), ((((mutated hands and fingers)))), deformed, blurry, bad anatomy, disfigured, poorly drawn face, mutation, mutated, extra limb, ugly, poorly drawn hands, missing limb, blurry, floating limbs, disconnected limbs, malformed hands, blur, out of focus, long neck, long body, Octane renderer, lowres, bad anatomy, bad hands, text",
  "size": "256x256"
}'

{"error":{"code":500,"message":"could not load model: rpc error: code = Unknown desc = stat /models/stablediffusion: no such file or directory","type":""}}

Rename the folder from /models/stabledifussion_assets to /models/stablediffusion

{"created":1703062940,"id":"e317a84e-9107-4888-8d84-9e4057bc307c","data":[{"embedding":null,"index":0,"url":"https://my.domain/generated-images/b641229542902.png"}],"usage":{"prompt_tokens":0,"completion_tokens":0,"total_tokens":0}}

Expected behavior Stablediffusion should work out of the box without issue

Logs

8:57AM DBG Checking "stablediffusion_assets/AutoencoderKL-256-256-fp16-opt.param" exists and matches SHA
8:57AM DBG Downloading "https://raw.githubusercontent.com/EdVince/Stable-Diffusion-NCNN/main/x86/linux/assets/AutoencoderKL-256-256-fp16-opt.param"
8:57AM DBG File "stablediffusion_assets/AutoencoderKL-256-256-fp16-opt.param" downloaded and verified
8:57AM DBG Checking "stablediffusion_assets/AutoencoderKL-512-512-fp16-opt.param" exists and matches SHA
8:57AM DBG Downloading "https://raw.githubusercontent.com/EdVince/Stable-Diffusion-NCNN/main/x86/linux/assets/AutoencoderKL-512-512-fp16-opt.param"
8:57AM DBG File "stablediffusion_assets/AutoencoderKL-512-512-fp16-opt.param" downloaded and verified
8:57AM DBG Checking "stablediffusion_assets/AutoencoderKL-base-fp16.param" exists and matches SHA
8:57AM DBG Downloading "https://raw.githubusercontent.com/EdVince/Stable-Diffusion-NCNN/main/x86/linux/assets/AutoencoderKL-base-fp16.param"
8:57AM DBG File "stablediffusion_assets/AutoencoderKL-base-fp16.param" downloaded and verified
8:57AM DBG Checking "stablediffusion_assets/AutoencoderKL-encoder-512-512-fp16.bin" exists and matches SHA
8:57AM DBG Downloading "https://github.com/lenaxia/stablediffusion-bins/releases/download/2023.05.24/AutoencoderKL-encoder-512-512-fp16.bin"
8:57AM DBG File "stablediffusion_assets/AutoencoderKL-encoder-512-512-fp16.bin" downloaded and verified
8:57AM DBG Checking "stablediffusion_assets/AutoencoderKL-fp16.bin" exists and matches SHA
8:57AM DBG Downloading "https://github.com/lenaxia/stablediffusion-bins/releases/download/2023.05.24/AutoencoderKL-fp16.bin"
8:57AM DBG File "stablediffusion_assets/AutoencoderKL-fp16.bin" downloaded and verified
8:57AM DBG Checking "stablediffusion_assets/FrozenCLIPEmbedder-fp16.bin" exists and matches SHA
8:57AM DBG Downloading "https://github.com/lenaxia/stablediffusion-bins/releases/download/2023.05.24/FrozenCLIPEmbedder-fp16.bin"
8:57AM DBG Downloading stablediffusion_assets/FrozenCLIPEmbedder-fp16.bin: 42.0 MiB/235.1 MiB (17.85%) ETA: 23.00922357s
8:57AM DBG File "stablediffusion_assets/FrozenCLIPEmbedder-fp16.bin" downloaded and verified
8:57AM DBG Checking "stablediffusion_assets/FrozenCLIPEmbedder-fp16.param" exists and matches SHA
8:57AM DBG Downloading "https://raw.githubusercontent.com/EdVince/Stable-Diffusion-NCNN/main/x86/linux/assets/FrozenCLIPEmbedder-fp16.param"
8:57AM DBG File "stablediffusion_assets/FrozenCLIPEmbedder-fp16.param" downloaded and verified
8:57AM DBG Checking "stablediffusion_assets/log_sigmas.bin" exists and matches SHA
8:57AM DBG Downloading "https://github.com/EdVince/Stable-Diffusion-NCNN/raw/main/x86/linux/assets/log_sigmas.bin"
8:57AM DBG File "stablediffusion_assets/log_sigmas.bin" downloaded and verified
8:57AM DBG Checking "stablediffusion_assets/UNetModel-256-256-MHA-fp16-opt.param" exists and matches SHA
8:57AM DBG Downloading "https://raw.githubusercontent.com/EdVince/Stable-Diffusion-NCNN/main/x86/linux/assets/UNetModel-256-256-MHA-fp16-opt.param"
8:57AM DBG File "stablediffusion_assets/UNetModel-256-256-MHA-fp16-opt.param" downloaded and verified
8:57AM DBG Checking "stablediffusion_assets/UNetModel-512-512-MHA-fp16-opt.param" exists and matches SHA
8:57AM DBG Downloading "https://raw.githubusercontent.com/EdVince/Stable-Diffusion-NCNN/main/x86/linux/assets/UNetModel-512-512-MHA-fp16-opt.param"
8:57AM DBG File "stablediffusion_assets/UNetModel-512-512-MHA-fp16-opt.param" downloaded and verified
8:57AM DBG Checking "stablediffusion_assets/UNetModel-base-MHA-fp16.param" exists and matches SHA
8:57AM DBG Downloading "https://raw.githubusercontent.com/EdVince/Stable-Diffusion-NCNN/main/x86/linux/assets/UNetModel-base-MHA-fp16.param"
8:57AM DBG File "stablediffusion_assets/UNetModel-base-MHA-fp16.param" downloaded and verified
8:57AM DBG Checking "stablediffusion_assets/UNetModel-MHA-fp16.bin" exists and matches SHA
8:57AM DBG Downloading "https://github.com/lenaxia/stablediffusion-bins/releases/download/2023.05.24/UNetModel-MHA-fp16.bin"
8:57AM DBG Downloading stablediffusion_assets/UNetModel-MHA-fp16.bin: 32.0 KiB/1.6 GiB (0.00%) ETA: 150h8m36.195270094s
[10.42.6.178]:34834 200 - GET /models/jobs/cc919bb3-9f15-11ee-89c5-f2a7fa7191d1
8:57AM DBG Downloading stablediffusion_assets/UNetModel-MHA-fp16.bin: 336.3 MiB/1.6 GiB (20.50%) ETA: 59.317263659s
[10.42.6.178]:34834 200 - GET /models/jobs/cc919bb3-9f15-11ee-89c5-f2a7fa7191d1
8:57AM DBG Downloading stablediffusion_assets/UNetModel-MHA-fp16.bin: 669.2 MiB/1.6 GiB (40.79%) ETA: 29.461567137s
8:57AM DBG Downloading stablediffusion_assets/UNetModel-MHA-fp16.bin: 1005.6 MiB/1.6 GiB (61.30%) ETA: 15.972068837s
8:57AM DBG Downloading stablediffusion_assets/UNetModel-MHA-fp16.bin: 1.3 GiB/1.6 GiB (81.95%) ETA: 6.673803602s
[10.42.6.178]:34834 200 - GET /models/jobs/cc919bb3-9f15-11ee-89c5-f2a7fa7191d1
8:58AM DBG File "stablediffusion_assets/UNetModel-MHA-fp16.bin" downloaded and verified
8:58AM DBG Checking "stablediffusion_assets/vocab.txt" exists and matches SHA
8:58AM DBG Downloading "https://raw.githubusercontent.com/EdVince/Stable-Diffusion-NCNN/main/x86/linux/assets/vocab.txt"
8:58AM DBG File "stablediffusion_assets/vocab.txt" downloaded and verified
8:58AM DBG Written config file /models/stablediffusion.yaml

Before rename:

8:55AM DBG Request received:
8:55AM DBG Loading model: stablediffusion
8:55AM DBG Parameter Config: &{PredictionOptions:{Model:stablediffusion Language: N:0 TopP:0.7 TopK:80 Temperature:0.9 Maxtokens:512 Echo:false Batch:0 F16:false IgnoreEOS:false RepeatPenalty:0 Keep:0 MirostatETA:0 MirostatTAU:0 Mirostat:0 FrequencyPenalty:0 TFZ:0 TypicalP:0 Seed:0 NegativePrompt: RopeFreqBase:0 RopeFreqScale:0 NegativePromptScale:0 UseFastTokenizer:false ClipSkip:0 Tokenizer:} Name: F16:false Threads:4 Debug:true Roles:map[] Embeddings:false Backend: TemplateConfig:{Chat: ChatMessage: Completion: Edit: Functions:} PromptStrings:[floating hair, portrait, ((loli)), ((one girl)), cute face, hidden hands, asymmetrical bangs, beautiful detailed eyes, eye shadow, hair ornament, ribbons, bowties, buttons, pleated skirt, (((masterpiece))), ((best quality)), colorful|((part of the head)), ((((mutated hands and fingers)))), deformed, blurry, bad anatomy, disfigured, poorly drawn face, mutation, mutated, extra limb, ugly, poorly drawn hands, missing limb, blurry, floating limbs, disconnected limbs, malformed hands, blur, out of focus, long neck, long body, Octane renderer, lowres, bad anatomy, bad hands, text] InputStrings:[] InputToken:[] functionCallString: functionCallNameString: FunctionsConfig:{DisableNoAction:false NoActionFunctionName: NoActionDescriptionName:} FeatureFlag:map[] LLMConfig:{SystemPrompt: TensorSplit: MainGPU: RMSNormEps:0 NGQA:0 PromptCachePath: PromptCacheAll:false PromptCacheRO:false MirostatETA:0 MirostatTAU:0 Mirostat:0 NGPULayers:0 MMap:false MMlock:false LowVRAM:false Grammar: StopWords:[] Cutstrings:[] TrimSpace:[] ContextSize:0 NUMA:false LoraAdapter: LoraBase: LoraScale:0 NoMulMatQ:false DraftModel: NDraft:0 Quantization: MMProj: RopeScaling: YarnExtFactor:0 YarnAttnFactor:0 YarnBetaFast:0 YarnBetaSlow:0} AutoGPTQ:{ModelBaseName: Device: Triton:false UseFastTokenizer:false} Diffusers:{PipelineType: SchedulerType: CUDA:false EnableParameters: CFGScale:0 IMG2IMG:false ClipSkip:0 ClipModel: ClipSubFolder:} Step:0 GRPC:{Attempts:0 AttemptsSleepTime:0} VallE:{AudioPath:}}
8:55AM DBG Loading model stablediffusion from stablediffusion
8:55AM DBG Loading model in memory from file: /models/stablediffusion
8:55AM DBG Loading Model stablediffusion with gRPC (file: /models/stablediffusion) (backend: stablediffusion): {backendString:stablediffusion model:stablediffusion threads:4 assetDir:/tmp/localai/backend_data context:{emptyCtx:{}} gRPCOptions:0xc0000f23c0 externalBackends:map[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 huggingface-embeddings:/build/backend/python/sentencetransformers/run.sh petals:/build/backend/python/petals/run.sh sentencetransformers:/build/backend/python/sentencetransformers/run.sh transformers:/build/backend/python/transformers/run.sh vall-e-x:/build/backend/python/vall-e-x/run.sh vllm:/build/backend/python/vllm/run.sh] grpcAttempts:20 grpcAttemptsDelay:2 singleActiveBackend:false parallelRequests:false}
8:55AM DBG Loading GRPC Process: /tmp/localai/backend_data/backend-assets/grpc/stablediffusion
8:55AM DBG GRPC Service for stablediffusion will be running at: '127.0.0.1:40703'
8:55AM DBG GRPC Service state dir: /tmp/go-processmanager4225378111
8:55AM DBG GRPC Service Started
rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp 127.0.0.1:40703: connect: connection refused"
8:55AM DBG GRPC(stablediffusion-127.0.0.1:40703): stderr 2023/12/20 08:55:36 gRPC Server listening at 127.0.0.1:40703
8:55AM DBG GRPC Service Ready
8:55AM DBG GRPC: Loading model with options: {state:{NoUnkeyedLiterals:{} DoNotCompare:[] DoNotCopy:[] atomicMessageInfo:<nil>} sizeCache:0 unknownFields:[] Model:stablediffusion ContextSize:0 Seed:0 NBatch:0 F16Memory:false MLock:false MMap:false VocabOnly:false LowVRAM:false Embeddings:false NUMA:false NGPULayers:0 MainGPU: TensorSplit: Threads:0 LibrarySearchPath: RopeFreqBase:0 RopeFreqScale:0 RMSNormEps:0 NGQA:0 ModelFile:/models/stablediffusion Device: UseTriton:false ModelBaseName: UseFastTokenizer:false PipelineType: SchedulerType: CUDA:false CFGScale:0 IMG2IMG:false CLIPModel: CLIPSubfolder: CLIPSkip:0 Tokenizer: LoraBase: LoraAdapter: LoraScale:0 NoMulMatQ:false DraftModel: AudioPath: Quantization: MMProj: RopeScaling: YarnExtFactor:0 YarnAttnFactor:0 YarnBetaFast:0 YarnBetaSlow:0}
[10.42.6.178]:46474 500 - POST /v1/images/generations

After rename:

9:01AM DBG Request received:
9:01AM DBG Loading model: stablediffusion
9:01AM DBG Parameter Config: &{PredictionOptions:{Model:stablediffusion Language: N:0 TopP:0.7 TopK:80 Temperature:0.9 Maxtokens:512 Echo:false Batch:0 F16:false IgnoreEOS:false RepeatPenalty:0 Keep:0 MirostatETA:0 MirostatTAU:0 Mirostat:0 FrequencyPenalty:0 TFZ:0 TypicalP:0 Seed:0 NegativePrompt: RopeFreqBase:0 RopeFreqScale:0 NegativePromptScale:0 UseFastTokenizer:false ClipSkip:0 Tokenizer:} Name: F16:false Threads:4 Debug:true Roles:map[] Embeddings:false Backend: TemplateConfig:{Chat: ChatMessage: Completion: Edit: Functions:} PromptStrings:[floating hair, portrait, ((loli)), ((one girl)), cute face, hidden hands, asymmetrical bangs, beautiful detailed eyes, eye shadow, hair ornament, ribbons, bowties, buttons, pleated skirt, (((masterpiece))), ((best quality)), colorful|((part of the head)), ((((mutated hands and fingers)))), deformed, blurry, bad anatomy, disfigured, poorly drawn face, mutation, mutated, extra limb, ugly, poorly drawn hands, missing limb, blurry, floating limbs, disconnected limbs, malformed hands, blur, out of focus, long neck, long body, Octane renderer, lowres, bad anatomy, bad hands, text] InputStrings:[] InputToken:[] functionCallString: functionCallNameString: FunctionsConfig:{DisableNoAction:false NoActionFunctionName: NoActionDescriptionName:} FeatureFlag:map[] LLMConfig:{SystemPrompt: TensorSplit: MainGPU: RMSNormEps:0 NGQA:0 PromptCachePath: PromptCacheAll:false PromptCacheRO:false MirostatETA:0 MirostatTAU:0 Mirostat:0 NGPULayers:0 MMap:false MMlock:false LowVRAM:false Grammar: StopWords:[] Cutstrings:[] TrimSpace:[] ContextSize:0 NUMA:false LoraAdapter: LoraBase: LoraScale:0 NoMulMatQ:false DraftModel: NDraft:0 Quantization: MMProj: RopeScaling: YarnExtFactor:0 YarnAttnFactor:0 YarnBetaFast:0 YarnBetaSlow:0} AutoGPTQ:{ModelBaseName: Device: Triton:false UseFastTokenizer:false} Diffusers:{PipelineType: SchedulerType: CUDA:false EnableParameters: CFGScale:0 IMG2IMG:false ClipSkip:0 ClipModel: ClipSubFolder:} Step:0 GRPC:{Attempts:0 AttemptsSleepTime:0} VallE:{AudioPath:}}
9:01AM DBG Loading model stablediffusion from stablediffusion
9:01AM DBG Loading model in memory from file: /models/stablediffusion
9:01AM DBG Loading Model stablediffusion with gRPC (file: /models/stablediffusion) (backend: stablediffusion): {backendString:stablediffusion model:stablediffusion threads:4 assetDir:/tmp/localai/backend_data context:{emptyCtx:{}} gRPCOptions:0xc0000f23c0 externalBackends:map[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 huggingface-embeddings:/build/backend/python/sentencetransformers/run.sh petals:/build/backend/python/petals/run.sh sentencetransformers:/build/backend/python/sentencetransformers/run.sh transformers:/build/backend/python/transformers/run.sh vall-e-x:/build/backend/python/vall-e-x/run.sh vllm:/build/backend/python/vllm/run.sh] grpcAttempts:20 grpcAttemptsDelay:2 singleActiveBackend:false parallelRequests:false}
9:01AM DBG Loading GRPC Process: /tmp/localai/backend_data/backend-assets/grpc/stablediffusion
9:01AM DBG GRPC Service for stablediffusion will be running at: '127.0.0.1:43607'
9:01AM DBG GRPC Service state dir: /tmp/go-processmanager3332363991
9:01AM DBG GRPC Service Started
rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp 127.0.0.1:43607: connect: connection refused"
9:01AM DBG GRPC(stablediffusion-127.0.0.1:43607): stderr 2023/12/20 09:01:07 gRPC Server listening at 127.0.0.1:43607
9:01AM DBG GRPC Service Ready
9:01AM DBG GRPC: Loading model with options: {state:{NoUnkeyedLiterals:{} DoNotCompare:[] DoNotCopy:[] atomicMessageInfo:<nil>} sizeCache:0 unknownFields:[] Model:stablediffusion ContextSize:0 Seed:0 NBatch:0 F16Memory:false MLock:false MMap:false VocabOnly:false LowVRAM:false Embeddings:false NUMA:false NGPULayers:0 MainGPU: TensorSplit: Threads:0 LibrarySearchPath: RopeFreqBase:0 RopeFreqScale:0 RMSNormEps:0 NGQA:0 ModelFile:/models/stablediffusion Device: UseTriton:false ModelBaseName: UseFastTokenizer:false PipelineType: SchedulerType: CUDA:false CFGScale:0 IMG2IMG:false CLIPModel: CLIPSubfolder: CLIPSkip:0 Tokenizer: LoraBase: LoraAdapter: LoraScale:0 NoMulMatQ:false DraftModel: AudioPath: Quantization: MMProj: RopeScaling: YarnExtFactor:0 YarnAttnFactor:0 YarnBetaFast:0 YarnBetaSlow:0}
9:01AM DBG GRPC(stablediffusion-127.0.0.1:43607): stdout ----------------[start stable diffusion]--------------------
9:01AM DBG GRPC(stablediffusion-127.0.0.1:43607): stdout ----------------[init]--------------------
9:01AM DBG GRPC(stablediffusion-127.0.0.1:43607): stderr parse magic failed
9:01AM DBG GRPC(stablediffusion-127.0.0.1:43607): stderr network graph not ready
9:01AM DBG GRPC(stablediffusion-127.0.0.1:43607): stdout  3.51G / 3.62G
9:01AM DBG GRPC(stablediffusion-127.0.0.1:43607): stdout ----------------[prompt]------------------ 3.51G / 3.62G
9:01AM DBG GRPC(stablediffusion-127.0.0.1:43607): stdout ----------------[diffusion]---------------
9:02AM DBG GRPC(stablediffusion-127.0.0.1:43607): stdout step: 1/15     3848.28ms
9:02AM DBG GRPC(stablediffusion-127.0.0.1:43607): stdout step: 2/15     3356.25ms
9:02AM DBG GRPC(stablediffusion-127.0.0.1:43607): stdout step: 3/15     2966.58ms
9:02AM DBG GRPC(stablediffusion-127.0.0.1:43607): stdout step: 4/15     2729.85ms
9:02AM DBG GRPC(stablediffusion-127.0.0.1:43607): stdout step: 5/15     3109.36ms
9:02AM DBG GRPC(stablediffusion-127.0.0.1:43607): stdout step: 6/15     2769.07ms
9:02AM DBG GRPC(stablediffusion-127.0.0.1:43607): stdout step: 7/15     2807.56ms
9:02AM DBG GRPC(stablediffusion-127.0.0.1:43607): stdout step: 8/15     2932.28ms
9:02AM DBG GRPC(stablediffusion-127.0.0.1:43607): stdout step: 9/15     2986.92ms
9:02AM DBG GRPC(stablediffusion-127.0.0.1:43607): stdout step:10/15     3903.58ms
9:02AM DBG GRPC(stablediffusion-127.0.0.1:43607): stdout step:11/15     3364.42ms
9:02AM DBG GRPC(stablediffusion-127.0.0.1:43607): stdout step:12/15     3124.31ms
9:02AM DBG GRPC(stablediffusion-127.0.0.1:43607): stdout step:13/15     2989.45ms
9:02AM DBG GRPC(stablediffusion-127.0.0.1:43607): stdout step:14/15     2767.70ms
9:02AM DBG GRPC(stablediffusion-127.0.0.1:43607): stdout step:15/15     3298.15ms
9:02AM DBG GRPC(stablediffusion-127.0.0.1:43607): stdout ----------------[diffusion]--------------- 3.74G / 3.74G
9:02AM DBG GRPC(stablediffusion-127.0.0.1:43607): stdout ----------------[decode]------------------ 4.13G / 4.13G
9:02AM DBG GRPC(stablediffusion-127.0.0.1:43607): stdout ----------------[save]--------------------
9:02AM DBG GRPC(stablediffusion-127.0.0.1:43607): stdout ----------------[close]-------------------
[10.42.6.178]:50192 200 - POST /v1/images/generations
9:02AM DBG Response: {"created":1703062940,"id":"e317a84e-9107-4888-8d84-9e4057bc307c","data":[{"embedding":null,"index":0,"url":"https://ai.thekao.cloud/generated-images/b641229542902.png"}],"usage":{"prompt_tokens":0,"completion_tokens":0,"total_tokens":0}}
[10.42.6.178]:50192 304 - GET /generated-images/b641229542902.png

Additional context This seems to be where it is defining which folder to pull from, by just appending the model name to /models. So we shouldn't be using _assets

https://github.com/mudler/LocalAI/blob/7741a6e75d08cc78f44e3595a2cb15954718e959/pkg/model/loader.go#L129

sbe-arg commented 5 months ago

https://github.com/go-skynet/model-gallery/blob/f8a9f5e7e2d42e59346de411677208b21b760ad1/stablediffusion.yaml#L13

sbe-arg commented 5 months ago

Had a similar problem but did a refresh setup (clearing storage folders and downloading the models) and works fine now. So probably a version mismatch between backends and models or duplications.

mudler commented 3 months ago

this is fixed now, alternatively the models can be installed directly from the webui. Reopen if necesasary!