jbilcke-hf HF staff commited on
Commit
72f62be
β€’
1 Parent(s): 1373ff5

use one entrypoint for animate diff

Browse files
src/production/renderVideo.mts CHANGED
@@ -4,7 +4,6 @@ import { RenderedScene, RenderRequest, VideoGenerationParams } from "../types.mt
4
  // import { generateVideo } from "../providers/video-generation/generateVideoWithHotshotGradioAPI.mts"
5
  // import { generateVideoWithAnimateLCM } from "../providers/video-generation/generateVideoWithAnimateLCM.mts"
6
  import { generateVideoWithAnimateDiffLightning } from "../providers/video-generation/generateVideoWithAnimateDiffLightning.mts"
7
- import { generateSeed } from "../utils/misc/generateSeed.mts"
8
 
9
  export async function renderVideo(
10
  request: RenderRequest,
 
4
  // import { generateVideo } from "../providers/video-generation/generateVideoWithHotshotGradioAPI.mts"
5
  // import { generateVideoWithAnimateLCM } from "../providers/video-generation/generateVideoWithAnimateLCM.mts"
6
  import { generateVideoWithAnimateDiffLightning } from "../providers/video-generation/generateVideoWithAnimateDiffLightning.mts"
 
7
 
8
  export async function renderVideo(
9
  request: RenderRequest,
src/providers/video-generation/generateVideoWithAnimateDiffLightning.mts CHANGED
@@ -3,11 +3,6 @@ import { generateSeed } from "../../utils/misc/generateSeed.mts"
3
  import { tryApiCalls } from "../../utils/misc/tryApiCall.mts"
4
  import { getValidNumber } from "../../utils/validators/getValidNumber.mts"
5
 
6
- const replicas = [
7
- "https://jbilcke-hf-ai-tube-model-adl-1.hf.space",
8
- "https://jbilcke-hf-ai-tube-model-adl-2.hf.space",
9
- ]
10
-
11
  const accessToken = `${process.env.VC_MICROSERVICE_SECRET_TOKEN || ""}`
12
 
13
  export const generateVideoWithAnimateDiffLightning = async (
@@ -17,7 +12,6 @@ export const generateVideoWithAnimateDiffLightning = async (
17
 
18
  const debug = false
19
 
20
- let replica = replicas[0] || ""
21
 
22
  const actualFunction = async (): Promise<RenderedScene> => {
23
 
@@ -66,9 +60,7 @@ export const generateVideoWithAnimateDiffLightning = async (
66
  })
67
  }
68
 
69
- replicas.push(replica = replicas.shift())
70
-
71
- const res = await fetch(replica + (replica.endsWith("/") ? "" : "/") + "api/predict", {
72
  method: "POST",
73
  headers: {
74
  "Content-Type": "application/json",
 
3
  import { tryApiCalls } from "../../utils/misc/tryApiCall.mts"
4
  import { getValidNumber } from "../../utils/validators/getValidNumber.mts"
5
 
 
 
 
 
 
6
  const accessToken = `${process.env.VC_MICROSERVICE_SECRET_TOKEN || ""}`
7
 
8
  export const generateVideoWithAnimateDiffLightning = async (
 
12
 
13
  const debug = false
14
 
 
15
 
16
  const actualFunction = async (): Promise<RenderedScene> => {
17
 
 
60
  })
61
  }
62
 
63
+ const res = await fetch(`https://jbilcke-hf-ai-tube-model-animatediff.hf.space/api/predict`, {
 
 
64
  method: "POST",
65
  headers: {
66
  "Content-Type": "application/json",