garystafford / svdxt-sagemaker-huggingface

Deploy and invoke Stability AI's Stable Video Diffusion XT (SVT-XT) 1.1 foundation model on Amazon SageMaker.
MIT License
8 stars 3 forks source link

You need to define 'HF_TASK' env variable #1

Closed suhaneshivam closed 6 months ago

suhaneshivam commented 6 months ago

Hi. While trying to run the notebook, I am getting the following error while doing inference:

You need to define one of the following ['audio-classification', 'automatic-speech-recognition', 'text-to-audio', 'feature-extraction', 'text-classification', 'token-classification', 'question-answering', 'table-question-answering', 'visual-question-answering', 'document-question-answering', 'fill-mask', 'summarization', 'translation', 'text2text-generation', 'text-generation', 'zero-shot-classification', 'zero-shot-image-classification', 'zero-shot-audio-classification', 'conversational', 'image-classification', 'image-segmentation', 'image-to-text', 'object-detection', 'zero-shot-object-detection', 'depth-estimation', 'video-classification', 'mask-generation', 'image-to-image'] or text-to-image as env 'HF_TASK'.

Now, I am wondering which task from the above list should I set in env for HF_TASK for image-to-video generation?

garystafford commented 6 months ago

@suhaneshivam thanks for reporting the issues. I have deployed and run the current notebook repeatedly and have not hit this issue. Which cell is this occurring in? Are you using Amazon SageMaker Studio environment?

suhaneshivam commented 6 months ago

Hi, I was getting this error when I was trying to invoke the asynchronous endpoint. It was logged in a file inside output_errors folder of s3 bucket which was used for storing input, output and errors in the notebook.

response = sm_runtime_client.invoke_endpoint_async(
    EndpointName=endpoint_name,
    InputLocation=input_s3_location,
    InvocationTimeoutSeconds=3600,
)

I solved this problem, however by passing environment variable HF_TASK="image-to-video". I am using Amazon Sagemaker Studio environment.

garystafford commented 6 months ago

Thank you for documenting in issue.