确保midjourney seed参数位于末尾
This commit is contained in:
parent
b523b6975b
commit
0e0443eab2
@ -406,7 +406,12 @@ class MidjourneyService:
|
||||
if "seed" not in options or not options.get('seed'):
|
||||
options['seed'] = random.randint(0, 4294967295)
|
||||
|
||||
if 'image_weight' in config and isinstance(config['image_weight'], (int, float)):
|
||||
iw = max(0.1, min(config['image_weight'], 3))
|
||||
options['iw'] = iw
|
||||
|
||||
seed = options.pop('seed', None)
|
||||
|
||||
parameter = ""
|
||||
no_value_key = ['relax', 'fast', 'turbo', 'tile']
|
||||
for key, value in options.items():
|
||||
@ -414,7 +419,7 @@ class MidjourneyService:
|
||||
parameter += f" --{key}"
|
||||
else:
|
||||
parameter += f" --{key} {value}"
|
||||
|
||||
|
||||
if seed:
|
||||
parameter += f" --seed {seed}"
|
||||
logger.info(f"使用的seed值: {seed}")
|
||||
@ -436,11 +441,7 @@ class MidjourneyService:
|
||||
|
||||
if new_image_urls:
|
||||
prompt = " ".join(new_image_urls) + " " + prompt
|
||||
|
||||
if 'image_weight' in config and isinstance(config['image_weight'], (int, float)):
|
||||
iw = max(0.1, min(config['image_weight'], 3))
|
||||
parameter += f" --iw {iw}"
|
||||
|
||||
|
||||
if 'characters' in config and config['characters']:
|
||||
char_urls = []
|
||||
characters = config['characters'] if isinstance(config['characters'], list) else [config['characters']]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user