Skip to content

Commit

Permalink
Merge pull request #50 from SmilyOrg/io
Browse files Browse the repository at this point in the history
Small prod fixes
  • Loading branch information
SmilyOrg authored Apr 11, 2023
2 parents 8143216 + 19ff818 commit b4c4faf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions internal/clip/ai.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand All @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion io/io.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion ui/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
</collection-panel>

<search-input
v-if="capabilities?.search.supported"
v-if="capabilities?.search.supported && collection"
:loading="query.search && scrollScene?.loading"
:modelValue="query.search"
:error="scrollScene?.error"
Expand Down

0 comments on commit b4c4faf

Please sign in to comment.