Add MJ image node, GIF save, and Kling/image generator updates
Ship o1key MJ图片生成 with content/style refs and prompt flags, save-GIF with preview, Kling 4.0 helpers, plus GPT/unified image node polish and docs.
This commit is contained in:
+13
-4
@@ -404,14 +404,21 @@ def expand_batch_prompt_tasks(prompt: str, images_per_prompt: int) -> List[str]:
|
||||
return [task_prompt for task_prompt in prompts for _ in range(count)]
|
||||
|
||||
|
||||
IMAGE_BATCH_MODE_GROUP_TO_MODELS = "一组搭配+多模特"
|
||||
IMAGE_BATCH_MODE_CARTESIAN = "全部搭配×全部模特"
|
||||
IMAGE_BATCH_MODE_SINGLE_REFERENCES = "单图素材批量"
|
||||
IMAGE_BATCH_MODE_GROUP_TO_MODELS = "整组素材→多个目标"
|
||||
IMAGE_BATCH_MODE_CARTESIAN = "每张素材×每张目标"
|
||||
IMAGE_BATCH_MODE_SINGLE_REFERENCES = "每张素材单独出图"
|
||||
IMAGE_BATCH_MODES = (
|
||||
IMAGE_BATCH_MODE_GROUP_TO_MODELS,
|
||||
IMAGE_BATCH_MODE_CARTESIAN,
|
||||
IMAGE_BATCH_MODE_SINGLE_REFERENCES,
|
||||
)
|
||||
# Labels shipped before the rename. They are accepted so old workflows and queued
|
||||
# jobs keep running, but only the current labels are offered in the combo widget.
|
||||
IMAGE_BATCH_MODE_ALIASES = {
|
||||
"一组搭配+多模特": IMAGE_BATCH_MODE_GROUP_TO_MODELS,
|
||||
"全部搭配×全部模特": IMAGE_BATCH_MODE_CARTESIAN,
|
||||
"单图素材批量": IMAGE_BATCH_MODE_SINGLE_REFERENCES,
|
||||
}
|
||||
|
||||
|
||||
def expand_image_generation_tasks(
|
||||
@@ -436,6 +443,8 @@ def expand_image_generation_tasks(
|
||||
count = int(images_per_pair)
|
||||
if count < 1:
|
||||
raise ValueError("每个组合的生图数量必须大于 0")
|
||||
# Retired labels stay accepted so queued and saved workflows keep running.
|
||||
batch_mode = IMAGE_BATCH_MODE_ALIASES.get(batch_mode, batch_mode)
|
||||
prompts = parse_batch_prompts(prompt) or [prompt.strip()]
|
||||
if not batch_enabled:
|
||||
pairings = [{
|
||||
@@ -451,7 +460,7 @@ def expand_image_generation_tasks(
|
||||
model_total = max(0, int(model_reference_count))
|
||||
if batch_mode == IMAGE_BATCH_MODE_SINGLE_REFERENCES:
|
||||
if outfit_total < 1:
|
||||
raise ValueError("单图批量至少需要上传1张素材图")
|
||||
raise ValueError("每张素材单独出图至少需要上传1张素材图")
|
||||
pairings = [
|
||||
{
|
||||
"reference_indices": (outfit_index,),
|
||||
|
||||
Reference in New Issue
Block a user