This ComfyUI workflow implements the inference methodology developed by AmericanPresidentJimmyCarter for optimized LoRA-augmented image generation using the FLUX.1 dev model. It uses two KSamplers to split the inference process, applying different CFG scales at distinct timesteps.
This is currently the best way to use AndroFlux.
Use the all-in-one Flux checkpoint in this workflow, or just copy and paste the two KSamplers into your own workflow.
Key Methodology:
Dual KSampler Configuration:
Initial KSampler (Timesteps 0-2):
CFG: 1.0 (disabled)
Steps: 3
Denoise: 1.00
VAE Decode: False
Refinement KSampler (Timesteps 3-30):
CFG: 3.0
Steps: 27
Denoise: 0.93 (adjust based on total steps)
VAE Decode: True
Insights:
Inference Optimization: This setup mimics the CFG adjustment strategy in Jimmy's
flux_lora_cfg.py. It starts with a neutral CFG to establish the image foundation, then applies stronger guidance to refine details and enhance prompt adherence.FP8 Quantized Checkpoint: The workflow uses the FP8 quantized version of FLUX.1 [dev], which integrates the VAE and text encoders into a single file. This all-in-one model (flux1-dev-fp8.safetensors) is more convenient but comes with a quality trade-off due to quantization.
Differences from Previous Workflows:
Unified Checkpoint: Unlike my previous workflows that used separate files for model components, this version employs a single, integrated checkpoint. While more convenient, it's important to note that this FP8 version may have slightly lower quality compared to the original non-quantized files.
Dynamic CFG Strategy: The dual KSampler approach allows for more nuanced control over the generation process, directly implementing Jimmy's findings on optimal CFG timing for Flux LoRAs.
For more information on Flux workflows in ComfyUI, refer to the official ComfyUI Flux documentation.
Description
Initial version with 2 timesteps
FAQ
Comments (4)
Works pretty good but will say there are some things that can be improved:
First, the Foooocus sampler node is largely unnecessary and less easy to control when compared to the KSampler Advanced node. It also seems to produce marginally worse quality images by comparison.
Second, adding a third sampler with a CFG of 1 after the second sampler that starts at step 20 seems to not only speed up generation times, but also seems to produce better quality results.
Lastly, the positive conditioning should be plugged directly into the second sampler without the FLUX guidance node, as doing so produces better quality images at seemingly any guidance setting. It also allows for higher guidance to be set without the image getting screwed up.
Awesome findings! Thank you so much for sharing these tips, I really appreciate it. I'm gonna test it out and update the workflow :) thanks again
This guy flux.
Thanks for thie tip
@markury Have you tried it yet? I tried making a 3-step sampler setup myself following this tip but it turned out like crap, and the current workflow brings me about 50 minutes per image on a RTX 3070 :(


