This commit is contained in:
jakechai
2024-07-16 00:13:31 +08:00
parent be27f99f68
commit 549c2e2cd3
8 changed files with 55 additions and 22 deletions
+3 -2
View File
@@ -27,8 +27,8 @@ Main:
- [JK_workflow_tex2img_img2img_SDXL](https://github.com/jakechai/ComfyUI-JakeUpgrade/blob/master/Workflow/Main/JK_workflow_tex2img_img2img_SDXL.json)
- [JK_workflow_tex2img_img2img_SD15](https://github.com/jakechai/ComfyUI-JakeUpgrade/blob/master/Workflow/Main/JK_workflow_tex2img_img2img_SD15.json)
- [JK_workflow_Seamless Texture](https://github.com/jakechai/ComfyUI-JakeUpgrade/blob/master/Workflow/Main/JK_workflow_Seamless%20Texture.json)
- [JK_workflow_img2mesh_single](https://github.com/jakechai/ComfyUI-JakeUpgrade/blob/master/Workflow/Main/JK_workflow_img2mesh_single.json)
- [JK_workflow_img2mesh_single_Unique3D](https://github.com/jakechai/ComfyUI-JakeUpgrade/blob/master/Workflow/Main/JK_workflow_img2mesh_single_Unique3D.json)
- [JK_workflow_img2mesh_single_CRM&Zero123plus](https://github.com/jakechai/ComfyUI-JakeUpgrade/blob/master/Workflow/Main/JK_workflow_img2mesh_single_CRM&Zero123plus.json)
- [JJK_workflow_img2mesh_single_Unique&Wonder&Era3D](https://github.com/jakechai/ComfyUI-JakeUpgrade/blob/master/Workflow/Main/JK_workflow_img2mesh_single_Unique&Wonder&Era3D.json)
- [JK_workflow_img2mesh_multi](https://github.com/jakechai/ComfyUI-JakeUpgrade/blob/master/Workflow/Main/JK_workflow_img2mesh_multi.json)
(Tips: ComfyUI-3D-Pack needs pytorch 2.3.0+cu121 and xformers, but the latest ComfyUI_windows_portable version uses pytorch 2.3.1+cu121, you should separate those two ComfyUI.)
@@ -334,6 +334,7 @@ Jake Upgrade Nodes are inspired by:
## Changelog
- 2024-06-23 - v1.0.0 released.
- 2024-07-11 - v1.0.6 Noise Injection for Upscale Workflow.
- 2024-07-16 - v1.0.7 Single Image to Mesh Workflow updated.
## Workflow Todo List
- ControlNet Preprocess
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -147,7 +147,7 @@ NODE_CLASS_MAPPINGS = {
"Evaluate Strings JK": EvaluateStrs_JK,
"Evaluate Examples JK": EvalExamples_JK,
### 3D Nodes
# "Orbit Poses JK": OrbitPoses_JK,
"Orbit Poses JK": OrbitPoses_JK,
}
NODE_DISPLAY_NAME_MAPPINGS = {
@@ -280,7 +280,7 @@ NODE_DISPLAY_NAME_MAPPINGS = {
"Evaluate Strings JK": "Evaluate String JK🐉",
"Evaluate Examples JK": "Evaluate Examples JK🐉",
### 3D Nodes
# "Orbit Poses JK": "Orbit Poses JK🐉",
"Orbit Poses JK": "Orbit Poses JK🐉",
}
__all__ = ['NODE_CLASS_MAPPINGS']
+47 -15
View File
@@ -2687,20 +2687,17 @@ class CR_TextInputSwitch_JK:
return {
"required": {
"boolean_value": ("BOOLEAN", {"default": False}),
"text_false": ("STRING", {"default": ""}),
"text_true": ("STRING", {"default": ""}),
},
"optional": {
"text_false": ("STRING", {"forceInput": True}),
"text_true": ("STRING", {"forceInput": True}),
}
}
RETURN_TYPES = ("STRING", "BOOLEAN",)
FUNCTION = "text_input_switch"
CATEGORY = icons.get("JK/Logic")
def text_input_switch(self, boolean_value, text_false=None, text_true=None):
text_false = text_false if text_false != None else ""
text_true = text_true if text_true != None else ""
def text_input_switch(self, boolean_value, text_false, text_true):
if boolean_value == True:
return (text_true, boolean_value,)
else:
@@ -3969,6 +3966,19 @@ class EvalExamples_JK:
#---------------------------------------------------------------------------------------------------------------------#
# 3D Nodes (WIP)
#---------------------------------------------------------------------------------------------------------------------#
ORBITPOSE_PRESET = ["Custom", "CRM(6)", "Zero123Plus(6)", "Wonder3D(6)", "Era3D(6)", "MVDream(4)", "Unique3D(4)", "CharacterGen(4)"]
OrbitPoses = {
"Custom": [[-90.0, 0.0, 180.0, 90.0, 0.0, 0.0], [0.0, 90.0, 0.0, 0.0, -90.0, 0.0], [4.0, 4.0, 4.0, 4.0, 4.0, 4.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]],
"CRM(6)": [[-90.0, 0.0, 180.0, 90.0, 0.0, 0.0], [0.0, 90.0, 0.0, 0.0, -90.0, 0.0], [4.0, 4.0, 4.0, 4.0, 4.0, 4.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]],
"Wonder3D(6)": [[0.0, 45.0, 90.0, 180.0, -90.0, -45.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [4.0, 4.0, 4.0, 4.0, 4.0, 4.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]],
"Zero123Plus(6)": [[30.0, 90.0, 150.0, -150.0, -90.0, -30.0], [-20.0, 10.0, -20.0, 10.0, -20.0, 10.0], [4.0, 4.0, 4.0, 4.0, 4.0, 4.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]],
"Era3D(6)": [[0.0, 45.0, 90.0, 180.0, -90.0, -45.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]], #[[radius], [radius], [radius], [radius], [radius], [radius]], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
"MVDream(4)": [[0.0, 90.0, 180.0, -90.0], [0.0, 0.0, 0.0, 0.0], [4.0, 4.0, 4.0, 4.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]],
"Unique3D(4)": [[0.0, 90.0, 180.0, -90.0], [0.0, 0.0, 0.0, 0.0]], #[[radius], [radius], [radius], [radius]], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]
"CharacterGen(4)": [[-90.0, 90.0, 180.0, 0.0], [0.0, 0.0, 0.0, 0.0]], #[[radius], [radius], [radius], [radius]], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]
}
class OrbitPoses_JK:
def __init__(self):
pass
@@ -3977,7 +3987,11 @@ class OrbitPoses_JK:
def INPUT_TYPES(cls):
return {
"required": {
"radius": ("FLOAT", {"default": 4.0, "min": 0.1, "step": 0.01}),
"orbitpose_preset": (ORBITPOSE_PRESET, {"default": "Custom"}),
"azimuths": ("STRING", {"default": "-90.0, 0.0, 180.0, 90.0, 0.0, 0.0"}),
"elevations": ("STRING", {"default": "0.0, 90.0, 0.0, 0.0, -90.0, 0.0"}),
"radius": ("STRING", {"default": "4.0, 4.0, 4.0, 4.0, 4.0, 4.0"}),
"center": ("STRING", {"default": "0.0, 0.0, 0.0, 0.0, 0.0, 0.0"}),
},
}
@@ -3987,14 +4001,32 @@ class OrbitPoses_JK:
FUNCTION = "get_orbit_poses"
CATEGORY = icons.get("JK/3D")
def get_orbit_poses(self, radius):
azimuths = [0, 45, 90, 180, -90, -45]
elevations = [0.0] * 6
radiuss = [radius] * 6
center = [0.0] * 6
def get_orbit_poses(self, orbitpose_preset, azimuths, elevations, radius, center):
orbit_camposes = [azimuths, elevations, radiuss, center, center, center]
orbit_camposes = OrbitPoses.get(f"{orbitpose_preset}")
if orbitpose_preset == "Custom":
azimuths = azimuths.split(",")
elevations = elevations.split(",")
radius = radius.split(",")
center = center.split(",")
orbit_azimuths = [float(item) for item in azimuths]
orbit_elevations = [float(item) for item in elevations]
orbit_radius = [float(item) for item in radius]
orbit_center = [float(item) for item in center]
orbit_camposes = [orbit_azimuths, orbit_elevations, orbit_radius, orbit_center, orbit_center, orbit_center]
elif orbitpose_preset == "Era3D(6)":
radius = radius.split(",")
orbit_radius = [float(item) for item in radius]
orbit_center = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
orbit_camposes = [orbit_camposes[0], orbit_camposes[1], orbit_radius, orbit_center, orbit_center, orbit_center]
elif orbitpose_preset == "Unique3D(4)" or orbitpose_preset == "CharacterGen(4)":
radius = radius.split(",")
orbit_radius = [float(item) for item in radius]
orbit_radius.pop(4)
orbit_radius.pop(4)
orbit_center = [0.0, 0.0, 0.0, 0.0]
orbit_camposes = [orbit_camposes[0], orbit_camposes[1], orbit_radius, orbit_center, orbit_center, orbit_center]
return (orbit_camposes,)
+1 -1
View File
@@ -1,7 +1,7 @@
[project]
name = "ComfyUI-JakeUpgrade"
description = "ComfyUI workflow customization by Jake."
version = "1.0.6"
version = "1.0.7"
license = "LICENSE"
dependencies = ["opencv-python", "piexif", "torch", "numpy", "numexpr", "simpleeval"]