support batch size in inpaint mode

pull/369/head
Abdullah Alfaraj 2023-11-19 03:05:52 +03:00
parent 8d73846cbf
commit 32e775cf2b
4 changed files with 276 additions and 2309 deletions

View File

@ -9,7 +9,7 @@
"cfg": 7, "cfg": 7,
"sampler_name": "euler_ancestral", "sampler_name": "euler_ancestral",
"scheduler": "karras", "scheduler": "karras",
"denoise": 1, "denoise": 0.71,
"model": [ "model": [
"76", "76",
0 0
@ -23,7 +23,7 @@
4 4
], ],
"latent_image": [ "latent_image": [
"135", "160",
0 0
] ]
}, },
@ -130,7 +130,7 @@
}, },
"16": { "16": {
"inputs": { "inputs": {
"ckpt_name": "dreamshaper_8Inpainting.safetensors" "ckpt_name": "aniverse_v15Pruned.safetensors"
}, },
"class_type": "CheckpointLoaderSimple" "class_type": "CheckpointLoaderSimple"
}, },
@ -153,7 +153,7 @@
}, },
"58": { "58": {
"inputs": { "inputs": {
"image": "pasted/image (13).png", "image": "04b380cb676f37e52d5963a0982edd5e.jpg",
"choose file to upload": "image" "choose file to upload": "image"
}, },
"class_type": "LoadImage" "class_type": "LoadImage"
@ -188,7 +188,7 @@
}, },
"83": { "83": {
"inputs": { "inputs": {
"image": "pasted/image (14).png", "image": "pasted/image (4).png",
"choose file to upload": "image" "choose file to upload": "image"
}, },
"class_type": "LoadImage" "class_type": "LoadImage"
@ -207,7 +207,7 @@
}, },
"135": { "135": {
"inputs": { "inputs": {
"content_mask": "latent_nothing", "content_mask": "original",
"width": [ "width": [
"126", "126",
0 0
@ -237,7 +237,7 @@
}, },
"141": { "141": {
"inputs": { "inputs": {
"seed": 370804183246305 "seed": 519416762507340
}, },
"class_type": "APS_Seed" "class_type": "APS_Seed"
}, },
@ -325,5 +325,15 @@
] ]
}, },
"class_type": "ControlNetScript" "class_type": "ControlNetScript"
},
"160": {
"inputs": {
"amount": 1,
"samples": [
"135",
0
]
},
"class_type": "RepeatLatentBatch"
} }
} }

View File

