V 1.0.0 - Auto concept - test 8

This commit is contained in:
DESKTOP-CNFQ7PM\Primere
2024-10-21 18:57:20 +02:00
parent 0128e7a2c3
commit bfeb5b2fb6
4 changed files with 498 additions and 517 deletions
+5 -15
View File
@@ -718,8 +718,6 @@ class PrimereCKPTLoader:
OUTPUT_VAE = nodes.VAELoader.load_vae(self, allLSDXLvae[0])[0]
print("KOROLS loading OK...")
# exit()
return (KOLORS_MODEL,) + (CHATGLM3_MODEL,) + (OUTPUT_VAE,) + (MODEL_VERSION,)
case 'StableCascade':
@@ -1110,6 +1108,7 @@ class PrimereCKPTLoader:
print("Hyper lora loaded...")
case 'LCM':
vae_selection = True
if MODEL_VERSION == 'SD1' or MODEL_VERSION == 'SDXL':
SDXL_LORA = 'https://huggingface.co/latent-consistency/lcm-lora-sdxl/resolve/main/pytorch_lora_weights.safetensors?download=true'
SD_LORA = 'https://huggingface.co/latent-consistency/lcm-lora-sdv1-5/resolve/main/pytorch_lora_weights.safetensors?download=true'
@@ -1590,12 +1589,15 @@ class PrimereCLIP:
if model_concept == 'KwaiKolors' or model_version == 'SD1' or model_concept == 'StableCascade' or model_concept == 'Lightning':
adv_encode = False
if model_concept == 'Flux':
if model_concept == 'Flux' or model_concept == 'Pony':
adv_encode = False
clip_model = 'Default'
# clip_mode = True
last_layer = 0
if model_concept == 'Hyper':
clip_model = 'Default'
WORKFLOWDATA = extra_pnginfo['workflow']['nodes']
CONCEPT_SELECTOR = utility.getDataFromWorkflowByName(WORKFLOWDATA, 'PrimereModelConceptSelector', 'model_concept', prompt)
@@ -1630,18 +1632,6 @@ class PrimereCLIP:
positive_text = utility.clear_hunyuan(positive_text, 512)
negative_text = utility.clear_hunyuan(negative_text, 512)
'''tokens_pos = clip.tokenize(positive_text)
out_pos = clip.encode_from_tokens(tokens_pos, return_pooled = True, return_dict=True)
tokens_neg = clip.tokenize(negative_text)
out_neg = clip.encode_from_tokens(tokens_neg, return_pooled = True, return_dict=True)
cond_pos = out_pos.pop("cond")
cond_neg = out_neg.pop("cond")
print('clipping end 2 - sampling OUT')
return ([[cond_pos, out_pos]], [[cond_neg, out_neg]], positive_text, negative_text, "", "", workflow_tuple)'''
if model_concept == 'KwaiKolors':
print('Clip encoding KWAI start:')
device = model_management.get_torch_device()
-12
View File
@@ -639,17 +639,6 @@ class PrimereKSampler:
print(scheduler_name)
match model_concept:
case "Hunyuan":
print("Hunyuan sampling start....")
samples_out = primeresamplers.PKSampler(self, device, seed, model,
steps, cfg, sampler_name, scheduler_name,
positive, negative,
latent_image, denoise,
variation_extender, variation_batch_step_original, batch_counter, variation_extender_original, variation_batch_step, variation_level, variation_limit,
align_your_steps, noise_extender_ksampler)[0]
print('HY sampler out....')
return (samples_out, workflow_tuple)
case "KwaiKolors":
print("KwaiKolors sampling start....")
samples_out = primeresamplers.PSamplerKOROLS(self, model, seed, cfg, positive, negative, latent_image, steps, denoise, sampler_name, scheduler_name, model_sampling, 1000)[0]
@@ -751,7 +740,6 @@ class PrimereKSampler:
workflow_tuple['sampler_settings']['variation_seed'] = seed
workflow_tuple['sampler_settings']['batch_counter'] = batch_counter
# out["samples"] = samples_out[0]["samples"]
return (samples_out, workflow_tuple)
class PrimerePreviewImage():
+137 -137
View File
@@ -299,10 +299,10 @@
"Node name for S&R": "PrimereSamplersSteps"
},
"widgets_values": [
"dpmpp_2m",
"normal",
5,
1.1
"euler_dy",
"karras",
7,
1
],
"color": "#9090eb",
"bgcolor": "#a4a4ff"
@@ -366,7 +366,7 @@
},
"widgets_values": [
"euler_ancestral",
"simple",
"karras",
50,
3.2
],
@@ -1235,7 +1235,7 @@
"Node name for S&R": "PrimereVisualStyle"
},
"widgets_values": [
"Preview woman",
"Sci-fi Future world",
true,
true,
true,
@@ -1344,69 +1344,6 @@
"color": "#145414",
"bgcolor": "#004000"
},
{
"id": 3,
"type": "PrimereVisualCKPT",
"pos": {
"0": 692,
"1": 86
},
"size": {
"0": 463.38775634765625,
"1": 222
},
"flags": {},
"order": 20,
"mode": 0,
"inputs": [
{
"name": "random_seed",
"type": "INT",
"link": 720,
"widget": {
"name": "random_seed"
},
"shape": 7
}
],
"outputs": [
{
"name": "MODEL_NAME",
"type": "CHECKPOINT_NAME",
"links": [
146,
690,
1225
],
"slot_index": 0,
"shape": 3
},
{
"name": "MODEL_VERSION",
"type": "STRING",
"links": [
2102
],
"slot_index": 1,
"shape": 3
}
],
"properties": {
"Node name for S&R": "PrimereVisualCKPT"
},
"widgets_values": [
"Kwai\\OfficialKolors.safetensors",
true,
true,
true,
false,
550,
800,
0
],
"color": "#1414ff",
"bgcolor": "#0000ff"
},
{
"id": 76,
"type": "PrimerePromptSwitch",
@@ -1585,7 +1522,7 @@
"First",
1,
1,
"real photo"
"niji style"
],
"color": "#1414ff",
"bgcolor": "#0000ff"
@@ -2489,7 +2426,7 @@
"Stable-Cascade\\stable_cascade_stage_b.safetensors",
"Stable-Cascade\\stable_cascade_stage_c.safetensors",
"Cascade\\cascade_clip.safetensors",
"DIFFUSION",
"GGUF",
"Flux\\flux1-dev-fp8.safetensors",
"fp8_e4m3fn",
"FLUX1\\flux1-dev-Q4_1.gguf",
@@ -2623,7 +2560,7 @@
},
"widgets_values": [
"",
195030820804332,
460966910858349,
"randomize",
true
],
@@ -2679,7 +2616,7 @@
},
"widgets_values": [
"",
8317058721468,
586132967464127,
"randomize",
true
],
@@ -3429,13 +3366,13 @@
768,
1024,
512,
false,
true,
"Vertical",
true,
false,
1.6,
2.8,
1104963580011777,
816887405187813,
"randomize",
"SD1",
"Auto"
@@ -3612,21 +3549,21 @@
"widgets_values": [
512,
512,
false,
true,
"brownian_fractal",
false,
true,
1,
0.5,
1.5,
false,
true,
1,
0.8,
1.4,
86274692928667,
289783155217662,
"randomize",
false,
true,
"cpu",
false
true
],
"color": "#941414",
"bgcolor": "#800000"
@@ -3854,10 +3791,10 @@
"",
"",
true,
"Default",
"Default",
"ViT-L\\ViT-L-14-TEXT-detail-improved-hiT-GmP-TE-only-HF.safetensors",
"Long\\Long-ViT-L-14-GmP-ft.safetensors",
0,
1,
1.2,
false,
"None",
1,
@@ -4025,7 +3962,7 @@
"Node name for S&R": "PrimereKSampler"
},
"widgets_values": [
341435407178240,
1111158436693810,
"randomize",
20,
8,
@@ -4116,13 +4053,13 @@
"Node name for S&R": "PrimerePreviewImage"
},
"widgets_values": [
true,
false,
"jpeg",
0,
90,
"Checkpoint",
"Overwrite",
"Kwai\\OfficialKolors.safetensors",
"LCM\\cyberrealisticLCM_cyberrealistic33.safetensors",
null
],
"color": "#549494",
@@ -4375,7 +4312,7 @@
"widgets_values": [
"Red sportcar racing",
"Cute cat, nsfw, nude, nudity, porn",
538,
1989,
"randomize",
"",
"",
@@ -4498,6 +4435,69 @@
],
"color": "#149454",
"bgcolor": "#008040"
},
{
"id": 3,
"type": "PrimereVisualCKPT",
"pos": {
"0": 693,
"1": 86
},
"size": {
"0": 463.38775634765625,
"1": 222
},
"flags": {},
"order": 20,
"mode": 0,
"inputs": [
{
"name": "random_seed",
"type": "INT",
"link": 720,
"widget": {
"name": "random_seed"
},
"shape": 7
}
],
"outputs": [
{
"name": "MODEL_NAME",
"type": "CHECKPOINT_NAME",
"links": [
146,
690,
1225
],
"slot_index": 0,
"shape": 3
},
{
"name": "MODEL_VERSION",
"type": "STRING",
"links": [
2102
],
"slot_index": 1,
"shape": 3
}
],
"properties": {
"Node name for S&R": "PrimereVisualCKPT"
},
"widgets_values": [
"Kwai\\realisticKolors.safetensors",
true,
true,
true,
false,
550,
800,
0
],
"color": "#1414ff",
"bgcolor": "#0000ff"
}
],
"links": [
@@ -5920,53 +5920,17 @@
],
"groups": [
{
"title": "Concept sampler group",
"title": "Dashboard settings",
"bounding": [
1916,
1136,
1582,
2355
679,
20,
1225,
497
],
"color": "#3f789e",
"font_size": 24,
"flags": {}
},
{
"title": "File save",
"bounding": [
3941,
25,
1268,
1257
],
"color": "#008040",
"font_size": 24,
"flags": {}
},
{
"title": "Network loader",
"bounding": [
681,
1643,
726,
657
],
"color": "#804000",
"font_size": 24,
"flags": {}
},
{
"title": "Encoder, sampler, decoder",
"bounding": [
1916,
21,
1043,
1104
],
"color": "#A88",
"font_size": 24,
"flags": {}
},
{
"title": "Prompt",
"bounding": [
@@ -5980,12 +5944,48 @@
"flags": {}
},
{
"title": "Dashboard settings",
"title": "Encoder, sampler, decoder",
"bounding": [
679,
20,
1225,
497
1916,
21,
1043,
1104
],
"color": "#A88",
"font_size": 24,
"flags": {}
},
{
"title": "Network loader",
"bounding": [
681,
1643,
726,
657
],
"color": "#804000",
"font_size": 24,
"flags": {}
},
{
"title": "File save",
"bounding": [
3941,
25,
1268,
1257
],
"color": "#008040",
"font_size": 24,
"flags": {}
},
{
"title": "Concept sampler group",
"bounding": [
1916,
1136,
1582,
2355
],
"color": "#3f789e",
"font_size": 24,
@@ -5995,10 +5995,10 @@
"config": {},
"extra": {
"ds": {
"scale": 1,
"scale": 0.9090909090909091,
"offset": [
-1117.924141215337,
703.2615331509027
-1052.0998526767366,
242.28825687967364
]
}
},
File diff suppressed because it is too large Load Diff