Okay lads, this thing tries to remove blur, especially the light one given by Flux models, DOES NOT work on hypermegablurried images, huge artifacts/noise or stuff with a strong strong bokeh effect.
You prolly want to rebuild the image from zero, and it can't understand what it's looking at if it's just a splat of colors, rite?
TESTED ON:
flux kontext dev Q8/ flux kontext nunchaku
1-2 lora strenght, but feel free to experiment
2.5-3.5 CFG, but again didn't test much
20 steps euler simple seem decent, also tested with nunchaku plus turbo lora at 8 steps, worked unexpectedly well!
-Sometimes- describing what you're deblurring helps, meaning you can prompt:
" deblur, hand "
When the blur is quite strong it might give weird results, but a bit crispier, so maybe with a later upscale you can get something decent out of it, ye?
A hint: if your first deblur worked but it's still a bit blurry, don't just crank up the strenght, copy the new image, and rerun with the new image as a starting point!
BUZZZZZZZZZZZ if you use it and like it, thank you!
Description
Okay lads, this thing tries to remove blur, especially the light one given by Flux models, DOES NOT work on hypermegablurried images, huge artifacts/noise or stuff with a strong strong bokeh effect.
You prolly want to rebuild the image from zero, and it can't understand what it's looking at if it's just a splat of colors, rite?
TESTED ON:
flux kontext dev Q8
1-2 lora strenght, but feel free to experiment
2.5-3.5 CFG, but again didn't test much
20 steps euler simple seem decent
-Sometimes- describing what you're deblurring helps, meaning you can prompt:
" deblur, hand "
When the blur is quite strong it might give weird results, but a bit crispier, so maybe with a later upscale you can get something decent out of it, ye?
A hint: if your first deblur worked but it's still a bit blurry, don't just crank up the strenght, copy the new image, and rerun with the new image as a starting point!
BUZZZZZZZZZZZ if you use it and like it, thank you!
FAQ
Comments (26)
looks like it increases DOF as well.
Interesting! what values are you using to do that?
@heyheyheyheyhii Just looking at your sample images you can see that effect.
This is a great first step to unblurring messed up photos, it really brought back accurate details better than anything else I've tried so far.
Kontext needs a lot of these types of LoRA to better enable abilites that censorship in training mean only work very unreliably. One could argue the entire 'ordinary language' prompting system works very badly for a model like Kontext, when sometimes it follows a command and sometimes does not- even though it always has the ability to do so, and the command seems unambiguous.
Hi, amazing work on this LoRA! The quality is fantastic. I'm currently learning to train LoRAs myself. If you're willing to share, could you offer any insights into your training process or key parameters? Any tips would be greatly appreciated. Thank you for creating and sharing this!
hey! for this one specifically I used fal ai and just increased the steps to 1500 with roughly 30 images, it was good to go on the first attempt. Kontext training seems different than normal flux, it feels like the dataset is way more important than the settings themselves, it's basically a before/after manner
@heyheyheyheyhii Thanks for the info!
sadly dose not work with nunchaku model :\
Most of the Loras are created by using the main model as a starting point, to preserve consistency and compatibility. If nunchaku doesn't still support it there isn't much that can be done on my side. Just to make sure, did you use the specific Nunchaku Lora loader? Maybe they still have to add support for Kontext? I'm not sure about it though. Also consider that a Lora like this, that needs almost pixel perfect precision, might be "misunderstood" by the tricks used to speed up the workflow.
@heyheyheyheyhii
It doesn't seem to be an issue with Nunchaku itself — I’ve tested other Kontext models and they work fine with Nunchaku. However, when using this particular model, I get the following error:
KeyError: 'lora_unet_final_layer_adaLN_modulation_1.lora_down.weight'
@lenML ya i get the same error
@lenML thanks for the feedback, unfortunately I didn't dig deep enough into how nunchaku works, I'm not even sure if there could possibly be a way to create a specific version for it 🤔 because it doesn't seem to be just a pruned or merged model, it's more complicated than that as far as i can see...did you try the lora with the main or quantized non-nunchaku models? If so, does it work?
@heyheyheyheyhii ya the normal lora node work fine with your lora bust sadly i have a slow pc so the only way to run knotext using nunchaku , i'm not saying your lora is bad i already told everyone on my youtube channel and on my social media about you lora cuz it's awesome , just wanted to give you a feedback about nunchaku <3
@sherif_oneway thank you so much for sharing, I'll try to look into nunchaku a bit deeper cause I'm running Kontext on a 3090 and faster generation times would be helpful for me too, but I'm not gonna have much free time for a while, so can't promise anything yet!
Compatibility issue with ComfyUI-Nunchaku is documented: https://github.com/mit-han-lab/ComfyUI-nunchaku/issues/340
Created a HuggingFace repo to host the patch script and the patched version: https://huggingface.co/lym00/comfyui_nunchaku_lora_patch
@lym0 You are hero.
@lym0 <3 thanks so much <3
@lym0 @lym0 damn, thanks a lot for this! Is it ok for you if I post the model here as "v1.1_Nunchakufix_by_lym0"?
Hi @heyheyheyheyhii Sure, feel free to post it here. No need to include my name, you can give credit to akedia who proposed the patch and shared the original script on github.
https://github.com/mit-han-lab/ComfyUI-nunchaku/issues/340
DOESNT WORK
it does on most of my images, do you mean it doesn't deblur or the lora itself doesn't work?
When you said 2.5-3.5 CFG, you mean which one of this?:
https://i.imgur.com/FP4Megx.jpeg
Flux guidance, sorry for the misunderstanding, ksampler's CFG must be set to 1, because flux dev models don't accept negative prompts. So basically flux guidance is sort of replacing it :)
artifacts
can you give me more details? For me it's working great in every image. But as mentioned in the description, this is a "first-step" deblur, might require upscale or hires fixing afterwards





