StableSR
StableSR copied to clipboard
Help for fine-tuning
Hello author. Thank you for your work; it's proving to be very helpful to me. Could you please tell me how I can adjust the model to train it with my own data? I can't seem to understand it; I see that you use specific datasets for training and validation, but I don't know how to adapt it to my own set of images for fine-tuning.
Hi, if you want to adopt your own data, you may refer to here and here and modify the input to your desired input format.
Thank you author very much. I finally changed the paths in the config file to point to my dataset for fine-tuning. My dataset consists of a set of 512x512 jpg images. With this setup, it's very interesting; it even saves the logs of the images as it trains.
data: target: main.DataModuleFromConfig params: batch_size: 6 num_workers: 6 wrap: false train: target: basicsr.data.realesrgan_dataset.RealESRGANDataset params: queue_size: 180 gt_path: 'traindataset/' face_gt_path: 'traindataset/' image_type: 'jpg' num_face: 10000 crop_size: 512 io_backend: type: disk blur_kernel_size: 21 kernel_list: ['iso', 'aniso', 'generalized_iso', 'generalized_aniso', 'plateau_iso', 'plateau_aniso'] kernel_prob: [0.45, 0.25, 0.12, 0.03, 0.12, 0.03] sinc_prob: 0.1 blur_sigma: [0.2, 1.5] betag_range: [0.5, 2.0] betap_range: [1, 1.5] blur_kernel_size2: 11 kernel_list2: ['iso', 'aniso', 'generalized_iso', 'generalized_aniso', 'plateau_iso', 'plateau_aniso'] kernel_prob2: [0.45, 0.25, 0.12, 0.03, 0.12, 0.03] sinc_prob2: 0.1 blur_sigma2: [0.2, 1.0] betag_range2: [0.5, 2.0] betap_range2: [1, 1.5] final_sinc_prob: 0.8 gt_size: 512 use_hflip: True use_rot: False validation: target: basicsr.data.realesrgan_dataset.RealESRGANDataset params: gt_path: 'valdataset/' face_gt_path: 'valdataset/' image_type: 'jpg' num_face: 10000 crop_size: 512 io_backend: type: disk blur_kernel_size: 21 kernel_list: ['iso', 'aniso', 'generalized_iso', 'generalized_aniso', 'plateau_iso', 'plateau_aniso'] kernel_prob: [0.45, 0.25, 0.12, 0.03, 0.12, 0.03] sinc_prob: 0.1 blur_sigma: [0.2, 1.5] betag_range: [0.5, 2.0] betap_range: [1, 1.5] blur_kernel_size2: 11 kernel_list2: ['iso', 'aniso', 'generalized_iso', 'generalized_aniso', 'plateau_iso', 'plateau_aniso'] kernel_prob2: [0.45, 0.25, 0.12, 0.03, 0.12, 0.03] sinc_prob2: 0.1 blur_sigma2: [0.2, 1.0] betag_range2: [0.5, 2.0] betap_range2: [1, 1.5] final_sinc_prob: 0.8 gt_size: 512 use_hflip: True use_rot: False
Would this be valid? I mean, It's enough with only changing the root of the train and validation dataset and launching the script that yoy specified in the repo?
Did you figure this out? Is substituting dataset path sufficient?
Hello hello, have you already got great results? Considering my limited server resources, I wonder if it's necessary to train the entire diffusion model or just fine tune and train the CFW and time aware encoder to achieve good results on my own dataset.
Hi all
Did you figure this out? Is substituting dataset path sufficient?
It was enough for me, anyway you can manipulate the imaginet dataset to adapt the data to what you need.
Hello hello, have you already got great results? Considering my limited server resources, I wonder if it's necessary to train the entire diffusion model or just fine tune and train the CFW and time aware encoder to achieve good results on my own dataset.
Yes, I had good result but I trained my own autoencoder, in that way I got better results. For that I used: https://github.com/CompVis/taming-transformers