mirror of
https://github.com/justUmen/Bjornulf_custom_nodes.git
synced 2026-03-21 20:52:11 -03:00
0.36
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
# 🔗 Comfyui : Bjornulf_custom_nodes v0.35 🔗
|
# 🔗 Comfyui : Bjornulf_custom_nodes v0.36 🔗
|
||||||
|
|
||||||
# ❤️ Coffee : ☕☕☕☕☕ 5/5
|
# ❤️ Coffee : ☕☕☕☕☕ 5/5
|
||||||
|
|
||||||
@@ -83,6 +83,7 @@ wget --content-disposition -P /workspace/ComfyUI/models/checkpoints "https://civ
|
|||||||
- **v0.33**: Control random on paused nodes, fix pydub sound bug permissions on Windows.
|
- **v0.33**: Control random on paused nodes, fix pydub sound bug permissions on Windows.
|
||||||
- **v0.34**: Two new nodes : Load Images from output folder and Select an Image, Pick.
|
- **v0.34**: Two new nodes : Load Images from output folder and Select an Image, Pick.
|
||||||
- **v0.35**: Great improvements of the TTS node 31. It will also save the audio file in the "ComfyUI/Bjornulf_TTS/" folder. - Not tested on windows yet -
|
- **v0.35**: Great improvements of the TTS node 31. It will also save the audio file in the "ComfyUI/Bjornulf_TTS/" folder. - Not tested on windows yet -
|
||||||
|
- **v0.36**: Fix random model.
|
||||||
|
|
||||||
# 📝 Nodes descriptions
|
# 📝 Nodes descriptions
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "bjornulf_custom_nodes"
|
name = "bjornulf_custom_nodes"
|
||||||
description = "Nodes: Ollama, Text to Speech, Combine Texts, Random Texts, Save image for Bjornulf LobeChat, Text with random Seed, Random line from input, Combine images, Image to grayscale (black & white), Remove image Transparency (alpha), Resize Image, ..."
|
description = "Nodes: Ollama, Text to Speech, Combine Texts, Random Texts, Save image for Bjornulf LobeChat, Text with random Seed, Random line from input, Combine images, Image to grayscale (black & white), Remove image Transparency (alpha), Resize Image, ..."
|
||||||
version = "0.35"
|
version = "0.36"
|
||||||
license = {file = "LICENSE"}
|
license = {file = "LICENSE"}
|
||||||
|
|
||||||
[project.urls]
|
[project.urls]
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import random
|
import random
|
||||||
|
import json
|
||||||
|
|
||||||
class RandomModelClipVae:
|
class RandomModelClipVae:
|
||||||
@classmethod
|
@classmethod
|
||||||
@@ -12,11 +13,12 @@ class RandomModelClipVae:
|
|||||||
"model_2": ("MODEL", {"forceInput": True}),
|
"model_2": ("MODEL", {"forceInput": True}),
|
||||||
"clip_2": ("CLIP", {"forceInput": True}),
|
"clip_2": ("CLIP", {"forceInput": True}),
|
||||||
"vae_2": ("VAE", {"forceInput": True}),
|
"vae_2": ("VAE", {"forceInput": True}),
|
||||||
|
"seed": ("INT", {"default": 0}),
|
||||||
},
|
},
|
||||||
"hidden": {
|
"hidden": {
|
||||||
**{f"model_{i}": ("MODEL", {"forceInput": True}) for i in range(3, 11)},
|
**{f"model_{i}": ("MODEL", {"forceInput": True}) for i in range(3, 11)},
|
||||||
**{f"clip_{i}": ("CLIP", {"forceInput": True}) for i in range(3, 11)},
|
**{f"clip_{i}": ("CLIP", {"forceInput": True}) for i in range(3, 11)},
|
||||||
**{f"vae_{i}": ("VAE", {"forceInput": True}) for i in range(3, 11)}
|
**{f"vae_{i}": ("VAE", {"forceInput": True}) for i in range(3, 11)},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -24,6 +26,7 @@ class RandomModelClipVae:
|
|||||||
FUNCTION = "random_select"
|
FUNCTION = "random_select"
|
||||||
|
|
||||||
def random_select(self, number_of_inputs, **kwargs):
|
def random_select(self, number_of_inputs, **kwargs):
|
||||||
|
random.seed(kwargs.get('seed', 0))
|
||||||
selected_index = random.randint(1, number_of_inputs)
|
selected_index = random.randint(1, number_of_inputs)
|
||||||
|
|
||||||
selected_model = kwargs[f"model_{selected_index}"]
|
selected_model = kwargs[f"model_{selected_index}"]
|
||||||
|
|||||||
@@ -58,6 +58,12 @@ app.registerExtension({
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set seed widget to hidden input
|
||||||
|
const seedWidget = node.widgets.find((w) => w.name === "seed");
|
||||||
|
if (seedWidget) {
|
||||||
|
seedWidget.type = "HIDDEN";
|
||||||
|
}
|
||||||
|
|
||||||
// Delay the initial update to ensure node is fully initialized
|
// Delay the initial update to ensure node is fully initialized
|
||||||
setTimeout(updateInputs, 0);
|
setTimeout(updateInputs, 0);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user