@ -1,6 +1,6 @@
{ {
"last_node_id": 159, "last_node_id": 160,
"last_link_id": 304, "last_link_id": 306,
"nodes": [ "nodes": [
{ {
"id": 13, "id": 13,
@ -14,7 +14,7 @@
"1": 46 "1": 46
}, },
"flags": {}, "flags": {},
"order": 35, "order": 36,
"mode": 0, "mode": 0,
"inputs": [ "inputs": [
{ {
@ -200,7 +200,7 @@
"1": 46 "1": 46
}, },
"flags": {}, "flags": {},
"order": 32, "order": 33,
"mode": 0, "mode": 0,
"inputs": [ "inputs": [
{ {
@ -277,7 +277,7 @@
"1": 82 "1": 82
}, },
"flags": {}, "flags": {},
"order": 31, "order": 32,
"mode": 0, "mode": 0,
"inputs": [ "inputs": [
{ {
@ -318,7 +318,7 @@
"1": 474 "1": 474
}, },
"flags": {}, "flags": {},
"order": 33, "order": 34,
"mode": 0, "mode": 0,
"inputs": [ "inputs": [
{ {
@ -553,79 +553,6 @@
"Node name for S&R": "PreviewImage" "Node name for S&R": "PreviewImage"
} }
}, },
{
"id": 141,
"type": "APS_Seed",
"pos": [
359,
532
],
"size": {
"0": 361.20001220703125,
"1": 82
},
"flags": {},
"order": 1,
"mode": 0,
"outputs": [
{
"name": "s",
"type": "INT",
"links": [
259,
260
],
"shape": 3,
"slot_index": 0
}
],
"title": "Auto-Photoshop-SD Seed | id:first_pass_seed",
"properties": {
"Node name for S&R": "APS_Seed"
},
"widgets_values": [
248827423249163,
"randomize"
]
},
{
"id": 121,
"type": "Reroute",
"pos": [
2069,
410
],
"size": [
90.4,
26
],
"flags": {},
"order": 21,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 290
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
217
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
},
"color": "#223",
"bgcolor": "#335"
},
{ {
"id": 148, "id": 148,
"type": "PreviewImage", "type": "PreviewImage",
@ -663,7 +590,7 @@
"1": 106 "1": 106
}, },
"flags": {}, "flags": {},
"order": 2, "order": 1,
"mode": 0, "mode": 0,
"outputs": [ "outputs": [
{ {
@ -854,7 +781,7 @@
"1": 282.4336242675781 "1": 282.4336242675781
}, },
"flags": {}, "flags": {},
"order": 34, "order": 35,
"mode": 0, "mode": 0,
"inputs": [ "inputs": [
{ {
@ -869,33 +796,6 @@
"ComfyUI" "ComfyUI"
] ]
}, },
{
"id": 12,
"type": "SaveImage",
"pos": [
3162,
1131
],
"size": {
"0": 407.53717041015625,
"1": 468.13226318359375
},
"flags": {},
"order": 36,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 17
}
],
"title": "Save Image | id:hires_output",
"properties": {},
"widgets_values": [
"ComfyUI"
]
},
{ {
"id": 126, "id": 126,
"type": "Integer", "type": "Integer",
@ -908,7 +808,7 @@
"1": 58 "1": 58
}, },
"flags": {}, "flags": {},
"order": 3, "order": 2,
"mode": 0, "mode": 0,
"outputs": [ "outputs": [
{ {
@ -941,7 +841,7 @@
"1": 58 "1": 58
}, },
"flags": {}, "flags": {},
"order": 4, "order": 3,
"mode": 0, "mode": 0,
"outputs": [ "outputs": [
{ {
@ -974,7 +874,7 @@
"1": 98 "1": 98
}, },
"flags": {}, "flags": {},
"order": 5, "order": 4,
"mode": 0, "mode": 0,
"outputs": [ "outputs": [
{ {
@ -1021,7 +921,7 @@
"1": 678 "1": 678
}, },
"flags": {}, "flags": {},
"order": 26, "order": 27,
"mode": 0, "mode": 0,
"inputs": [ "inputs": [
{ {
@ -1278,7 +1178,7 @@
"1": 314 "1": 314
}, },
"flags": {}, "flags": {},
"order": 6, "order": 5,
"mode": 0, "mode": 0,
"outputs": [ "outputs": [
{ {
@ -1319,7 +1219,7 @@
"1": 314 "1": 314
}, },
"flags": {}, "flags": {},
"order": 7, "order": 6,
"mode": 0, "mode": 0,
"outputs": [ "outputs": [
{ {
@ -1350,82 +1250,174 @@
] ]
}, },
{ {
"id": 157, "id": 3,
"type": "PreviewImage", "type": "KSampler",
"pos": [ "pos": [
-610, 757,
-240 831
], ],
"size": { "size": {
"0": 336, "0": 315,
"1": 246 "1": 446
}, },
"flags": {}, "flags": {},
"order": 28, "order": 31,
"mode": 2, "mode": 0,
"inputs": [ "inputs": [
{ {
"name": "images", "name": "model",
"type": "IMAGE", "type": "MODEL",
"link": 292 "link": 263
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 298,
"slot_index": 1
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 299
},
{
"name": "latent_image",
"type": "LATENT",
"link": 306
},
{
"name": "seed",
"type": "INT",
"link": 260,
"widget": {
"name": "seed"
}
} }
], ],
"title": "Preview Image | id:preprocessor_output_2", "outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
78,
278
],
"slot_index": 0
}
],
"title": "KSampler | id:sampler",
"properties": { "properties": {
"Node name for S&R": "PreviewImage" "Node name for S&R": "KSampler"
} },
"widgets_values": [
109789101278740,
"randomize",
20,
7,
"euler_ancestral",
"karras",
0.71
]
}, },
{ {
"id": 156, "id": 12,
"type": "PreviewImage", "type": "SaveImage",
"pos": [ "pos": [
-860, 3162,
-240 1131
], ],
"size": { "size": {
"0": 336, "0": 407.53717041015625,
"1": 246 "1": 468.13226318359375
}, },
"flags": {}, "flags": {},
"order": 27, "order": 37,
"mode": 2, "mode": 0,
"inputs": [ "inputs": [
{ {
"name": "images", "name": "images",
"type": "IMAGE", "type": "IMAGE",
"link": 291 "link": 17
} }
], ],
"title": "Preview Image | id:preprocessor_output_1", "title": "Save Image | id:hires_output",
"properties": { "properties": {},
"Node name for S&R": "PreviewImage" "widgets_values": [
} "ComfyUI"
]
}, },
{ {
"id": 158, "id": 141,
"type": "PreviewImage", "type": "APS_Seed",
"pos": [ "pos": [
-370, 359,
-240 532
], ],
"size": { "size": {
"0": 336, "0": 361.20001220703125,
"1": 246 "1": 82
}, },
"flags": {}, "flags": {},
"order": 29, "order": 7,
"mode": 2, "mode": 0,
"inputs": [ "outputs": [
{ {
"name": "images", "name": "s",
"type": "IMAGE", "type": "INT",
"link": 293 "links": [
259,
260
],
"shape": 3,
"slot_index": 0
} }
], ],
"title": "Preview Image | id:preprocessor_output_3", "title": "Auto-Photoshop-SD Seed | id:first_pass_seed",
"properties": { "properties": {
"Node name for S&R": "PreviewImage" "Node name for S&R": "APS_Seed"
} },
"widgets_values": [
519416762507340,
"fixed"
]
},
{
"id": 121,
"type": "Reroute",
"pos": [
2069,
410
],
"size": [
90.4,
26
],
"flags": {},
"order": 21,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 290
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
305
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
},
"color": "#223",
"bgcolor": "#335"
}, },
{ {
"id": 135, "id": 135,
@ -1530,53 +1522,29 @@
"original", "original",
512, 512,
768, 768,
771262702963796, 933689295201272,
"randomize" "randomize"
] ]
}, },
{ {
"id": 3, "id": 160,
"type": "KSampler", "type": "RepeatLatentBatch",
"pos": [ "pos": [
757, 1752,
831 517
], ],
"size": { "size": {
"0": 315, "0": 315,
"1": 446 "1": 58
}, },
"flags": {}, "flags": {},
"order": 30, "order": 26,
"mode": 0, "mode": 0,
"inputs": [ "inputs": [
{ {
"name": "model", "name": "samples",
"type": "MODEL",
"link": 263
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 298,
"slot_index": 1
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 299
},
{
"name": "latent_image",
"type": "LATENT", "type": "LATENT",
"link": 217 "link": 305
},
{
"name": "seed",
"type": "INT",
"link": 260,
"widget": {
"name": "seed"
}
} }
], ],
"outputs": [ "outputs": [
@ -1584,25 +1552,97 @@
"name": "LATENT", "name": "LATENT",
"type": "LATENT", "type": "LATENT",
"links": [ "links": [
78, 306
278
], ],
"shape": 3,
"slot_index": 0 "slot_index": 0
} }
], ],
"title": "KSampler | id:sampler", "title": "Repeat Latent Batch | id:latent_batch",
"properties": { "properties": {
"Node name for S&R": "KSampler" "Node name for S&R": "RepeatLatentBatch"
}, },
"widgets_values": [ "widgets_values": [
574883933962509, 1
"randomize",
20,
7,
"euler_ancestral",
"karras",
0.71
] ]
},
{
"id": 157,
"type": "PreviewImage",
"pos": [
-610,
-240
],
"size": {
"0": 336,
"1": 246
},
"flags": {},
"order": 29,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 292
}
],
"title": "Preview Image | id:preprocessor_output_2",
"properties": {
"Node name for S&R": "PreviewImage"
}
},
{
"id": 158,
"type": "PreviewImage",
"pos": [
-370,
-240
],
"size": {
"0": 336,
"1": 246
},
"flags": {},
"order": 30,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 293
}
],
"title": "Preview Image | id:preprocessor_output_3",
"properties": {
"Node name for S&R": "PreviewImage"
}
},
{
"id": 156,
"type": "PreviewImage",
"pos": [
-860,
-240
],
"size": {
"0": 336,
"1": 246
},
"flags": {},
"order": 28,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 291
}
],
"title": "Preview Image | id:preprocessor_output_1",
"properties": {
"Node name for S&R": "PreviewImage"
}
} }
], ],
"links": [ "links": [
@ -1798,14 +1838,6 @@
0, 0,
"*" "*"
], ],
[
217,
121,
0,
3,
3,
"LATENT"
],
[ [
247, 247,
115, 115,
@ -2021,6 +2053,22 @@
159, 159,
3, 3,
"IMAGE" "IMAGE"
],
[
305,
121,
0,
160,
0,
"LATENT"
],
[
306,
160,
0,
3,
3,
"LATENT"
] ]
], ],
"groups": [ "groups": [

File diff suppressed because it is too large Load Diff

View File

@ -4,8 +4,8 @@ import txt2img_api from './txt2img_api_v0.0.6.json'
import img2img from './img2img_workflow_v0.0.6.json' import img2img from './img2img_workflow_v0.0.6.json'
import img2img_api from './img2img_api_v0.0.6.json' import img2img_api from './img2img_api_v0.0.6.json'
import inpaint from './inpaint_workflow_v0.0.10.json' import inpaint from './inpaint_workflow.json'
import inpaint_api from './inpaint_api_v0.0.10.json' import inpaint_api from './inpaint_api.json'
import vae_settings from '../settings/vae' import vae_settings from '../settings/vae'
import sd_tab_util from '../sd_tab/util' import sd_tab_util from '../sd_tab/util'
@ -196,7 +196,7 @@ const inpaint_map: Record<string, any> = {
vae: 'vae.vae_name', vae: 'vae.vae_name',
width: 'width.Value', width: 'width.Value',
height: 'height.Value', height: 'height.Value',
// batch_size: 'latent_batch.amount', batch_size: 'latent_batch.amount',
// prompt: 'positive_prompt.text', // prompt: 'positive_prompt.text',
prompt: 'multi_loras_positive_prompt.prompt', prompt: 'multi_loras_positive_prompt.prompt',
negative_prompt: 'multi_loras_negative_prompt.prompt', negative_prompt: 'multi_loras_negative_prompt.prompt',