Eric Krea2 Magic Prompt:
EricKrea2MagicPrompt expands a short image-generation idea into a more detailed Krea 2 prompt using a locally available language model or a compatible local model server. It is designed to add useful visual detail, such as subject characteristics, environment, composition, lighting, atmosphere, materials, and photographic or artistic direction, while keeping the original prompt workflow simple. The node can automatically select an available backend, use a local Qwen3-VL model without requiring a server, connect to LM Studio, connect to Ollama, or send requests to another OpenAI-compatible endpoint. You can also provide a custom system instruction or load one from a text file to control how the expansion is written. If expansion is disabled, the prompt is empty, no backend is available, or generation fails, the node preserves the original prompt instead of stopping the workflow, and reports what happened through its status message.
Eric Krea2 Magic Prompt Input Parameters:
prompt
The starting text that you want to expand into a richer Krea 2 prompt. You can enter a short concept such as a futuristic city at night or a more developed description. The node sends this text to the selected language-model backend along with the system instruction, and the generated text becomes the expanded prompt. This parameter is multiline and defaults to an empty string. If it contains only spaces or is empty, the node does not contact a backend and passes the value through unchanged with a status indicating that the prompt was empty.
backend
Selects the method used to expand the prompt. The available options are auto, qwen3_vl, lm_studio, ollama, and endpoint, with auto as the default. auto checks for a usable local Qwen3-VL installation first, then checks LM Studio, and finally checks Ollama; a missing local model is skipped and is not downloaded automatically. qwen3_vl uses a local Qwen3-VL model through the optional video_prompter backend and does not require a server. lm_studio connects to an OpenAI-compatible LM Studio server, normally at the default endpoint. ollama uses Ollama's generation API. endpoint sends an OpenAI-compatible chat-completion request to the address in endpoint. Selecting a backend explicitly is useful when you want predictable model selection or when more than one service is running.
endpoint
The base URL used for LM Studio or a generic OpenAI-compatible server, with a default of http://localhost:1234/v1. For lm_studio, this normally points to LM Studio's local API. For endpoint, enter the base URL of another compatible service that provides /models and /chat/completions routes. When using ollama, this field is treated as the Ollama base address; a trailing /v1 is removed automatically, so values such as http://localhost:11434 or http://localhost:11434/v1 can be used. The endpoint does not affect local Qwen3-VL execution. In auto mode, an endpoint containing 1234 is considered as the LM Studio candidate; otherwise the node checks the default LM Studio address http://localhost:1234/v1.
model
Specifies which model should perform the expansion. The default is an empty string, which enables automatic model detection for server-based backends. For LM Studio or a generic endpoint, the node requests the available model list and uses the first returned model when this field is blank. For Ollama, it checks the installed tags and uses the first available model when blank. For qwen3_vl, this field can contain a local model-folder path; when blank, the node searches for Qwen3-VL-4B-Instruct or another Qwen*-VL-* folder under models/VLM. A local Qwen3-VL model must be a model directory supported by the local Transformers-based backend. Do not provide a .gguf file for qwen3_vl because GGUF files are not accepted by that local tier; serve such a model through LM Studio instead and enter its server model ID here.
temperature
Controls how predictable or varied the generated expansion is. The default is 0.7, with a minimum of 0.0 and a maximum of 2.0 in steps of 0.05. Lower values generally encourage more consistent and literal expansions, which can be useful when you want repeatable prompt structure. Higher values allow more variation in wording and creative interpretation, but may produce less predictable or less focused details. The value is passed directly to the selected language-model backend.
max_tokens
Sets the maximum number of new tokens the expansion model may generate. The default is 512, with a minimum of 64 and a maximum of 4096. Higher values allow longer and more descriptive prompts, while lower values reduce generation time and help keep the result concise. This limit applies to the expansion model and is separate from the Krea 2 encoder's own prompt-length budget. A generated result estimated at more than approximately 500 tokens produces a warning because Krea 2's fixed 512-token encoding budget may silently truncate the end of the prompt.
system_prompt
Defines the instruction that tells the language model how to transform the original prompt. It is multiline and defaults to the node's built-in _DEFAULT_EXPANDER_SYSTEM text. This instruction controls the style, content, and general behavior of the expansion, so changing it can make the output more concise, more cinematic, more technical, or more closely aligned with a particular visual workflow. The node combines this instruction with prompt before generation. If system_prompt_path contains a valid file path, the file contents take priority over this field; if that file cannot be read, the node reports the problem and falls back to this parameter's value or the built-in default.
system_prompt_path
Provides an optional path to a text file containing the expansion instruction. The default is an empty string, meaning that the value in system_prompt is used. When a valid path is supplied, the node reads the file as UTF-8, removes surrounding whitespace, and uses its contents instead of system_prompt. This is useful when you want to maintain a reusable instruction such as a custom Krea-style prompt format without placing the full text directly in every workflow. If the file is missing, inaccessible, or cannot be read, the node prints a warning and continues with the normal system_prompt value rather than stopping the workflow.
enabled
Turns prompt expansion on or off, with a default of True. When enabled, the node attempts to use the selected backend and returns the generated expansion if successful. When set to False, it immediately passes the original prompt through unchanged and reports passthrough (disabled or empty prompt). This is useful for temporarily bypassing the language model while preserving the rest of the workflow and for comparing manually written prompts with automatically expanded prompts.
device
Selects the device used only by the local qwen3_vl backend. The available options are auto, cuda:0, cuda:1, and cpu, with auto as the default. auto allows the local backend to choose its normal accelerated device placement, usually cuda:0. cuda:0 and cuda:1 explicitly select a GPU, which can help reserve one GPU for another part of your workflow; the source specifically notes that cuda:1 can keep the 6000 GPU free for the Krea 2 pipeline. cpu forces local model execution on the processor and may be substantially slower. This setting has no effect when using LM Studio, Ollama, or a generic endpoint.
Eric Krea2 Magic Prompt Output Parameters:
prompt
Contains the final text to use as the Krea 2 prompt. When expansion succeeds, this is the generated, more detailed description returned by the selected backend. When expansion is disabled, the input is empty, no backend is available, the backend returns empty text, or an exception occurs, this output contains the original prompt unchanged so the workflow can continue. Because the generated prompt may be longer than the Krea 2 encoder can accept, the node may warn when its heuristic estimate exceeds approximately 500 tokens; in that situation, the tail may be silently truncated later during encoding.
status
Contains a human-readable report describing how the prompt was handled. A successful result begins with ✅ expanded and includes the original and expanded character counts plus the backend used. A successful expansion may also include a warning such as ⚠ ~... tokens ... likely exceeds Krea2's 512-token budget. A pass-through result can indicate passthrough (disabled or empty prompt), or report that no backend was available, the expansion was empty, or the selected backend failed. This output is useful for diagnosing configuration problems and confirming whether the text reaching the next node was generated or preserved from the original input.
Eric Krea2 Magic Prompt Usage Tips:
- Start with a concise but meaningful concept in
prompt. Include the main subject, action, setting, or visual intention so the expander has clear material to develop, for examplea lone astronaut walking through a flooded neon market. - Use
backend=autofor the simplest setup. The node checks for a local Qwen3-VL model first, then LM Studio, then Ollama, and it does not download a missing local model automatically. - Select
qwen3_vlwhen you have a compatible Qwen3-VL folder undermodels/VLMor when you provide its directory inmodel. Usedeviceto control where the local weights run. - Use
lm_studioorendpointwhen your model is served through an OpenAI-compatible API. Leavemodelblank to allow automatic detection, or enter an exact server model ID when several models are available. - Use
ollamawhen Ollama is running locally athttp://localhost:11434. Leavemodelblank to use the first model reported by Ollama, or enter the installed model name for predictable results. - Keep
temperaturearound0.5to0.8for balanced, useful prompt expansions. Lower it when you need consistent wording and raise it only when you want more creative variation. - Keep
max_tokensmoderate for normal image prompts. Increasing it can add detail, but very long results may exceed Krea 2's fixed encoding budget and lose their final details through truncation. - Use
system_prompt_pathfor a reusable custom expansion instruction. Confirm that the file is readable as UTF-8, and remember that a valid file overridessystem_prompt. - Set
enabledtoFalsewhen you want to compare the original prompt with the expanded version or temporarily avoid using local model resources. - Monitor the
statusoutput during setup. It identifies the selected backend, reports connection or generation failures, and warns when the expanded text is likely too long for Krea 2.
Eric Krea2 Magic Prompt Common Errors and Solutions:
❌ no backend available
- Explanation: The automatic selection process could not find a usable local Qwen3-VL model, could not import the optional local backend, and could not reach LM Studio at its expected address or Ollama at
http://localhost:11434. The original prompt is passed through unexpanded. - Solution: Install or make available a supported local Qwen3-VL backend and model, start LM Studio with its local server enabled, or start Ollama with at least one installed model. You can also choose a backend explicitly and verify its address in
endpoint.
❌ no backend available (no local Qwen3-VL model, LM Studio (:1234) and Ollama (:11434) unreachable)
- Explanation: This is the detailed status form used when the local Qwen3-VL integration is installed but no matching model folder was found and neither server responded to its availability check.
- Solution: Place a compatible Qwen3-VL model in
models/VLMor provide its folder inmodel, start a server at the configured address, or correct the server URL and selectlm_studio,ollama, orendpointas appropriate.
❌ no backend available (video_prompter backend not installed, LM Studio (:1234) and Ollama (:11434) unreachable)
- Explanation: The optional
video_prompterpackage needed for local Qwen3-VL execution is not installed, and the two automatic server checks also failed. - Solution: Install the package that provides the Qwen3-VL backend if you want local execution, or use a running LM Studio or Ollama service. For another OpenAI-compatible service, select
endpointand enter its correct base URL.
❌ GGUF files can't load in the local transformers tier
- Explanation: A
.gguffile was supplied to theqwen3_vllocal backend. The local Transformers-based tier expects a model folder rather than a GGUF file. - Solution: Serve the GGUF model through LM Studio, select
backend=lm_studio, and enter the model's server ID inmodel. Alternatively, provide a compatible local model directory instead of the GGUF file.
no local Qwen3-VL model folder found (models/VLM) and none given in 'model'
- Explanation: The local Qwen3-VL backend was selected, but the node could not find a model folder in the expected
models/VLMlocations andmodelwas blank or invalid. - Solution: Install or place a supported Qwen3-VL directory under
models/VLM, or enter the full directory path inmodel. Make sure the path points to a folder, not an individual model file.
❌ empty expansion from ...
- Explanation: The selected backend answered, but it returned no usable text. The node keeps the original prompt so that downstream nodes still receive valid input.
- Solution: Confirm that the selected model is loaded and capable of text generation, increase
max_tokensif it is too low, review thesystem_prompt, and test the server or model independently.
❌ lm_studio failed: ...
- Explanation: The LM Studio request failed after the node selected the LM Studio backend. Common causes include a stopped local server, an incorrect endpoint, no loaded model, an invalid model ID, or an API that does not expose the expected OpenAI-compatible routes.
- Solution: Start LM Studio's server, load a text-capable model, verify that
endpointpoints to the server's/v1base URL, and leavemodelblank for auto-detection or enter the exact ID returned by the server.
❌ ollama failed: ...
- Explanation: The Ollama request failed while calling its generation API. This can happen when Ollama is not running, the selected model is not installed, the base URL is wrong, or the model cannot answer within the request.
- Solution: Start Ollama, confirm that
http://localhost:11434/api/tagsresponds, install or select a valid model name, and use the Ollama base URL inendpointwithout relying on an unrelated OpenAI-compatible address.
❌ endpoint failed: ...
- Explanation: The generic OpenAI-compatible request could not be completed. The service may not be running, the URL may be incorrect, the model ID may be invalid, or the service may not support both
/modelsand/chat/completions. - Solution: Check the service's API documentation, enter its OpenAI-compatible base URL in
endpoint, confirm that the server is reachable, and provide the exact model ID inmodelwhen automatic detection does not work.
Could not read system_prompt_path (...) ; using default.
- Explanation: The file specified in
system_prompt_pathcould not be opened or read as UTF-8. The node does not stop; it uses the regularsystem_promptinstead. - Solution: Check that the path is correct, that the file exists and is accessible, and that it is saved as UTF-8. Clear
system_prompt_pathif you do not need a custom instruction.
❌ ... failed: ... - prompt passed through UNEXPANDED
- Explanation: An exception occurred while the selected backend was loading, connecting, or generating text. The exact backend name and error details follow the failure marker, and the original prompt is returned unchanged.
- Solution: Read the specific detail after the backend name, then verify the model path, server availability, model ID, device selection, and generation settings. Lowering
max_tokensor changingdevicemay help with resource-related failures; otherwise select a working backend and test it separately.
