0

I am trying to implement this model from HuggingFace. To run the model I need to import HugGANModelHubMixin with:

from huggan.pytorch.huggan_mixin import HugGANModelHubMixin

but I get:

ModuleNotFoundError: No module named 'huggan'.

I cloned the model locally and try to run it from VSC.

As far I understand is the problem that HugGANModelHubMixin is not available on HuggingFace because search for models returns no results.

How can I find a work around for this issue?

Max Hager
  • 536
  • 4
  • 13

1 Answers1

0

I had a similar issue trying to implement: from huggan.pytorch.lightweight_gan.lightweight_gan import LightweightGAN

Have you already clone the repository: git clone https://huggingface.co/huggan/fastgan-few-shot-universe ?

Even in the example:

# Clone this model 
git clone https://huggingface.co/huggan/fastgan-few-shot-universe
def load_generator(model_name_or_path):
    generator = Generator(in_channels=256, out_channels=3)
    generator = generator.from_pretrained(model_name_or_path, in_channels=256, out_channels=3)
    _ = generator.eval()
    return generator

They need first to download the huggan repo

For example, in your requiremets.txt file, you can add:

git+https://github.com/huggingface/community-events.git@3fea10c5d5a50c69f509e34cd580fe9139905d04#egg=huggan