Skip to content

Commit

Permalink
remove codeformer
Browse files Browse the repository at this point in the history
  • Loading branch information
xinntao committed Sep 16, 2022
1 parent 3fd33ab commit bc5a5de
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 659 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ It leverages rich and diverse priors encapsulated in a pretrained face GAN (*e.g

:triangular_flag_on_post: **Updates**

- :white_check_mark: Add CodeFormer ([CC BY-NC-SA 4.0 License](https://creativecommons.org/licenses/by-nc-sa/4.0/)) and RestoreFormer.

This comment has been minimized.

Copy link
@Farhadteimory

Farhadteimory Aug 28, 2023

Uploading Untitled-2.jpg…

This comment has been minimized.

Copy link
@01925135023

01925135023 Oct 5, 2023

helo sir f

This comment has been minimized.

Copy link
@anshuashu0698

anshuashu0698 Dec 17, 2023

hello mam

This comment has been minimized.

Copy link
@shamim2150

shamim2150 Jan 31, 2024

Why is my mobile not running?

This comment has been minimized.

Copy link
@iqbalstudio

iqbalstudio Feb 3, 2024

hello, why it says billing now in replicating the image ? can some 1 help ?

This comment has been minimized.

Copy link
@AminurStudio2

AminurStudio2 via email Feb 3, 2024

This comment has been minimized.

Copy link
@mamun277

mamun277 via email Mar 17, 2024

This comment has been minimized.

Copy link
@mamun277

mamun277 via email Mar 17, 2024

This comment has been minimized.

Copy link
@refat577

refat577 Apr 12, 2024

some

Plz help me

This comment has been minimized.

Copy link
@refat577

refat577 Apr 12, 2024

hello, why it says billing now in replicating the image ? can some 1 help ?

Sir, it is not possible for me to give a price, a man of little
profession. The family runs a small studio shop. But thank you, I had
a very good experience when you gave me free.

- :white_check_mark: Add [RestoreFormer](https://github.com/wzhouxiff/RestoreFormer) inference codes.
- :white_check_mark: Add [V1.4 model](https://github.com/TencentARC/GFPGAN/releases/download/v1.3.0/GFPGANv1.4.pth), which produces slightly more details and better identity than V1.3.
- :white_check_mark: Add **[V1.3 model](https://github.com/TencentARC/GFPGAN/releases/download/v1.3.0/GFPGANv1.3.pth)**, which produces **more natural** restoration results, and better results on *very low-quality* / *high-quality* inputs. See more in [Model zoo](#european_castle-model-zoo), [Comparisons.md](Comparisons.md)
- :white_check_mark: Integrated to [Huggingface Spaces](https://huggingface.co/spaces) with [Gradio](https://github.com/gradio-app/gradio). See [Gradio Web Demo](https://huggingface.co/spaces/akhaliq/GFPGAN).
Expand Down
20 changes: 2 additions & 18 deletions cog_predict.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ def setup(self):
os.system(
'wget https://github.com/TencentARC/GFPGAN/releases/download/v1.3.4/RestoreFormer.pth -P ./gfpgan/weights'
)
if not os.path.exists('gfpgan/weights/CodeFormer.pth'):
os.system(
'wget https://github.com/TencentARC/GFPGAN/releases/download/v1.3.4/CodeFormer.pth -P ./gfpgan/weights')

# background enhancer with RealESRGAN
model = SRVGGNetCompact(num_in_ch=3, num_out_ch=3, num_feat=64, num_conv=32, upscale=4, act_type='prelu')
Expand All @@ -71,17 +68,11 @@ def predict(
img: Path = Input(description='Input'),
version: str = Input(
description='GFPGAN version. v1.3: better quality. v1.4: more details and better identity.',
choices=['v1.2', 'v1.3', 'v1.4', 'RestoreFormer', 'CodeFormer'],
choices=['v1.2', 'v1.3', 'v1.4', 'RestoreFormer'],
default='v1.4'),
scale: float = Input(description='Rescaling factor', default=2),
weight: float = Input(
description='Weight, only for CodeFormer. 0 for better quality, 1 for better identity',
default=0.5,
ge=0,
le=1.0)
) -> Path:
if not isinstance(weight, (int, float)):
weight = 0.5
weight = 0.5
print(img, version, scale, weight)
try:
extension = os.path.splitext(os.path.basename(str(img)))[1]
Expand Down Expand Up @@ -130,13 +121,6 @@ def predict(
arch='RestoreFormer',
channel_multiplier=2,
bg_upsampler=self.upsampler)
elif version == 'CodeFormer':
self.face_enhancer = GFPGANer(
model_path='gfpgan/weights/CodeFormer.pth',
upscale=2,
arch='CodeFormer',
channel_multiplier=2,
bg_upsampler=self.upsampler)

try:
_, _, output = self.face_enhancer.enhance(
Expand Down
Loading

14 comments on commit bc5a5de

@mamun277
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

df

@sushantkumar-93
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Y

@sushantkumar-93
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Y

@Sifatmm
Copy link

@Sifatmm Sifatmm commented on bc5a5de Jul 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uploading 20230706_161137-02.jpeg…

@Sifatmm
Copy link

@Sifatmm Sifatmm commented on bc5a5de Jul 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uploading image.png…
1

@hsjwjsbb
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uploading 69075595.jpg…

@hsjwjsbb
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

10

@hsjwjsbb
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hd

@ScorpionDJ
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uploading _DSC7604.jpg…

@AminurStudio2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uploading replicate-prediction-ffu2e6aw4barxliwxu23ydgbnu.png…

@sksakir
Copy link

@sksakir sksakir commented on bc5a5de Mar 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uploading DSCN0074.JPG…
4

@sksakir
Copy link

@sksakir sksakir commented on bc5a5de Mar 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Bunny777g
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Face clean

@AminurStudio2
Copy link

@AminurStudio2 AminurStudio2 commented on bc5a5de Mar 15, 2024 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.