add match_input_image in flux imgInput aspect_ratio for kontext model
This commit is contained in:
+21
-1
@@ -967,7 +967,8 @@ class BillBum_Modified_Flux_API_Node_imgInput:
|
||||
"image_prompt": ("IMAGE",),
|
||||
"image_strength": ("FLOAT", {"default": 0.75, "min": 0.0, "max": 1.0, "step": 0.05,}),
|
||||
"aspect_ratio": ("COMBO", {
|
||||
"options": ["1:1", "21:9", "16:9", "3:2", "4:3", "5:4", "4:5", "3:4", "2:3", "9:16", "9:21"]
|
||||
"options": ["1:1", "21:9", "16:9", "3:2", "4:3", "5:4", "4:5", "3:4", "2:3", "9:16", "9:21", "match_input_image"],
|
||||
"tooltip": "match_input_image only support flux-kontext-pro/max"
|
||||
})
|
||||
},
|
||||
}
|
||||
@@ -1020,6 +1021,25 @@ class BillBum_Modified_Flux_API_Node_imgInput:
|
||||
"response_format": "b64_json",
|
||||
"output_format": "webp"
|
||||
}
|
||||
elif model.startswith("flux-kontext"):
|
||||
if image_prompt == None:
|
||||
data = {
|
||||
"model": model,
|
||||
"prompt": prompt,
|
||||
"aspect_ratio": aspect_ratio,
|
||||
"response_format": "b64_json",
|
||||
"output_format": "webp"
|
||||
}
|
||||
else:
|
||||
b64_url = get_b64_url(image_prompt)
|
||||
data = {
|
||||
"model": model,
|
||||
"prompt": prompt,
|
||||
"input_image": b64_url,
|
||||
"aspect_ratio": aspect_ratio,
|
||||
"response_format": "b64_json",
|
||||
"output_format": "webp"
|
||||
}
|
||||
else:
|
||||
if image_prompt == None:
|
||||
data = {
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
[project]
|
||||
name = "comfyui_billbum_nodes"
|
||||
description = "API call node for Third-party platforms both official and local. Support VLMs LLMs Dalle3 Flux-Pro etc(new Support gpt-image-1 api!!!). And some little tools: img to b64 url, b64 url to img, b64 url to b64 data, reg text to word and ',' only, etc."
|
||||
version = "1.1.1"
|
||||
version = "1.1.2"
|
||||
license = {file = "LICENSE"}
|
||||
dependencies = ["tenacity", "openai", "pillow", "requests", "torch", "numpy", "tiktoken"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user