Spaces:
Paused
Paused
Julian Bilcke
commited on
Commit
·
71a97a8
1
Parent(s):
6a2e106
tmp debug
Browse files
src/providers/video-generation/generateVideoWithAnimateLCM.mts
CHANGED
|
@@ -24,12 +24,14 @@ export const generateVideoWithAnimateLCM = async ({
|
|
| 24 |
const actualFunction = async () => {
|
| 25 |
const negPrompt = ""
|
| 26 |
prompt = prompt || ""
|
| 27 |
-
|
|
|
|
|
|
|
| 28 |
|
| 29 |
// label="Sampling steps", value=6, minimum=1, maximum=25, step=1
|
| 30 |
// we wanna keep this one low (this is LCM after all)
|
| 31 |
// but values like 10 also give nice results
|
| 32 |
-
const nbSteps =
|
| 33 |
|
| 34 |
|
| 35 |
// label="LoRA alpha", value=0.8, minimum=0, maximum=2
|
|
@@ -53,6 +55,7 @@ export const generateVideoWithAnimateLCM = async ({
|
|
| 53 |
|
| 54 |
// pimp the prompt
|
| 55 |
|
|
|
|
| 56 |
// we put it at the start, to make sure it is always part of the prompt
|
| 57 |
const positivePrompt = getPositivePrompt([
|
| 58 |
style,
|
|
@@ -60,6 +63,9 @@ export const generateVideoWithAnimateLCM = async ({
|
|
| 60 |
].map(x => x.trim()).filter(x => x).join(", "))
|
| 61 |
|
| 62 |
const negativePrompt = getNegativePrompt(negPrompt)
|
|
|
|
|
|
|
|
|
|
| 63 |
|
| 64 |
try {
|
| 65 |
if (debug) {
|
|
@@ -129,10 +135,11 @@ export const generateVideoWithAnimateLCM = async ({
|
|
| 129 |
// next: { revalidate: 1 }
|
| 130 |
})
|
| 131 |
|
|
|
|
| 132 |
|
| 133 |
const { data } = await res.json()
|
| 134 |
-
|
| 135 |
-
|
| 136 |
// Recommendation: handle errors
|
| 137 |
if (res.status !== 200 || !Array.isArray(data)) {
|
| 138 |
// This will activate the closest `error.js` Error Boundary
|
|
|
|
| 24 |
const actualFunction = async () => {
|
| 25 |
const negPrompt = ""
|
| 26 |
prompt = prompt || ""
|
| 27 |
+
|
| 28 |
+
// seed = seed || generateSeed()
|
| 29 |
+
seed = generateSeed()
|
| 30 |
|
| 31 |
// label="Sampling steps", value=6, minimum=1, maximum=25, step=1
|
| 32 |
// we wanna keep this one low (this is LCM after all)
|
| 33 |
// but values like 10 also give nice results
|
| 34 |
+
const nbSteps = 6 // 25
|
| 35 |
|
| 36 |
|
| 37 |
// label="LoRA alpha", value=0.8, minimum=0, maximum=2
|
|
|
|
| 55 |
|
| 56 |
// pimp the prompt
|
| 57 |
|
| 58 |
+
/*
|
| 59 |
// we put it at the start, to make sure it is always part of the prompt
|
| 60 |
const positivePrompt = getPositivePrompt([
|
| 61 |
style,
|
|
|
|
| 63 |
].map(x => x.trim()).filter(x => x).join(", "))
|
| 64 |
|
| 65 |
const negativePrompt = getNegativePrompt(negPrompt)
|
| 66 |
+
*/
|
| 67 |
+
const positivePrompt = "Close-up of the dancing duo as they take a bow. The orange tabby cat wears a sequined top hat, and the Siamese cat hugs their shoulders, also wearing a sequined outfit"
|
| 68 |
+
const negativePrompt = ""
|
| 69 |
|
| 70 |
try {
|
| 71 |
if (debug) {
|
|
|
|
| 135 |
// next: { revalidate: 1 }
|
| 136 |
})
|
| 137 |
|
| 138 |
+
console.log("res:", res)
|
| 139 |
|
| 140 |
const { data } = await res.json()
|
| 141 |
+
|
| 142 |
+
console.log("data:", data)
|
| 143 |
// Recommendation: handle errors
|
| 144 |
if (res.status !== 200 || !Array.isArray(data)) {
|
| 145 |
// This will activate the closest `error.js` Error Boundary
|