這是一個無服務器的應用程序,它使用AnimateFiff在RunPod上運行文本到視頻任務。
有關文本到IMGAE任務,另請參見SDXL_SERVERESS_RUNPOD。
無服務器意味著您僅在使用該應用程序的時間內收取費用,並且無需為空閒時間付費,這非常適合這種應用程序不經常使用但需要快速響應。
從理論上講,此應用程序可以由任何其他應用程序調用。在這裡,我們提供了兩個例子:
有關更多詳細信息,請參見下面的用法。
輸入提示:(隨機種子:445608568)
1girl, focus on face, offshoulder, light smile, shiny skin, best quality, masterpiece, photorealistic
結果:(原始| Panleft,28步,768x512,RTX 3090上的60秒,在Runpod上0.015 $?)
輸入提示:(隨機種子:195577361)
photo of coastline, rocks, storm weather, wind, waves, lightning, 8k uhd, dslr, soft lighting, high quality, film grain, Fujifilm XT3
結果:(原始| Zoomout,28個步驟,768x512,RTX 3090上的60秒,在Runpod上0.015 $?)
從輸入提示發送到收到結果映像的那一刻起,包括以下所有步驟的時間:
如果您沒有GPU,則可以在Google Colab上修改和測試代碼,然後在RunPod上構建和部署該應用程序。
示例筆記本:鏈接
# Install dependencies
pip install -r requirements.txt
# Download models
python scripts/download.py
# Edit (or not) config to customize your inference, e.g., change base model, lora model, motion lora model, etc.
rename inference_v2(example).yaml to inference_v2.yaml
# Run inference test
python inference_util.py
# Run server.py local test
python server.py
在下載過程中,如果您遇到“ gdown.exceptions.filelretrevalerror:無法檢索文件的公共鏈接”之類的錯誤。
首先,確保您已經安裝了Docker並在Dockerhub和Runpod上都有帳戶。
然後,確定您的Docker映像的名稱,例如“ your_username/anidiff:v1”,並在./scripts/build.sh中設置您的圖像名稱。
運行以下命令以構建並將Docker Image推向Dockerhub。
bash腳本/build.sh
抱歉,由於作者最近很忙,因此在這裡沒有提供詳細說明。您可以在Google上找到有關如何在Runpod上部署Docker映像的許多詳細說明。
如果您在Google上搜索後遇到任何問題,請隨時與我聯繫。
# Make sure to set API key and endpoint ID before running the script.
python test_client.py

感謝Animatediff和Runpod。