mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 01:04:32 +02:00
fix prompt enhance api
Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
+2
-2
@@ -1,6 +1,6 @@
|
||||
# Change Log for SD.Next
|
||||
|
||||
## Highlights for 2026-08-23
|
||||
## Highlights for 2026-08-24
|
||||
|
||||
Time for a new release, this is a larger one!
|
||||
Main focus is improving video workflows which also brings full support for new [MiniMax H3](https://vladmandic.github.io/sdnext-docs/MiniMax) and [LTXVideo-2.5](https://vladmandic.github.io/sdnext-docs/LTX)
|
||||
@@ -17,7 +17,7 @@ Plus quite a lot more, see full [changelog](https://github.com/vladmandic/automa
|
||||
|
||||
[Home](https://vladmandic.github.io/sdnext/) | [ChangeLog](https://github.com/vladmandic/automatic/blob/master/CHANGELOG.md) | [Docs](https://vladmandic.github.io/sdnext-docs/) | [Discord](https://discord.com/invite/sd-next-federal-batch-inspectors-1101998836328697867) | [Sponsor](https://github.com/sponsors/vladmandic)
|
||||
|
||||
## Details for 2026-08-23
|
||||
## Details for 2026-08-24
|
||||
|
||||
- **Models**
|
||||
- [MiniMax H3](https://huggingface.co/MiniMaxAI/MiniMax-H3) available in *base* and *ref* variants
|
||||
|
||||
+1
-1
Submodule extensions-builtin/sdnq updated: 2981468c0b...a0ceca93e2
@@ -219,10 +219,13 @@ class APIProcess:
|
||||
seed = req.seed or -1
|
||||
seed = processing_helpers.get_fixed_seed(seed)
|
||||
prompt = ''
|
||||
from modules.scripts_manager import scripts_txt2img
|
||||
from modules.scripts_manager import scripts_control
|
||||
default_model = 'google/gemma-3-4b-it' if req.type == 'image' else 'google/gemma-3-1b-it'
|
||||
model = default_model if req.model is None or len(req.model) < 4 else req.model
|
||||
instance = [s for s in scripts_txt2img.scripts if 'prompt_enhance.py' in s.filename][0]
|
||||
instance = [s for s in scripts_control.scripts if 'prompt_enhance_ext.py' in s.filename]
|
||||
if len(instance) == 0:
|
||||
raise HTTPException(status_code=500, detail="Prompt enhancement script not found")
|
||||
instance = instance[0]
|
||||
prompt = instance.enhance(
|
||||
model=model,
|
||||
prompt=req.prompt,
|
||||
|
||||
Reference in New Issue
Block a user