Skip to content

OSError: Cannot load model stabilityai/stable-diffusion-2-1: model is not cached locally and an error occurred while trying to fetch metadata from the Hub. Please check out the root cause in the stacktrace above. #4

Description

@helplessThor

The below codeblock gives error in google colab :
def init(avatar_details, script):

"""Function to generate ai influencer videos by first generating the avatar image using
the prompt and the characterstics and then generating the voiceover using script.
With these generated image and voiceover, AI influencer video is generated.

parameters:
avatar_details (dict) : characterstics of the avatar
script (str) : script to generate the voiceover

returns:
res (list) : list of the generated files in the folder
"""
characterstics = avatar_details.get('characterstics')
prompt = get_prompt_for_image(characterstics)
print("Image prompt: " + prompt)
avatar_image_url = generate_avatar_image(prompt)
print("avatar_image_url: " + avatar_image_url)
voice_path = "examples/driven_audio/audio.wav"
generate_voiceover(script,voice_path)

res = create_ai_influencer(avatar_image_url,voice_path)
print(res)

Init function to generate the Influencer video

init({'characterstics':'male European, wearing glasses and leather jacket with a smile on face'}, "Our planet is a masterpiece of life, a delicate balance of ecosystems. But this harmony is under threat.Every year, 8 million tons of plastic enter our oceans, choking marine life. Forests, the lungs of our planet, are disappearing at an alarming rate. Climate change fuels disasters, from rising seas to devastating wildfires.But there is hope. Across the globe, people are rising to the challenge. Simple actions—reducing waste, conserving energy, and protecting wildlife—can make a difference.The future of our planet is in our hands. Together, we can turn the tide and protect our only home. Act now, because every choice matters.")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions