diff --git a/internal/clip/ai.go b/internal/clip/ai.go index ac3d7a3..8f168dc 100644 --- a/internal/clip/ai.go +++ b/internal/clip/ai.go @@ -94,7 +94,7 @@ func (a AI) TextualHost() string { } func (a AI) EmbedImagePath(path string) (Embedding, error) { - if !a.Available() { + if !a.Available() || a.TextualHost() == "" { return nil, ErrNotAvailable } @@ -114,7 +114,7 @@ func (a AI) EmbedImagePath(path string) (Embedding, error) { } func (a AI) EmbedImageReader(r io.Reader) (Embedding, error) { - if !a.Available() { + if !a.Available() || a.VisualHost() == "" { return nil, ErrNotAvailable } diff --git a/io/io.go b/io/io.go index 3abe0e5..1978562 100644 --- a/io/io.go +++ b/io/io.go @@ -142,7 +142,7 @@ func (sources Sources) EstimateCost(original Size, target Size) SourceCosts { if targetArea > sarea { // areacost = math.Sqrt(float64(targetArea)-float64(sarea)) * 3 // areacost = math.Sqrt(float64(targetArea)-float64(sarea)) * 3 - sizecost *= 7 + sizecost *= 15 } // dx := float64(target.X - ssize.X) // dy := float64(target.Y - ssize.Y) diff --git a/ui/src/App.vue b/ui/src/App.vue index f06eca0..7a6bae1 100644 --- a/ui/src/App.vue +++ b/ui/src/App.vue @@ -48,7 +48,7 @@