-
-
Notifications
You must be signed in to change notification settings - Fork 514
Prompt Enhance
Note
Different model types have different preferences on how to prompt them. For details, see Prompting model specific tips.
SD.Next includes built-in prompt enhancer that uses LLM to enhance your prompts:
- Can be used to manually or automatically enhance prompts
Automatic enhancement is done during normal generation without user intervention - Built-in presets for:
Gemma-3, Qwen-2.5, Phi-4, Llama-3.2, SmolLM2, Dolphin-3 - Support for custom system prompt
- Support for custom models
- Load any models hosted on huggingface
- Supports models in
huggingfaceformat - Supports models in
ggufformat
- Models are auto-downloaded on first use
- Support quantization and offloading
- Advanced options:
max tokens, sampling, temperature, repetition penalty
Warning
If SD.Next detected censored output, it will print warning in the log file and return original prompt
Note
Any model hosted on huggingface in original format should work
as long as it implements standard transformers.AutoModelForCausalLM interface
Note
Not all model architecture are supported for gguf format
Typically gguf support is added slightly later than transformers support
Tip
Debug logging can be enabled using SD_LLM_DEBUG=true env variable
Can be used to define any model that is not included in predefined list
- Model repo:
nidum/Nidum-Gemma-3-4B-it-Uncensored
- Model repo:
meta-llama/Llama-3.2-1B-Instruct
Link to original model repo on huggingface, required so that SD.Next can download components not present ingguffile such as tokenizer - Model GGUF:
mradermacher/Llama-3.2-1B-Instruct-Uncensored-i1-GGUF
Link to repo on huggingface that is hosting thegguffile(s) - Model type:
llama
Model type, required for SD.Next to know how to load the model - Model name:
Llama-3.2-1B-Instruct-Uncensored.i1-Q4_0.gguf
Name of thegguffile inside gguf repo
Supported GGUF model types: llama, mistral, qwen2, qwen2moe, falcon, tokenizer, phi3, bloom, t5, stablelm, gpt2, starcoder2, mamba, nemotron, gemma2
Supported Transformer model types is a superset of GGUF model types and includes model types such as latest gemma3
In case of unsupported model type, SD.Next will print currently supported model types in the log file