Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
54f380f1f0 | ||
|
|
4f7691ff93 |
@@ -20,6 +20,7 @@ class ReimagineNode():
|
||||
"tailored_model_id": ("STRING", ),
|
||||
"tailored_model_influence": ("FLOAT", {"default": 0.5}),
|
||||
"tailored_generation_prefix": ("STRING",), # if used with tailored, possibly get this from the tailored model info node
|
||||
"content_moderation": ("INT", {"default": 0}),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,8 +36,8 @@ class ReimagineNode():
|
||||
self, api_key, prompt, seed,
|
||||
steps_num, fast, structure_ref_influence, structure_image=None,
|
||||
tailored_model_id=None, tailored_model_influence=None, tailored_generation_prefix=None,
|
||||
):
|
||||
fast = bool(fast)
|
||||
content_moderation=0,
|
||||
):
|
||||
payload = {
|
||||
"prompt": tailored_generation_prefix + prompt,
|
||||
"num_results": 1,
|
||||
@@ -44,6 +45,7 @@ class ReimagineNode():
|
||||
"seed": seed,
|
||||
"steps_num": steps_num,
|
||||
"include_generation_prefix": False,
|
||||
"content_moderation": content_moderation,
|
||||
}
|
||||
if structure_image is not None:
|
||||
structure_image = preprocess_image(structure_image)
|
||||
|
||||
@@ -26,6 +26,7 @@ class TailoredGenNode():
|
||||
"guidance_method_2": (["controlnet_canny", "controlnet_depth", "controlnet_recoloring", "controlnet_color_grid"], {"default": "controlnet_canny"}),
|
||||
"guidance_method_2_scale": ("FLOAT", {"default": 1.0}),
|
||||
"guidance_method_2_image": ("IMAGE", ),
|
||||
"content_moderation": ("INT", {"default": 0}),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,8 +43,8 @@ class TailoredGenNode():
|
||||
seed, model_influence, negative_prompt, fast, steps_num,
|
||||
guidance_method_1=None, guidance_method_1_scale=None, guidance_method_1_image=None,
|
||||
guidance_method_2=None, guidance_method_2_scale=None, guidance_method_2_image=None,
|
||||
content_moderation=0,
|
||||
):
|
||||
fast = bool(fast)
|
||||
payload = {
|
||||
"prompt": generation_prefix + prompt,
|
||||
"num_results": 1,
|
||||
@@ -55,6 +56,7 @@ class TailoredGenNode():
|
||||
"fast": fast,
|
||||
"steps_num": steps_num,
|
||||
"include_generation_prefix": False,
|
||||
"content_moderation": content_moderation,
|
||||
}
|
||||
if guidance_method_1_image is not None:
|
||||
guidance_method_1_image = preprocess_image(guidance_method_1_image)
|
||||
|
||||
@@ -28,6 +28,7 @@ class Text2ImageBaseNode():
|
||||
"image_prompt_mode": (["regular", "style_only"], {"default": "regular"}),
|
||||
"image_prompt_image": ("IMAGE", ),
|
||||
"image_prompt_scale": ("FLOAT", {"default": 1.0}),
|
||||
"content_moderation": ("INT", {"default": 0}),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,8 +46,8 @@ class Text2ImageBaseNode():
|
||||
guidance_method_1=None, guidance_method_1_scale=None, guidance_method_1_image=None,
|
||||
guidance_method_2=None, guidance_method_2_scale=None, guidance_method_2_image=None,
|
||||
image_prompt_mode=None, image_prompt_image=None, image_prompt_scale=None,
|
||||
content_moderation=0,
|
||||
):
|
||||
prompt_enhancement = bool(prompt_enhancement)
|
||||
payload = {
|
||||
"prompt": prompt,
|
||||
"num_results": 1,
|
||||
@@ -57,6 +58,7 @@ class Text2ImageBaseNode():
|
||||
"steps_num": steps_num,
|
||||
"text_guidance_scale": text_guidance_scale,
|
||||
"prompt_enhancement": prompt_enhancement,
|
||||
"content_moderation": content_moderation,
|
||||
}
|
||||
if medium != "none":
|
||||
payload["medium"] = medium
|
||||
|
||||
@@ -25,6 +25,7 @@ class Text2ImageFastNode():
|
||||
"image_prompt_mode": (["regular", "style_only"], {"default": "regular"}),
|
||||
"image_prompt_image": ("IMAGE", ),
|
||||
"image_prompt_scale": ("FLOAT", {"default": 1.0}),
|
||||
"content_moderation": ("INT", {"default": 0}),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,8 +43,8 @@ class Text2ImageFastNode():
|
||||
guidance_method_1=None, guidance_method_1_scale=None, guidance_method_1_image=None,
|
||||
guidance_method_2=None, guidance_method_2_scale=None, guidance_method_2_image=None,
|
||||
image_prompt_mode=None, image_prompt_image=None, image_prompt_scale=None,
|
||||
content_moderation=0,
|
||||
):
|
||||
prompt_enhancement = bool(prompt_enhancement)
|
||||
payload = {
|
||||
"prompt": prompt,
|
||||
"num_results": 1,
|
||||
@@ -52,6 +53,7 @@ class Text2ImageFastNode():
|
||||
"seed": seed,
|
||||
"steps_num": steps_num,
|
||||
"prompt_enhancement": prompt_enhancement,
|
||||
"content_moderation": content_moderation,
|
||||
}
|
||||
if guidance_method_1_image is not None:
|
||||
guidance_method_1_image = preprocess_image(guidance_method_1_image)
|
||||
|
||||
@@ -19,6 +19,7 @@ class Text2ImageHDNode():
|
||||
"prompt_enhancement": ("INT", {"default": 0}),
|
||||
"text_guidance_scale": ("INT", {"default": 5}),
|
||||
"medium": (["photography", "art", "none"], {"default": "none"}),
|
||||
"content_moderation": ("INT", {"default": 0}),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,9 +33,8 @@ class Text2ImageHDNode():
|
||||
|
||||
def execute(
|
||||
self, api_key, prompt, aspect_ratio, seed, negative_prompt,
|
||||
steps_num, prompt_enhancement, text_guidance_scale, medium,
|
||||
steps_num, prompt_enhancement, text_guidance_scale, medium, content_moderation=0,
|
||||
):
|
||||
prompt_enhancement = bool(prompt_enhancement)
|
||||
payload = {
|
||||
"prompt": prompt,
|
||||
"num_results": 1,
|
||||
@@ -45,6 +45,7 @@ class Text2ImageHDNode():
|
||||
"steps_num": steps_num,
|
||||
"text_guidance_scale": text_guidance_scale,
|
||||
"prompt_enhancement": prompt_enhancement,
|
||||
"content_moderation": content_moderation,
|
||||
}
|
||||
if medium != "none":
|
||||
payload["medium"] = medium
|
||||
|
||||
Reference in New Issue
Block a user