Train with GPU and inference without GPU. Is it possible ? #55

Closed
opened 2026-01-29 21:40:04 +00:00 by claunia · 4 comments
Owner

Originally created by @MDYLL on GitHub (Aug 18, 2021).

Hello :)
One more - thank you very much for your beatifull project !

  1. I trained model on my ouw dataset - mymodel.pth
  2. I ran inference on CPU with your model - GFPGANCleanv1-NoCE-C2.pth
  3. I see that GFPGANv1.pth (and mymodel.pth) has 2x size that GFPGANCleanv1-NoCE-C2.pth

So, how I can transform mymodel.pth for using inference on CPU ? or may be I should train anotther model ?

Thank you :))

Originally created by @MDYLL on GitHub (Aug 18, 2021). Hello :) One more - thank you very much for your beatifull project ! 1. I trained model on my ouw dataset - mymodel.pth 2. I ran inference on CPU with your model - GFPGANCleanv1-NoCE-C2.pth 3. I see that GFPGANv1.pth (and mymodel.pth) has 2x size that GFPGANCleanv1-NoCE-C2.pth So, how I can transform mymodel.pth for using inference on CPU ? or may be I should train anotther model ? Thank you :))
Author
Owner

@xinntao commented on GitHub (Aug 19, 2021):

@MDYLL

  1. GFPGANv1.pth and GFPGANCleanv1-NoCE-C2.pth have two different architectures. So, they could not be transferred to each other currently.
  2. As GFPGANv1.pth requires custom CUDA extensions, so it could not be run on CPU.
@xinntao commented on GitHub (Aug 19, 2021): @MDYLL 1. GFPGANv1.pth and GFPGANCleanv1-NoCE-C2.pth have two different architectures. So, they could not be transferred to each other currently. 2. As GFPGANv1.pth requires custom CUDA extensions, so it could not be run on CPU.
Author
Owner

@MDYLL commented on GitHub (Aug 21, 2021):

Thank you for answer. Could I train GFPGANCleanv1-NoCE-C2.pth on my own dataset (with CUDA) ?

@MDYLL commented on GitHub (Aug 21, 2021): Thank you for answer. Could I train GFPGANCleanv1-NoCE-C2.pth on my own dataset (with CUDA) ?
Author
Owner

@xinntao commented on GitHub (Aug 23, 2021):

Currently, I have not updated the original architecture for GFPGANCleanv1-NoCE-C2.pth. So you could not finetune GFPGANCleanv1-NoCE-C2.pth.

I may update it later.

@xinntao commented on GitHub (Aug 23, 2021): Currently, I have not updated the original architecture for GFPGANCleanv1-NoCE-C2.pth. So you could not finetune GFPGANCleanv1-NoCE-C2.pth. I may update it later.
Author
Owner

@MDYLL commented on GitHub (Aug 24, 2021):

Ok, thank you :)
and good luck with all your projects ;)

@MDYLL commented on GitHub (Aug 24, 2021): Ok, thank you :) and good luck with all your projects ;)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: TencentARC/GFPGAN#55