Real-ESRGAN icon indicating copy to clipboard operation
Real-ESRGAN copied to clipboard

What is the correct file to use for fine-tuning?

Open leppie opened this issue 2 years ago • 7 comments

The docs say download ESRGAN

https://github.com/xinntao/Real-ESRGAN/blob/9ff1944d06e9d7fe86c68bbf1a244cff403f064e/Training.md?plain=1#L179 https://github.com/xinntao/Real-ESRGAN/blob/9ff1944d06e9d7fe86c68bbf1a244cff403f064e/Training.md?plain=1#L236

But the file refers to ESRNet

https://github.com/xinntao/Real-ESRGAN/blob/9ff1944d06e9d7fe86c68bbf1a244cff403f064e/options/finetune_realesrgan_x4plus.yml#L102

Is fine-tuning also a 2 stage process like training?

leppie avatar Mar 20 '22 14:03 leppie

Hi , I have met the same problem with you, have you solved it?

Gardlin avatar Apr 22 '22 03:04 Gardlin

I have the same issue, did you find a solution?

MattiaMartinelliGeo avatar May 04 '22 10:05 MattiaMartinelliGeo

Any solution so far?

airogachev avatar May 05 '22 17:05 airogachev

Same here

baioccofederico avatar May 06 '22 16:05 baioccofederico

maybe we need to start from the train part as there is a part called Train Real-ESRNet the following website is written by Chinese, you can just translate it to read. https://github.com/xinntao/Real-ESRGAN/issues/37

ZhengtianZhu avatar May 09 '22 12:05 ZhengtianZhu

You can use any model for finetuning, so long as it uses an RRDB architecture, for me I used RealESRGAX4.pth for finetuning

cliffordkleinsr avatar Aug 11 '22 11:08 cliffordkleinsr

It's been a while and cliffordkleinsr has basically already answered but since I struggled with those comments too I'll chime in.

It's very likely that those finetuning yml files were copy pasted from the training files, so the comments are the same, but as you said if you follow the finetuning RealESRGAN guide in the docs, it tells you to download RealESRGAN_x4plus.pth (and the discriminator). You can put this file in the pretrain_network_g option in the yml, and it will load RealESRGAN so you won't have to train it from 'scratch'. There is no 2-stage process, you can fine tune right away.

marcobarbierato avatar Apr 08 '24 14:04 marcobarbierato