> For the complete documentation index, see [llms.txt](https://scade.gitbook.io/scade-knowledge-base/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://scade.gitbook.io/scade-knowledge-base/flow-examples/5-minute-challenge-upscale-and-colorize-photos.md).

# 5 minute challenge: upscale and colorize photos

Say, you have low-res black and white images. Let's breathe life into them

1. Go to <https://app.scade.pro/flow/> and click the **New flow** button and then choose **Start with blank**

<figure><img src="https://2793209830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNCrOWKpBlXYnNB9SFIzb%2Fuploads%2FVddb2yAXVEWGGNSZ0740%2Fimage.png?alt=media&amp;token=a9c2df05-3038-4931-be2b-efcd07815ebf" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2793209830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNCrOWKpBlXYnNB9SFIzb%2Fuploads%2F267lZuY6MJtt6X2k41gu%2Fimage.png?alt=media&amp;token=c181f052-4c10-417a-82b5-ec507ba8cb52" alt=""><figcaption></figcaption></figure>

2. There will already be **Start** end **End** nodes on the canvas. Place everything else between them. Go to the **Settings** of the **Start Node Form** and click **Configure fields** to start adding your data

<figure><img src="https://2793209830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNCrOWKpBlXYnNB9SFIzb%2Fuploads%2FMJKGrxMqaFNI7XDusbEQ%2Fimage.png?alt=media&amp;token=5ad79baf-7202-47b4-9a67-b45c9c09fbcf" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2793209830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNCrOWKpBlXYnNB9SFIzb%2Fuploads%2FDSk3aZDnn2j7pncTF5YK%2Fimage.png?alt=media&amp;token=61a9e24e-1e52-4323-981f-c1caa8855127" alt=""><figcaption></figcaption></figure>

3. Add one field, call it, for example, `image`, and change the input type to `String/URI` to make it suitable for storing files. Click **Save**

<figure><img src="https://2793209830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNCrOWKpBlXYnNB9SFIzb%2Fuploads%2F2beN7E21jSiICWRNQl1h%2FScreenshot%202024-04-09%20at%2014.07.04.png?alt=media&amp;token=2ec85450-4843-4e07-9045-ede9b3231e8e" alt=""><figcaption></figcaption></figure>

4. Upload your black and white image. You can get our example file [here](https://pixy.fra1.cdn.digitaloceanspaces.com/uploaded-images/2024-04-09/99024a785040aab9f32ef452286ea158dfe22d7a599e542ba371fbb8cb4e.png)

<figure><img src="https://2793209830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNCrOWKpBlXYnNB9SFIzb%2Fuploads%2FjXR2GYqaVXBT5fqP7e2X%2FScreenshot%202024-04-09%20at%2014.42.32.png?alt=media&amp;token=dcd35cc8-a9c2-44e6-a804-53cd6d1a8d49" alt=""><figcaption></figcaption></figure>

5. After uploading the file, execute the node. This action will generate a named output, and we need it to move further

<figure><img src="https://2793209830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNCrOWKpBlXYnNB9SFIzb%2Fuploads%2FUE9WDQeaorbaq1yEOolr%2FScreenshot%202024-04-09%20at%2014.46.11.png?alt=media&amp;token=f7d806c4-f04e-45c2-9bf0-5d5393c9d36f" alt=""><figcaption></figcaption></figure>

6. There is a tried and tested model that restores and enhances old photos — **GfpGAN**. Use the search panel on the left: type `gfpgan` and drag the model to your workspace. \
   \
   However, if you're feeling adventurous, you can try any other similar models: just type in something akin to "restore", "upscale" or "enhance" and pick whatever you like

<figure><img src="https://2793209830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNCrOWKpBlXYnNB9SFIzb%2Fuploads%2FU6srZIRi8QpDAqhX477d%2FScreenshot%202024-04-09%20at%2014.53.28.png?alt=media&amp;token=716a3d2e-a564-45e0-9a15-faeade325146" alt=""><figcaption></figcaption></figure>

7. Connect the `image` output of the **Start** node with the `img` input of the **GfpGAN** and execute the latter node

<figure><img src="https://2793209830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNCrOWKpBlXYnNB9SFIzb%2Fuploads%2FfVpJudPECbrPAtYmrMZ7%2FScreenshot%202024-04-09%20at%2014.57.35.png?alt=media&amp;token=c43f6edd-800d-4e59-8317-97a06ccc97e3" alt=""><figcaption></figcaption></figure>

8. We can see that both resolution and quality of our image have increased greatly. Let's add some colors.\
   \
   Use the search panel again, type, for example, `colorization`. Let's try the **Bigcolor** model, drag it to your workspace

<figure><img src="https://2793209830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNCrOWKpBlXYnNB9SFIzb%2Fuploads%2FgajJ2Lb20CzYqfUriShh%2FScreenshot%202024-04-09%20at%2015.05.58.png?alt=media&amp;token=6abf34f8-df67-4324-9a8d-178c56092210" alt=""><figcaption></figcaption></figure>

9. You know the drill: connect the **GfpGAN's** output with the **Bigcolor's** `image` input and execute the latter node

<figure><img src="https://2793209830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNCrOWKpBlXYnNB9SFIzb%2Fuploads%2FAMzJmhvlGgbLVXg3FaB1%2FScreenshot%202024-04-09%20at%2015.07.24.png?alt=media&amp;token=c2ae588e-0e60-4744-a0fe-6cd3d105887a" alt=""><figcaption></figcaption></figure>

10. Now we have several colorized images in the **Bigcolor** node. You can download them using the control that appears when you hover over the image. Don't forget to save files that you like!

<figure><img src="https://2793209830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNCrOWKpBlXYnNB9SFIzb%2Fuploads%2FD9lBxulQH3xNLSaA9ONq%2FScreenshot%202024-04-09%20at%2015.14.28.png?alt=media&amp;token=353c8837-9aaf-452f-9d73-63f0dcf9fb22" alt=""><figcaption></figcaption></figure>

11. Our **End** node is left unused. It's a good practice to have the **Start** and **End** nodes if you want to execute your workflow via API calls, but for now let's simply remove it. Click on the node and hit delete or backspace on your keyboard

<figure><img src="https://2793209830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNCrOWKpBlXYnNB9SFIzb%2Fuploads%2FX9m5WNt5wo8wMhg0EXN4%2FScreenshot%202024-04-09%20at%2015.22.02.png?alt=media&amp;token=cd79f1df-59d0-4b8b-8f95-ffbd783d0437" alt=""><figcaption></figcaption></figure>

12. Once you have your flow built, you don't need to run nodes one by one anymore. Change data in your Start node and hit the Play button on the top panel to execute the entire workflow. Have fun!

<figure><img src="https://2793209830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNCrOWKpBlXYnNB9SFIzb%2Fuploads%2Fz30hTcJEa2Mt899x3Sbx%2FScreenshot%202024-04-09%20at%2015.25.19.png?alt=media&amp;token=251c0bd8-dc69-4420-bce3-a45333d5babc" alt=""><figcaption></figcaption></figure>
