Wednesday, August 12, 2026
ComfyUIResources

Ai Powered Photo Restoration using Flux Kontext Dev

13Jul
2025
Harmeet 14

Flux Kontext is versatile model that holds the power to photo editing like never before. As showcased in some of the past videos its super simple to setup locally and use with simple prompts. If you want to learn how to prompt I suggest you have a look at this post.

I had a go at restoring and re-colouring old and vintage photographs that have not stood the test of time, and the results were astounding. Within a few seconds to couple of minutes I could see the beautifully restored images produced by Flux Kontext.

Prompt

The prompt is not complex and studying the images I started describing what I wanted Flux Kontext to do and slowly built the below prompt over time. It works in most cases.

restore and colorize this photo, remove the stains, dust spots, noise, scratches and stripes from the image, fill in any ripped or torn sections, turning it into a high quality photograph

If you want to retain the black and white look of the image then I would specify that at the beginning and remove any reference to colorize or colourising the photo.

What you need

You need to download the below models and save them in the locations as shown below. If you ComfyUI is not up to date, please ensure you Update it to the latest version.

Diffusion model

VAE

Text encoder

Model Storage Location

📂 ComfyUI/
├── 📂 models/
│   ├── 📂 diffusion_models/
│   │   └── flux1-dev-kontext_fp8_scaled.safetensors or flux1-kontext-dev.safetensors
│   ├── 📂 vae/
│   │   └── ae.safetensor
│   └── 📂 text_encoders/
│       ├── clip_l.safetensors
│       └── t5xxl_fp16.safetensors or t5xxl_fp8_e4m3fn_scaled.safetensors

Once the models are installed, make sure you restart ComfyUI if was running while you were downloading the models.

Workflow

The workflow is based on the default workflow provided by the ComfyUI team, so if you updated ComfyUI as per above recommendation you should see that in the Templates. You can start to use the one called “Flux Kontext Dev (Grouped)

This grouped workflow combines a bunch of existing core nodes to create a custom Flux Kontext Image Edit grouped node. This can be used to easily stack and build the edit in your ComfyUI workflow.

Download Workflow

WWAA-Flux-Kontext-Photo-Restoration-v2.zip 6023 downloads
Download ZIP

I modified this workflow to create my own variation and as most of the people want the workflow I showed in my video I have provided it above. You can download it yourself for using with your own setup. I added a Image Stitch node that create a before and after side by side comparison and saves it as JPG.

Below you see two stages in action where the first stage does a restoration and then the second stage only colours the sweater the woman is wearing. If you don’t need the second stage you can bypass those nodes, if you do then plug the Image output of the first stage into the Edit Image of Image Stitch.

Workflow preview – download the workflow file via the download button above

The results are very good in most cases and produce some well restored images that will shave off hours of clone/stamp or adaptive/generative fill using Photoshop.

Here are a few samples that were produced straight out of this workflow with no further editing done. I hope you will try this out and be able to renew some beautiful memories for your loved ones.

I put together my workflow and detailed explanation in this video so if you want to check this out as well enjoy at your own leisure.

14 Comments

  1. I wasn’t able to purchase your workflow. At the payment step, it says ‘Your card has been declined.’ But I just bought a workflow from AIconomist on another website without any problem. Do you have your workflow available on any other site?

  2. Forgot to mention that I’m in Thailand. That might be the reason my card got declined? I don’t know.

  3. Thank you for your work. I am having an issue that confuses me. I have all the models you indicated and downloaded the workflow. I am fairly new to comfyui but I do not see a KSampler node in the work flow, yet when I run it I get the following message:

    “Failed to validate prompt for output 156:5:
    * KSampler 156:3:
    – Required input is missing: latent_image
    Output will be ignored
    Failed to validate prompt for output 142:5:
    * KSampler 142:3:
    – Required input is missing: latent_image
    Output will be ignored
    Failed to validate prompt for output 176:
    Output will be ignored
    Failed to validate prompt for output 182:
    Output will be ignored
    Failed to validate prompt for output 157:
    Output will be ignored
    invalid prompt: {‘type’: ‘prompt_outputs_failed_validation’, ‘message’: ‘Prompt outputs failed validation’, ‘details’: ”, ‘extra_info’: {}}”

  4. Great work! I setup everything as told. But when I hit run I get the errormessage that KSampler is missing the Latent input. Could you help me please?

  5. I have an error when run this workflow – please help – thx

    # ComfyUI Error Report
    ## Error Details
    – **Node ID:** N/A
    – **Node Type:** N/A
    – **Exception Type:** Prompt execution failed
    – **Exception Message:** Prompt outputs failed validation:
    KSampler:
    – Required input is missing: latent_image
    KSampler:
    – Required input is missing: latent_image

      1. THX

        The ModelPfad is incorrect

        Text encoder
        clip_l.safetensors
        t5xxl_fp16.safetensors or t5xxl_fp8_e4m3fn_scaled.safetensors

        This must :
        Clip
        clip_l.safetensors
        t5xxl_fp16.safetensors or t5xxl_fp8_e4m3fn_scaled.safetensors

        So it’s work for me

  6. Do you have a tip on where I can find the formatting for the text (bold, italics, indentation, links, etc.) for the NOTE node?

    THX

  7. Why does it keep changing the faces for me?

    They no longer match the original.

    I copied the workflow exactly. What’s going wrong?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.