stylegan3-fun icon indicating copy to clipboard operation
stylegan3-fun copied to clipboard

convert_to_grayscale

Open pgtinsley opened this issue 2 years ago • 2 comments

I lost hours to this "trolling to Pillow" since I'm actually working with a grayscale SG network 😢 Is there a better way to name this or at least call attention to the fact this is for 3-channel models? Thanks!

if convert_to_grayscale:
    image = image.convert('L').convert('RGB')  # We do a little trolling to Pillow (so we have a 3-channel image)

pgtinsley avatar May 05 '23 13:05 pgtinsley

Ah! So sorry this was a waste of your time. This line was just another way of gearing all the channels to the same, as then the Discriminator will generate completely different images during its synthesis stage. Might I ask what you got with/without it? Since I don't have a grayscale SG network, I don't know how to help for now, but let me know!

PDillis avatar May 17 '23 22:05 PDillis

Hello @pgtinsley. I am currently trying to use a grayscale SG network. Did you only set your dataset to use 1 channel via the -force-channels parameter, or were there any other changes that needed to be made?

iaggarw1 avatar Jun 19 '24 07:06 iaggarw1