Skip to content

HuggingFace demo not working? Here's what to do. #11

@bouncingsedan

Description

@bouncingsedan

Given the author is not fixing the HuggingFace demo, follow these steps:

  1. Visit the demo on HuggingFace
  2. Cry that there is an error
  3. Click the 'Runtime error' button as circled in the image
Image
  1. Click the text that says 'try to fix the Space yourself by duplicating it'
  2. Go to Files -> requirements.txt
  3. Edit the file to the following:
git+https://github.com/zhuang2002/diffusers_cobra.git
torchaudio==2.6.0
torch==2.6.0
torchvision==0.21.0
accelerate==1.5.2
datasets==3.2.0
einops==0.8.1
gradio==5.25.0
gradio_client==1.8.0
huggingface-hub==0.30.2
matplotlib==3.10.1
numpy==1.26.4
opencv-python==4.11.0.86
peft==0.15.0
Pillow==11.1.0
safetensors==0.5.3
sentencepiece==0.2.0
tqdm==4.67.1
transformers==4.48.3

The changes I had to make:
torchaudio from 2.5.1 to 2.6.0
torch from 2.5.1 to 2.6.0
torchvision from 0.20.1 to 0.21.0
gradio from 5.22.0 to 5.25.0

It should now rebuild. Also, make sure in Settings to set publicity to Public otherwise the HTML and CSS and JS files won't load.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions