mirror of
https://github.com/Wan-Video/Wan2.1.git
synced 2025-06-05 14:54:54 +00:00
To support system prompt as a input parameter (#280)
This commit is contained in:
parent
bc3249d61c
commit
d6434cf8ef
@ -137,12 +137,14 @@ class PromptExpander:
|
|||||||
|
|
||||||
def __call__(self,
|
def __call__(self,
|
||||||
prompt,
|
prompt,
|
||||||
|
system_prompt=None,
|
||||||
tar_lang="zh",
|
tar_lang="zh",
|
||||||
image=None,
|
image=None,
|
||||||
seed=-1,
|
seed=-1,
|
||||||
*args,
|
*args,
|
||||||
**kwargs):
|
**kwargs):
|
||||||
system_prompt = self.decide_system_prompt(tar_lang=tar_lang)
|
if system_prompt is None:
|
||||||
|
system_prompt = self.decide_system_prompt(tar_lang=tar_lang)
|
||||||
if seed < 0:
|
if seed < 0:
|
||||||
seed = random.randint(0, sys.maxsize)
|
seed = random.randint(0, sys.maxsize)
|
||||||
if image is not None and self.is_vl:
|
if image is not None and self.is_vl:
|
||||||
|
Loading…
Reference in New Issue
Block a user