Added VAE, Embedding + Combiner nodes, Added LyCoris in the options for lora, Fixed AIR Code from CivitAI, Automatically add trigger words for lora and embeddings, Added More workflows and fixed some typos in readme file

This commit is contained in:
Jack
2024-12-18 01:04:13 +02:00
parent 6bf9d37204
commit 5472ad876e
20 changed files with 362 additions and 26 deletions
+3 -2
View File
@@ -70,11 +70,12 @@ async def modelSearch(reqPayload):
"sort": "-downloadCount",
}]
if(modelCategory != "controlnet" and modelCategory != "lora"):
aclTypes = ["controlnet", "lora", "lycoris", "embedding", "vae"]
if(modelCategory not in aclTypes):
utilityConfig[0]["type"] = modelType
elif(modelCategory == "controlnet" and controlNetConditioning != "all"):
utilityConfig[0]["conditioning"] = controlNetConditioning
if(modelArch != "all"):
utilityConfig[0]["architecture"] = modelArch
if(modelQuery != ""):
+66
View File
@@ -0,0 +1,66 @@
class embeddingSearch:
@classmethod
def INPUT_TYPES(cls):
return {
"required": {
"Embedding Search": ("STRING", {
"tooltip": "Searchg For A Specific Embedding By Name Or Civit AIR Code (eg: EasyNegative).",
}),
"Model Architecture": ([
"All",
"FLUX.1-Schnell",
"FLUX.1-Dev",
"Pony",
"SD 1.5",
"SD 1.5 Hyper",
"SD 1.5 LCM",
"SD 3",
"SDXL 1.0",
"SDXL 1.0 LCM",
"SDXL Distilled",
"SDXL Hyper",
"SDXL Lightning",
"SDXL Turbo",
], {
"tooltip": "Choose Embedding Model Architecture To Filter Out The Results.",
"default": "SD 1.5",
}),
"EmbeddingList": ([
"civitai:7808@9208 (EasyNegative)",
"civitai:4629@5637 (Deep Negative V1.x)",
"civitai:56519@60938 (negative_hand Negative Embedding)",
"civitai:72437@77169 (BadDream + UnrealisticDream (Negative Embeddings))",
"civitai:11772@25820 (veryBadImageNegative)",
"civitai:71961@94057 (Fast Negative Embedding (+ FastNegativeV2))",
], {
"tooltip": "Embedding Results Will Show UP Here So You Could Choose From.",
"default": "civitai:7808@9208 (EasyNegative)",
}),
"weight": ("FLOAT", {
"tooltip": "Defines the strength or influence of the Embedding on the generation process.",
"default": 1.0,
"min": 0,
"max": 1,
"step": 0.1,
}),
},
}
DESCRIPTION = "Directly Search and Connect Embeddings to Runware Inference Nodes In ComfyUI."
FUNCTION = "embeddingSearch"
RETURN_TYPES = ("RUNWAREEMBEDDING",)
RETURN_NAMES = ("Runware Embedding",)
CATEGORY = "Runware"
@classmethod
def VALIDATE_INPUTS(cls, EmbeddingList):
return True
def embeddingSearch(self, **kwargs):
currentModel = kwargs.get("EmbeddingList")
embeddingWeight = kwargs.get("weight")
embeddingAIRCode = currentModel.split(" ")[0]
return ({
"model": embeddingAIRCode,
"weight": round(embeddingWeight, 2),
},)
+37
View File
@@ -0,0 +1,37 @@
class embeddingsCombine:
@classmethod
def INPUT_TYPES(cls):
return {
"required": {
"Embedding 1": ("RUNWAREEMBEDDING", {
"tooltip": "Connect a Runware Embedding From an Embedding Node.",
}),
},
"optional": {
"Embedding 2": ("RUNWAREEMBEDDING", {
"tooltip": "Connect a Runware Embedding From an Embedding Node.",
}),
"Embedding 3": ("RUNWAREEMBEDDING", {
"tooltip": "Connect a Runware Embedding From an Embedding Node.",
}),
},
}
DESCRIPTION = "Combine One or More Embeddings To Connect It With Runware Image Inference."
FUNCTION = "embeddingsCombine"
RETURN_TYPES = ("RUNWAREEMBEDDING",)
RETURN_NAMES = ("Runware Embeddings",)
CATEGORY = "Runware"
def embeddingsCombine(self, **kwargs):
embeddingV1 = kwargs.get("Embedding 1")
embeddingV2 = kwargs.get("Embedding 2", None)
embeddingV3 = kwargs.get("Embedding 3", None)
embeddingsObjArray = []
embeddingsObjArray.append(embeddingV1)
if(embeddingV2):
embeddingsObjArray.append(embeddingV2)
if(embeddingV3):
embeddingsObjArray.append(embeddingV3)
return (embeddingsObjArray,)
+15
View File
@@ -118,6 +118,12 @@ class txt2img:
"maskImage": ("MASK", {
"tooltip": "Specifies the mask image to be used for the inpainting process, when doing Inpainting, this parameter is required.",
}),
"Embeddings": ("RUNWAREEMBEDDING", {
"tooltip": "Connect a Runware Embedding Node to help the model generate images that align with the desired structure.",
}),
"VAE": ("RUNWAREVAE", {
"tooltip": "Connect a Runware VAE Node to help the model generate images that align with the desired structure.",
}),
}
}
@@ -142,6 +148,8 @@ class txt2img:
runwareControlNet = kwargs.get("ControlNet", None)
runwareLora = kwargs.get("Lora", None)
runwareRefiner = kwargs.get("Refiner", None)
runwareEmbedding = kwargs.get("Embeddings", None)
runwareVAE = kwargs.get("VAE", None)
seedImage = kwargs.get("seedImage", None)
seedImageStrength = kwargs.get("strength", 0.8)
maskImage = kwargs.get("maskImage", None)
@@ -193,6 +201,13 @@ class txt2img:
genConfig[0]["lora"] = runwareLora
elif(isinstance(runwareLora, dict)):
genConfig[0]["lora"] = [runwareLora]
if(runwareEmbedding is not None):
if(isinstance(runwareEmbedding, list)):
genConfig[0]["embeddings"] = runwareEmbedding
elif(isinstance(runwareEmbedding, dict)):
genConfig[0]["embeddings"] = [runwareEmbedding]
if(runwareVAE is not None):
genConfig[0]["vae"] = runwareVAE
if(runwareControlNet is not None):
genConfig[0]["controlNet"] = runwareControlNet
if(runwareRefiner is not None):
+2 -1
View File
@@ -27,8 +27,9 @@ class loraSearch:
}),
"LoraType": ([
"Lora",
"LyCORIS"
], {
"tooltip": "Choose Lora Type To Filter Results.",
"tooltip": "Choose Lora Type To Filter Out The Results.",
"default": "Lora",
}),
"LoraList": ([
+55
View File
@@ -0,0 +1,55 @@
class vaeSearch:
@classmethod
def INPUT_TYPES(cls):
return {
"required": {
"VAE Search": ("STRING", {
"tooltip": "Searchg For A Specific VAE By Name Or Civit AIR Code (eg: ClearVAE).",
}),
"Model Architecture": ([
"All",
"FLUX.1-Schnell",
"FLUX.1-Dev",
"Pony",
"SD 1.5",
"SD 1.5 Hyper",
"SD 1.5 LCM",
"SD 3",
"SDXL 1.0",
"SDXL 1.0 LCM",
"SDXL Distilled",
"SDXL Hyper",
"SDXL Lightning",
"SDXL Turbo",
], {
"tooltip": "Choose VAE's Model Architecture To Filter Out The Results.",
"default": "SD 1.5",
}),
"VAEList": ([
"civitai:23906@28569 (kl-f8-anime2 VAE)",
"civitai:22354@88156 (ClearVAE(SD1.5))",
"civitai:276082@311162 (vae-ft-mse-840000-ema-pruned | 840000 | 840k SD1.5 VAE)",
"civitai:70248@83798 (Color101 VAE)",
"civitai:22354@26689 (ClearVAE (SD1.5))",
"civitai:88390@94036 (difConsistency RAW VAE (Pack))",
], {
"tooltip": "VAE Results Will Show UP Here So You Could Choose From.",
"default": "civitai:23906@28569 (kl-f8-anime2 VAE)",
})
},
}
DESCRIPTION = "Directly Search and Connect VAE's to Runware Inference Nodes In ComfyUI."
FUNCTION = "vaeSearch"
RETURN_TYPES = ("RUNWAREVAE",)
RETURN_NAMES = ("Runware VAE",)
CATEGORY = "Runware"
@classmethod
def VALIDATE_INPUTS(cls, VAEList):
return True
def vaeSearch(self, **kwargs):
currentModel = kwargs.get("VAEList")
vaeAIRCode = currentModel.split(" ")[0]
return (vaeAIRCode,)