You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added some more options and optimized output for my tastes
- Adding System prompt (and to change it)
- Use fixed seed and 0 temperature
- Possibility to force a one sentence answer (if needed)
- Optional usage of the chat API
Copy file name to clipboardExpand all lines: main.go
+37-16Lines changed: 37 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -14,13 +14,16 @@ import (
14
14
)
15
15
16
16
typeargsstruct {
17
-
Pathstring`arg:"positional,required" help:"Path to an image or a directory with images"`
18
-
DryRunbool`arg:"--dry-run,-n" help:"Don't write captions as .txt (stripping the original extension)"`
19
-
StartCaptionstring`arg:"--start,-s" help:"Start the caption with this (image of Leela the dog,)"`
20
-
EndCaptionstring`arg:"--end,-e" help:"End the caption with this (in the style of 'something')"`
21
-
Promptstring`arg:"--prompt,-p" help:"The prompt to use" default:"Please describe the content and style of this image in detail. Answer only with one sentence that is starting with \"A ...\""`
22
-
Modelstring`arg:"--model,-m" help:"The model that will be used (must be a vision model like \"llava\")" default:"x/llama3.2-vision"`
23
-
Forcebool`arg:"--force,-f" help:"Also process the image if a file with .txt extension exists"`
17
+
Pathstring`arg:"positional,required" help:"Path to an image or a directory with images"`
18
+
DryRunbool`arg:"--dry-run,-n" help:"Don't write captions as .txt (stripping the original extension)"`
19
+
StartCaptionstring`arg:"--start,-s" help:"Start the caption with this (image of Leela the dog,)"`
20
+
EndCaptionstring`arg:"--end,-e" help:"End the caption with this (in the style of 'something')"`
21
+
Promptstring`arg:"--prompt,-p" help:"The prompt to use" default:"Please describe the content and style of this image in detail. Answer only with one sentence that is starting with \"A ...\""`
22
+
ForceOneSentencebool`arg:"--force-one-sentence" help:"Stops generation after the first period (.)"`
23
+
UseChatAPIbool`arg:"--use-chat-api,-c" help:"Use the chat API instead of the generate API"`
24
+
Systemstring`arg:"--system" help:"The system prompt that will be used (does not work with chat API)" default:"Analyse images in a neutral way. Describe foreground, background and style in detail."`
25
+
Modelstring`arg:"--model,-m" help:"The model that will be used (must be a vision model like \"llava\")" default:"x/llama3.2-vision"`
26
+
Forcebool`arg:"--force,-f" help:"Also process the image if a file with .txt extension exists"`
0 commit comments