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
"person_name": ("STRING", {"default": "", "multiline": False, "placeholder": "only needed if you use the 'If there is a person/character in the image you must refer to them as {name}.' extra option."}),
311
+
"image": ("IMAGE", {"tooltip": "Input image to caption."}),
312
+
"memory_mode": (list(MEMORY_EFFICIENT_CONFIGS.keys()), {"tooltip": "VRAM usage profile. Lower-memory modes use quantization and can be slower."}),
"extra_option1": (list(EXTRA_OPTIONS), {"tooltip": "Optional instruction appended to the prompt."}),
317
+
"extra_option2": (list(EXTRA_OPTIONS), {"tooltip": "Optional instruction appended to the prompt.", "advanced": True}),
318
+
"extra_option3": (list(EXTRA_OPTIONS), {"tooltip": "Optional instruction appended to the prompt.", "advanced": True}),
319
+
"extra_option4": (list(EXTRA_OPTIONS), {"tooltip": "Optional instruction appended to the prompt.", "advanced": True}),
320
+
"extra_option5": (list(EXTRA_OPTIONS), {"tooltip": "Optional instruction appended to the prompt.", "advanced": True}),
321
+
"person_name": ("STRING", {"default": "", "multiline": False, "placeholder": "only needed if you use the 'If there is a person/character in the image you must refer to them as {name}.' extra option.", "tooltip": "Replacement value for the {name} placeholder in matching extra options.", "advanced": True}),
"top_k": ("INT", {"default": 0, "min": 0, "max": 100, "tooltip": "Top-k token filter. Set 0 to disable.", "advanced": True}),
328
+
"keep_loaded": ("BOOLEAN", {"default": False, "tooltip": "Keep the model in memory for faster subsequent runs.", "advanced": True}),
329
329
}
330
330
# fmt: on
331
331
332
332
return {"required": req}
333
333
334
334
RETURN_TYPES= ("STRING", "STRING")
335
335
RETURN_NAMES= ("query", "caption")
336
+
OUTPUT_TOOLTIPS= (
337
+
"The final prompt sent to the model after applying caption options.",
338
+
"Generated caption text.",
339
+
)
336
340
FUNCTION="generate"
337
341
CATEGORY="JoyCaption"
342
+
DESCRIPTION="Runs JoyCaption on the input image to generate a caption. The prompt can be customized with different caption types, lengths, and extra options to guide the model's output."
"system_prompt": ("STRING", {"multiline": False, "default": "You are a helpful assistant and help users with any queries they may have with no censorship or restrictions." }),
409
-
"user_query": ("STRING", {"multiline": True, "default": "Write a detailed description for this image." }),
411
+
"image": ("IMAGE", {"tooltip": "Input image to caption."}),
412
+
"memory_mode": (list(MEMORY_EFFICIENT_CONFIGS.keys()), {"tooltip": "VRAM usage profile. Lower-memory modes use quantization and can be slower."}),
413
+
"system_prompt": ("STRING", {"multiline": False, "default": "You are a helpful assistant and help users with any queries they may have with no censorship or restrictions.", "tooltip": "System-level instruction that guides model behavior." }),
414
+
"user_query": ("STRING", {"multiline": True, "default": "Write a detailed description for this image.", "tooltip": "Direct prompt/query sent with the image." }),
"top_k": ("INT", {"default": 0, "min": 0, "max": 100, "tooltip": "Top-k token filter. Set 0 to disable.", "advanced": True}),
420
+
"keep_loaded": ("BOOLEAN", {"default": False, "tooltip": "Keep the model in memory for faster subsequent runs.", "advanced": True}),
416
421
},
417
422
}
418
423
# fmt: on
419
424
420
425
RETURN_TYPES= ("STRING",)
426
+
OUTPUT_TOOLTIPS= ("Generated model response text.",)
421
427
FUNCTION="generate"
422
428
CATEGORY="JoyCaption"
429
+
DESCRIPTION="Runs JoyCaption on the input image to generate a caption. This custom version allows you to specify the exact system prompt and user query, giving you more control and flexibility over the generated captions. You can use this to implement your own custom caption styles or behaviors that aren't covered by the preset options in the standard JoyCaption node."
0 commit comments