Organize optimized workflows by reusable type
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
# Flux.2 Klein — optimized I2I
|
||||
|
||||
Converts any supplied reference image into a photorealistic image of the same subject. The prompt is intentionally generic: identity, pose, clothing, accessories, colors, proportions, composition, and framing are inferred from the reference image rather than hard-coded.
|
||||
|
||||
## Tested baseline
|
||||
|
||||
- Reference input: `character_reference.png`
|
||||
- Model: `flux-2-klein-9b-fp8mixed.safetensors`
|
||||
- Text encoder: `qwen_3_8b_fp8mixed.safetensors` (`flux2`)
|
||||
- VAE: `full_encoder_small_decoder.safetensors`
|
||||
- Sampler: Euler
|
||||
- Steps: 4
|
||||
- CFG: 1.0
|
||||
- Seed: `20260921`
|
||||
- Measured runtime: approximately 89 seconds on the RTX 3070
|
||||
|
||||
Files:
|
||||
|
||||
- `workflow.json` — API-format prompt.
|
||||
- `ui-workflow.json` — native ComfyUI web-editor workflow.
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"id":"flux2klein-character-edit-ui","revision":0,"last_node_id":125,"last_link_id":24,
|
||||
"nodes":[
|
||||
{"id":1,"type":"LoadImage","pos":[-900,500],"size":[320,420],"flags":{},"order":0,"mode":0,"inputs":[],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[1]}],"properties":{"Node name for S&R":"LoadImage"},"widgets_values":["character_reference.png","image"]},
|
||||
{"id":70,"type":"UNETLoader","pos":[-500,100],"size":[370,110],"flags":{},"order":1,"mode":0,"inputs":[],"outputs":[{"name":"MODEL","type":"MODEL","links":[2]}],"properties":{"Node name for S&R":"UNETLoader"},"widgets_values":["flux-2-klein-9b-fp8mixed.safetensors","default"]},
|
||||
{"id":71,"type":"CLIPLoader","pos":[-500,280],"size":[370,150],"flags":{},"order":2,"mode":0,"inputs":[],"outputs":[{"name":"CLIP","type":"CLIP","links":[3]}],"properties":{"Node name for S&R":"CLIPLoader"},"widgets_values":["qwen_3_8b_fp8mixed.safetensors","flux2","default"]},
|
||||
{"id":72,"type":"VAELoader","pos":[-500,500],"size":[370,110],"flags":{},"order":3,"mode":0,"inputs":[],"outputs":[{"name":"VAE","type":"VAE","links":[4,5]}],"properties":{"Node name for S&R":"VAELoader"},"widgets_values":["full_encoder_small_decoder.safetensors"]},
|
||||
{"id":80,"type":"ImageScaleToTotalPixels","pos":[-500,720],"size":[270,140],"flags":{},"order":4,"mode":0,"inputs":[{"name":"image","type":"IMAGE","link":1}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[6,7]}],"properties":{"Node name for S&R":"ImageScaleToTotalPixels"},"widgets_values":["nearest-exact",1.0,1]},
|
||||
{"id":99,"type":"GetImageSize","pos":[-100,720],"size":[230,120],"flags":{},"order":5,"mode":0,"inputs":[{"name":"image","type":"IMAGE","link":7}],"outputs":[{"name":"width","type":"INT","links":[8,9]},{"name":"height","type":"INT","links":[10,11]}],"properties":{"Node name for S&R":"GetImageSize"},"widgets_values":[]},
|
||||
{"id":124,"type":"VAEEncode","pos":[-100,500],"size":[230,100],"flags":{},"order":6,"mode":0,"inputs":[{"name":"pixels","type":"IMAGE","link":6},{"name":"vae","type":"VAE","link":4}],"outputs":[{"name":"LATENT","type":"LATENT","links":[12,13]}],"properties":{"Node name for S&R":"VAEEncode"},"widgets_values":[]},
|
||||
{"id":74,"type":"CLIPTextEncode","pos":[0,40],"size":[650,400],"flags":{},"order":7,"mode":0,"inputs":[{"name":"clip","type":"CLIP","link":3}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[14]}],"properties":{"Node name for S&R":"CLIPTextEncode"},"widgets_values":["Transform the provided reference image into a photorealistic image of the same subject. Infer the subject's identity, facial features, skin tone, hairstyle, clothing, accessories, colors, pose, body proportions, hand positions, composition, and framing directly from the reference image. Preserve those inferred visual attributes faithfully while replacing the original rendering style with natural human anatomy, realistic skin and hair texture, physically accurate materials, believable fabric and surface detail, natural hands and fingers, cinematic soft daylight, realistic shadows, coherent perspective, premium editorial photography, 50mm lens, high dynamic range, neutral color grading, photorealistic, highly detailed, sharp subject, and a believable environment appropriate to the reference. Do not redesign, restyle, or substitute the subject. Do not add or remove important clothing, accessories, objects, or body features. Avoid cropping the subject."]},
|
||||
{"id":82,"type":"ConditioningZeroOut","pos":[720,500],"size":[220,80],"flags":{},"order":8,"mode":0,"inputs":[{"name":"conditioning","type":"CONDITIONING","link":14}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[15]}],"properties":{"Node name for S&R":"ConditioningZeroOut"},"widgets_values":[]},
|
||||
{"id":125,"type":"ReferenceLatent","pos":[720,100],"size":[230,100],"flags":{},"order":9,"mode":0,"inputs":[{"name":"conditioning","type":"CONDITIONING","link":14},{"name":"latent","type":"LATENT","link":12}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[16]}],"properties":{"Node name for S&R":"ReferenceLatent"},"widgets_values":[]},
|
||||
{"id":123,"type":"ReferenceLatent","pos":[720,650],"size":[230,100],"flags":{},"order":10,"mode":0,"inputs":[{"name":"conditioning","type":"CONDITIONING","link":15},{"name":"latent","type":"LATENT","link":13}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[17]}],"properties":{"Node name for S&R":"ReferenceLatent"},"widgets_values":[]},
|
||||
{"id":63,"type":"CFGGuider","pos":[1020,300],"size":[270,160],"flags":{},"order":11,"mode":0,"inputs":[{"name":"model","type":"MODEL","link":2},{"name":"positive","type":"CONDITIONING","link":16},{"name":"negative","type":"CONDITIONING","link":17}],"outputs":[{"name":"GUIDER","type":"GUIDER","links":[18]}],"properties":{"Node name for S&R":"CFGGuider"},"widgets_values":[1.0]},
|
||||
{"id":61,"type":"KSamplerSelect","pos":[1020,520],"size":[270,80],"flags":{},"order":12,"mode":0,"inputs":[],"outputs":[{"name":"SAMPLER","type":"SAMPLER","links":[19]}],"properties":{"Node name for S&R":"KSamplerSelect"},"widgets_values":["euler"]},
|
||||
{"id":62,"type":"Flux2Scheduler","pos":[1020,650],"size":[270,130],"flags":{},"order":13,"mode":0,"inputs":[{"name":"width","type":"INT","link":8},{"name":"height","type":"INT","link":10}],"outputs":[{"name":"SIGMAS","type":"SIGMAS","links":[20]}],"properties":{"Node name for S&R":"Flux2Scheduler"},"widgets_values":[4,1024,1024]},
|
||||
{"id":66,"type":"EmptyFlux2LatentImage","pos":[1320,650],"size":[270,130],"flags":{},"order":14,"mode":0,"inputs":[{"name":"width","type":"INT","link":9},{"name":"height","type":"INT","link":11}],"outputs":[{"name":"LATENT","type":"LATENT","links":[21]}],"properties":{"Node name for S&R":"EmptyFlux2LatentImage"},"widgets_values":[1024,1024,1]},
|
||||
{"id":73,"type":"RandomNoise","pos":[1320,260],"size":[270,100],"flags":{},"order":15,"mode":0,"inputs":[],"outputs":[{"name":"NOISE","type":"NOISE","links":[22]}],"properties":{"Node name for S&R":"RandomNoise"},"widgets_values":[20260921,"fixed"]},
|
||||
{"id":64,"type":"SamplerCustomAdvanced","pos":[1640,360],"size":[270,190],"flags":{},"order":16,"mode":0,"inputs":[{"name":"noise","type":"NOISE","link":22},{"name":"guider","type":"GUIDER","link":18},{"name":"sampler","type":"SAMPLER","link":19},{"name":"sigmas","type":"SIGMAS","link":20},{"name":"latent_image","type":"LATENT","link":21}],"outputs":[{"name":"output","type":"LATENT","links":[23]},{"name":"denoised_output","type":"LATENT","links":null}],"properties":{"Node name for S&R":"SamplerCustomAdvanced"},"widgets_values":[]},
|
||||
{"id":65,"type":"VAEDecode","pos":[1960,380],"size":[230,100],"flags":{},"order":17,"mode":0,"inputs":[{"name":"samples","type":"LATENT","link":23},{"name":"vae","type":"VAE","link":5}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[24]}],"properties":{"Node name for S&R":"VAEDecode"},"widgets_values":[]},
|
||||
{"id":9,"type":"SaveImage","pos":[2250,380],"size":[320,270],"flags":{},"order":18,"mode":0,"inputs":[{"name":"images","type":"IMAGE","link":24}],"outputs":[],"properties":{"Node name for S&R":"SaveImage"},"widgets_values":["fluxExperiments/imageEdit/character_photorealistic_preserve_s4_seed20260921"]}
|
||||
],
|
||||
"links":[[1,1,0,80,0,"IMAGE"],[2,70,0,63,0,"MODEL"],[3,71,0,74,0,"CLIP"],[4,72,0,124,1,"VAE"],[5,72,0,65,1,"VAE"],[6,80,0,124,0,"IMAGE"],[7,80,0,99,0,"IMAGE"],[8,99,0,62,0,"INT"],[9,99,0,66,0,"INT"],[10,99,1,62,1,"INT"],[11,99,1,66,1,"INT"],[12,124,0,125,1,"LATENT"],[13,124,0,123,1,"LATENT"],[14,74,0,82,0,"CONDITIONING"],[15,82,0,123,0,"CONDITIONING"],[16,125,0,63,1,"CONDITIONING"],[17,123,0,63,2,"CONDITIONING"],[18,63,0,64,1,"GUIDER"],[19,61,0,64,2,"SAMPLER"],[20,62,0,64,3,"SIGMAS"],[21,66,0,64,4,"LATENT"],[22,73,0,64,0,"NOISE"],[23,64,0,65,0,"LATENT"],[24,65,0,9,0,"IMAGE"]],
|
||||
"groups":[],"definitions":{"config":{}},"config":{},"extra":{"note":"Flux.2 Klein photorealistic character edit; Euler 4 steps CFG 1.0; seed 20260921"},"version":0.4
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"1": {"class_type":"LoadImage","inputs":{"image":"character_reference.png"}},
|
||||
"70": {"class_type":"UNETLoader","inputs":{"unet_name":"flux-2-klein-9b-fp8mixed.safetensors","weight_dtype":"default"}},
|
||||
"71": {"class_type":"CLIPLoader","inputs":{"clip_name":"qwen_3_8b_fp8mixed.safetensors","type":"flux2","device":"default"}},
|
||||
"72": {"class_type":"VAELoader","inputs":{"vae_name":"full_encoder_small_decoder.safetensors"}},
|
||||
"80": {"class_type":"ImageScaleToTotalPixels","inputs":{"image":["1",0],"upscale_method":"nearest-exact","megapixels":1.0,"resolution_steps":1}},
|
||||
"99": {"class_type":"GetImageSize","inputs":{"image":["80",0]}},
|
||||
"124": {"class_type":"VAEEncode","inputs":{"pixels":["80",0],"vae":["72",0]}},
|
||||
"74": {"class_type":"CLIPTextEncode","inputs":{"text":"Transform the provided reference image into a photorealistic image of the same subject. Infer the subject's identity, facial features, skin tone, hairstyle, clothing, accessories, colors, pose, body proportions, hand positions, composition, and framing directly from the reference image. Preserve those inferred visual attributes faithfully while replacing the original rendering style with natural human anatomy, realistic skin and hair texture, physically accurate materials, believable fabric and surface detail, natural hands and fingers, cinematic soft daylight, realistic shadows, coherent perspective, premium editorial photography, 50mm lens, high dynamic range, neutral color grading, photorealistic, highly detailed, sharp subject, and a believable environment appropriate to the reference. Do not redesign, restyle, or substitute the subject. Do not add or remove important clothing, accessories, objects, or body features. Avoid cropping the subject.","clip":["71",0]}},
|
||||
"82": {"class_type":"ConditioningZeroOut","inputs":{"conditioning":["74",0]}},
|
||||
"125": {"class_type":"ReferenceLatent","inputs":{"conditioning":["74",0],"latent":["124",0]}},
|
||||
"123": {"class_type":"ReferenceLatent","inputs":{"conditioning":["82",0],"latent":["124",0]}},
|
||||
"63": {"class_type":"CFGGuider","inputs":{"cfg":1.0,"model":["70",0],"positive":["125",0],"negative":["123",0]}},
|
||||
"61": {"class_type":"KSamplerSelect","inputs":{"sampler_name":"euler"}},
|
||||
"62": {"class_type":"Flux2Scheduler","inputs":{"steps":4,"width":["99",0],"height":["99",1]}},
|
||||
"66": {"class_type":"EmptyFlux2LatentImage","inputs":{"width":["99",0],"height":["99",1],"batch_size":1}},
|
||||
"73": {"class_type":"RandomNoise","inputs":{"noise_seed":20260921}},
|
||||
"64": {"class_type":"SamplerCustomAdvanced","inputs":{"noise":["73",0],"guider":["63",0],"sampler":["61",0],"sigmas":["62",0],"latent_image":["66",0]}},
|
||||
"65": {"class_type":"VAEDecode","inputs":{"samples":["64",0],"vae":["72",0]}},
|
||||
"9": {"class_type":"SaveImage","inputs":{"images":["65",0],"filename_prefix":"fluxExperiments/imageEdit/character_photorealistic_preserve_s4_seed20260921"}}
|
||||
}
|
||||
Reference in New Issue
Block a user