CivArchive
    Searge-SDXL: EVOLVED v4.3.2 - Optimized Workflow for ComfyUI - 2023-11-13 - txt2img, img2img, inpaint, revision, controlnet, loras, FreeU v1 & v2, ... - v4.1
    Preview 2367726
    Preview 2367720
    Preview 2367718
    Preview 2367723
    Preview 2367721
    Preview 2367724
    Preview 2367725
    Preview 2367728
    Preview 2367729
    Preview 2367727

    Searge-SDXL: EVOLVED v4.3.2

    Version 4.x is here.

    I made a convenient install script that can install the extension and workflow, the python dependencies, and it also offer the option to download the required models.

    Please read the install instructions in the readme file for more information about the install script and how to use it.

    Description

    Some custom nodes for ComfyUI and an easy to use SDXL 1.0 workflow. A detailed description can be found on the project repository site, here: Github Link

    Installing

    Detailed install instruction can be found here: Link to the readme file on Github

    Usage Notes

    The workflow is in the workflow folder, please load it from the JSON files to make sure you are using the latest versions of it.

    The images in the examples folder have workflows embedded.

    How to use this workflow

    Here is an amazing Youtube video that Nerdy Rodent made about version 3.4 of the workflow. Many things have changed in v4.0 but the basics still apply. And while you are watching it, don't forget to subscribe to the channel.

    Link to the Nerdy Rodent video

    Updates

    What's new in v4.3.2?

    This is a minor update to make the workflow and custom node extension compatible with the latest changes in ComfyUI.

    What's new in v4.3.1?

    This is a minor update to make the workflow and custom node extension compatible with the latest changes in ComfyUI.

    What's new in v4.3?

    This update added support for FreeU v2 in addition to FreeU v1.

    New Features

    • Support for FreeU v2 has been added and is included in the v4.3 workflow

    • Added more presets for FreeU and a selector to switch between v1 and v2

    • Updated the example images to embed the v4.3 workflow

    What's new in v4.2?

    This update contains bug fixes that address issues found after v4.0 was released.

    Bug Fixes

    • A recent change in ComfyUI conflicted with my implementation of inpainting, this is now fixed and inpainting should
      work again

    New Features

    • Support for FreeU has been added and is included in the v4.2 workflow

    • Note: the images in the example folder are still embedding v4.1 of the workflow, to use FreeU load the new
      workflow from the .json file in the workflow folder

    What's new in v4.1?

    This update contains bug fixes that address issues found after v4.0 was released.

    Bug Fixes

    • The high resolution latent detailer was not properly set up in the processing pipeline and did nothing

    • The debug printer node was broken - I didn't notice that because it was not connected in any of the v4.0 workflows

    • A bug related to generating with batch sizes larger than 1 has been fixed, it's now working properly

    Other Changes

    • The images in the examples folder have been updated to embed the v4.1 workflow

    What's new in v4.0?

    • A complete re-write of the custom node extension and the SDXL workflow

    • Highly optimized processing pipeline, now up to 20% faster than in older workflow versions

    • Support for Controlnet and Revision, up to 5 can be applied together

    • Multi-LoRA support with up to 5 LoRA's at once

    • Better Image Quality in many cases, some improvements to the SDXL sampler were made that can produce images
      with higher quality

    • Improved High Resolution modes that replace the old "Hi-Res Fix" and should generate better images

    • ... many more things, too many to mention them all here

    Description

    Bug Fixes

    • The high resolution latent detailer was not properly set up in the processing pipeline and did nothing

    • The debug printer node was broken - I didn't notice that because it was not connected in any of the v4.0 workflows

    • A bug related to generating with batch sizes larger than 1 has been fixed, it's now working properly

    Other Changes

    • The images in the examples folder have been updated to embed the v4.1 workflow

    FAQ

    Comments (23)

    ryanmisagonzalesSep 6, 2023
    CivitAI

    Can't get inpainting to work on v4.1, Searge. I did as instructed, loaded the image in the source image and masking boxes. Did a mask, and it outputs the same image. How can I get it to work?

    gemyerstSep 6, 2023
    CivitAI

    Hi Searge! Awesome workflow, I wanted to ask how to get the best results with controlnet turned on (I am using the intermediate script)? The outputs are great with it off, however once its turned on, the higher the strength the less realistic the image (but the more it resembles the canny of the input). Do you have recommended settings for using controlnet?

    halarioushandleSep 6, 2023
    CivitAI

    Ran the installer script, but having the following error: Error occurred when executing SeargeMagicBox: get_additional_models() takes 2 positional arguments but 3 were given

    SECoursesSep 7, 2023· 2 reactions
    CivitAI

    Nice workflow

    BooyaihSep 9, 2023
    CivitAI

    When I add another type of custom node to Comfyai for example - reactor node I can no longer use this one as every node goes red saying it's not installed. I have to delete the reactor folder from the custom node folder for it to work again. Is there any way around this?

    byttledSep 11, 2023
    CivitAI

    how should i use this with a "stability matrix" ComfyUI install? not sure if portable or whatever.

    TheGreatOne321Sep 11, 2023
    CivitAI

    Am I the only one who's VRAM gets maxed out with the latest v4 workflows? On v3 of the workflow I could easily do 1024x1024 with 2x hires in around 65 seconds using around 14-16 gigs of VRAM.

    With the latest workflows, it takes me at minimum 120 seconds to do a 1024x1024 with 1.25x hires, and doing so results in my 24 gigs of VRAM being maxed out and overflowing into shared memory.

    The images are undoubtedly higher quality, but I don't know if it's higher enough to justify waiting twice as long.

    hio_kosoSep 11, 2023
    CivitAI

    The workflow is really fast and amazing with SDXL checkpoint. But whenever I attempt to run an SD checkpoint, I receive an error message, whether I have made a mistake or i am simply dumb (I am dumb). Tried to reinstall the XDSL UI but still the same. I don't have the portable comfy, so I copied with git and downloaded/copied the recommend and required file in the right folder, run the python -m pip install opencv-python command but always the same error.

    https://i.ibb.co/rdS4c15/Capture-d-cran-2023-09-11-121750.png

    iseedeadpeople88Sep 12, 2023· 1 reaction
    CivitAI

    Are inpainting and img2img working properly? No matter what combination of settings I try on 4.1 starting from the default settings in the workflow JSON, I just get a version of the original sketch back out where the inpainted area appears to be inferred from the image, not conditioned on the prompt.


    To reproduce:
    • Pull Searge and Comfy repos to make sure they're up to date
    • Open Searge-SDXL-Reborn-v4_1-hq.json
    • Change Operating Mode to 'in-painting' or 'image-to-image'
    • Open Inpainting Mask in Mask Editor and remove some portion of the image
    • Confirm all model settings point to corresponding files on disk
    • Change image size preset to 1:1 (1024x1024)
    • Queue Prompt

    Expected result:
    I'd expect the inpainted area to be an image of the scene described in the prompt(s)

    Result:

    The inpainted area is a continuation of the source image and ignores the prompts. For example - mask out the girl's face in the default sketch and it will draw her face back in with some deviation from the original.

    RandalphiusSep 14, 2023
    CivitAI

    Thanks, great workflow! I'm still overwhelmed with all the possibilities, nevertheless looking forward to new updates and implementations.

    1083292Sep 15, 2023
    CivitAI

    Hi,

    would it be possible to get an optional workflow with the PerpNeg sampler integrated? The tradeoff here is nearly double generation times for better prompt adherence

    https://github.com/bvhari/ComfyUI_PerpNeg

    DarkCoverSep 15, 2023
    CivitAI

    Hello sir, Really loved your workflow. I had like to request. I don't have a huge vram so I usually upscale my photos using Ultimate SD tile upscale and I use SD 1.5 models. If I was to incorporate that kind of workflow into your workflow for upscaling. How can I achieve it? And I am really sorry if this is not right of me to ask to make modifications to your workflow.

    bulletti515Sep 16, 2023
    CivitAI

    How exactly does the latent detailer process work? I have zero programming experience, so I have only deduced that it upscales the sampled latent by 2x, runs 5 steps, rescales to original, and runs another 10 steps.

    I can't decipher the part of the code that sets the step counts:
    start_step=int(100 - percent * 2), last_step=int(100 - percent)

    I'm trying to deseargify your workflow to better understand SD, your WF, and relevant systems.

    ryanmisagonzalesSep 16, 2023
    CivitAI

    Hi Searge. Where or how should I find or enter this code? --disable-smart-memory

    AnubajaSep 19, 2023· 2 reactions
    CivitAI

    Hi Searge,

    Love the work you have done.... I can achieve wayyy better images using this workflow. the fact i can create my own "workspaces" by moving everything around to suit myself to what ever im doing is great.... so great. I save my basic img gen workspace in a png and then if i want controlnet i get my controlnet png and drag that in.... amazing work!!!! Comfy was a little overwhelming coming from A1111 and i was at a loss as to how to setup all the different things to work correctly (controlnet for example).

    The only thing i miss is a "testing station". Adding a X/Y plot area would be amazing (somehow having a X/Y/Z would be even better ;) )

    Keep up the good work man. This must be quite the project for you, especially with everything always changing. Most of us are benefiting for free. I dont know your situation but please dont worry about any pressure from the community (like above), try not to burnout doing this work.

    cloudreadypcSep 21, 2023
    CivitAI

    Sorry to inform you that mine crashes in sampling stage.

    custom_sdxl_ksampler.py, line 202

    if refiner_detail_boost > 0.0

    TypeError: '>' not supported between instances of 'NoneType' and 'float'

    I've all models in place. Thanks a lot.

    JohanllzSep 23, 2023· 2 reactions
    CivitAI

    Can anybody help? the past version worked fine (3.x), but the new 4.1 is not working and i'm getting an error, I updated searge with the new script. The error says:

    "Error occurred when executing SeargeMagicBox: Error while deserializing header: MetadataIncompleteBuffer File ":\xxxxx\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\ComfyUI\execution.py", line 152, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "F:\xxxxx\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\ComfyUI\execution.py", line 82, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) File ":\xxxxx\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\ComfyUI\execution.py", line 75, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) File "F:\xxxxx\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\ComfyUI\custom_nodes\SeargeSDXL\modules\magic_box.py", line 269, in process (data, stage_result) = self.run_stage(stage, data, stage_input) File ":\xxxxx\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\ComfyUI\custom_nodes\SeargeSDXL\modules\magic_box.py", line 248, in run_stage (data, stage_result) = stage_processor.process(data, stage_input) File ":\xxxxx\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\ComfyUI\custom_nodes\SeargeSDXL\modules\stage_load_checkpoints.py", line 211, in process clip_vision_model = NodeWrapper.clipvision_loader.load_clip(clipvision_name)[0] File ":\xxxxx\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\ComfyUI\nodes.py", line 757, in load_clip clip_vision = comfy.clip_vision.load(clip_path) File ":\xxxxx\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\ComfyUI\comfy\clip_vision.py", line 110, in load sd = load_torch_file(ckpt_path) File ":\xxxxx\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\ComfyUI\comfy\utils.py", line 13, in load_torch_file sd = safetensors.torch.load_file(ckpt, device=device.type) File ":\xxxxx\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\python_embeded\lib\site-packages\safetensors\torch.py", line 309, in load_file with safe_open(filename, framework="pt", device=device) as f:"

    drangelosSep 23, 2023
    CivitAI

    This is a great workflow. Thank you for creating it. One question: is there a way to do live previews of the steps of the image generation in ComfyUI (meaning to see what it looks like in step 12, 15, etc.)? I suspect that in some cases the earlier steps look better- and it'd help in assessing whether to limit the steps in which the controlnets are applied. Right now it is a bit of blind guessing.

    TeralaSep 27, 2023
    CivitAI

    first: while 4.0 works great without any issues at all, 4.1 always stuck's at highres detailer stage, takes ages and then -literally- crushes my mashine ;)

    second: sdxl has two different types to prompt ... i think clip l and clip g or something was it,

    but ... what exactly is "main prompt" and "secondary prompt" in this workflow refering to?

    arteangelusSep 28, 2023· 2 reactions
    CivitAI

    I installed it twice from zero but I still get this error;

    Error occurred when executing SeargeMagicBox: Error while deserializing header: MetadataIncompleteBuffer File "C:\Users\...\Desktop\COMFY\ComfyUI\execution.py", line 152, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "C:\Users\...\Desktop\COMFY\ComfyUI\execution.py", line 82, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) File "C:\Users\...\Desktop\COMFY\ComfyUI\execution.py", line 75, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) File "C:\Users\...\Desktop\COMFY\ComfyUI\custom_nodes\SeargeSDXL\modules\magic_box.py", line 269, in process (data, stage_result) = self.run_stage(stage, data, stage_input) File "C:\Users\...\Desktop\COMFY\ComfyUI\custom_nodes\SeargeSDXL\modules\magic_box.py", line 248, in run_stage (data, stage_result) = stage_processor.process(data, stage_input) File "C:\Users\...\Desktop\COMFY\ComfyUI\custom_nodes\SeargeSDXL\modules\stage_load_checkpoints.py", line 95, in process refiner_checkpoint = NodeWrapper.checkpoint_loader.load_checkpoint(refiner_name) File "C:\Users\...\Desktop\COMFY\ComfyUI\nodes.py", line 476, in load_checkpoint out = comfy.sd.load_checkpoint_guess_config(ckpt_path, output_vae=True, output_clip=True, embedding_directory=folder_paths.get_folder_paths("embeddings")) File "C:\Users\...\Desktop\COMFY\ComfyUI\comfy\sd.py", line 396, in load_checkpoint_guess_config sd = comfy.utils.load_torch_file(ckpt_path) File "C:\Users\...\Desktop\COMFY\ComfyUI\comfy\utils.py", line 13, in load_torch_file sd = safetensors.torch.load_file(ckpt, device=device.type) File "C:\Users\...\Desktop\COMFY\python_embeded\lib\site-packages\safetensors\torch.py", line 309, in load_file with safe_open(filename, framework="pt", device=device) as f:

    Help please

    LDWorksDavidSep 29, 2023
    CivitAI

    Im a bit late joining the ComfyUI's side but wanted to ask something. Is there any workflow that allows me:
    - Generate a SDXL output AND automatically use this output via Img2img in a custom SD 1.5 I want, with a custom upscaler and custom VAE? All I see is generate SDXL output and change mode to img2img and load the image but I'd want to do that automatically for running batches with a custom SD 1.5 model in the img2img and a sharper VAE for that. IS this possible?

    dongmeiteng2008878Oct 2, 2023
    CivitAI

    I am running on Linux, the installation has failed many times, the node has not been loaded out, please ask the author has any solution, thank you very much

    modzhahead158Oct 3, 2023
    CivitAI

    when I try to do an inpaint, the error below occurs, regardless of the workflow settings:

    Error occurred when executing SeargeMagicBox: too many values to unpack (expected 2)

    File "C:\ComfyUI_windows_portable\ComfyUI\execution.py", line 152, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "C:\ComfyUI_windows_portable\ComfyUI\execution.py", line 82, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) File "C:\ComfyUI_windows_portable\ComfyUI\execution.py", line 75, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) File "C:\ComfyUI_windows_portable\ComfyUI\custom_nodes\SeargeSDXL\modules\magic_box.py", line 269, in process (data, stage_result) = self.run_stage(stage, data, stage_input) File "C:\ComfyUI_windows_portable\ComfyUI\custom_nodes\SeargeSDXL\modules\magic_box.py", line 248, in run_stage (data, stage_result) = stage_processor.process(data, stage_input) File "C:\ComfyUI_windows_portable\ComfyUI\custom_nodes\SeargeSDXL\modules\stage_latent_inputs.py", line 127, in process (width, height) = get_mask_size(mask) File "C:\ComfyUI_windows_portable\ComfyUI\custom_nodes\SeargeSDXL\modules\utils.py", line 51, in get_mask_size (height, width) = mask.shape

    Workflows
    SDXL 1.0

    Details

    Downloads
    2,796
    Platform
    CivitAI
    Platform Status
    Available
    Created
    9/5/2023
    Updated
    6/23/2026
    Deleted
    -

    Files

    seargeSDXLEVOLVEDV432OptimizedWorkflowForComfyui_v41.zip