ComfyUI Node

LM Studio Query

Query LM Studio for text generation with optional image input, model management, and multi-seed prompt generation.

By Pirog17000·Created about a year ago·Updated 9 months ago· 3
LM Studio Query
  • images
  • generated_texts
  • model_ref
system_promptYou are a helpful assistant.
user_promptDescribe this image in detail.
model_name
server_urlhttp://localhost:1234
temperature0.70
max_tokens256
top_p0.90
seed0
prompts_number1
unload_after_usefalse
Categorypirog/ai

Inputs (11)

NameTypeDefaultDescription
system_promptSTRINGYou are a helpful assistant.System prompt to set the AI's behavior and role
user_promptSTRINGDescribe this image in detail.User prompt for the query. Use with images for descriptions or standalone for text generation.
model_nameSTRINGModel name or partial name to search for. Leave empty to use currently loaded model.
server_urlSTRINGhttp://localhost:1234LM Studio server URL
temperatureFLOAT0.700–2Sampling temperature (0.0 = deterministic, 2.0 = very random)
max_tokensINT2561–4096Maximum number of tokens to generate
top_pFLOAT0.900–1Nucleus sampling parameter
seedINT00–18446744073709550000Random seed for reproducible results. 0 = random each time.
prompts_numberINT11–10Number of prompts to generate with different seeds
unload_after_useBOOLEANfalseUnload the model after processing to free memory
imagesoptIMAGEOptional images for visual queries (batch processing supported)

Outputs (2)

NameTypeDescription
generated_textsSTRINGArray of generated text responses
model_refSTRINGReference to the loaded model name