Skip to content

Updated sample to use BSRGAN model from HF hub, and UV for dependency management#153

Closed
Ankur-singh wants to merge 3 commits intointel:mainfrom
Ankur-singh:use-BSRGAN-from-hf
Closed

Updated sample to use BSRGAN model from HF hub, and UV for dependency management#153
Ankur-singh wants to merge 3 commits intointel:mainfrom
Ankur-singh:use-BSRGAN-from-hf

Conversation

@Ankur-singh
Copy link
Copy Markdown
Contributor

This PR includes the following changes:

  • Updates the sample to use BSRGAN model from HF hub
  • Introduces UV for dependency management
  • Deprecates pixi which was previously used for dependency management

from network_rrdbnet import RRDBNet


def download_from_hub(repo_id, hf_token=None):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please add docstring, return type and argument type for repo_id



class BSRGAN:
def __init__(self, model_path, device, hf_model=False):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please add docstring and argument type for model_path and device


self.load_model()

def load_model(self):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please add docstring, return type if any

self.model_name = model_name
self.model = model

def predict(self, img_path):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please add docstring, return type and argument type for img_path

@Ankur-singh Ankur-singh closed this by deleting the head repository Mar 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants