Skip to content

Commit

Permalink
Add test for cadence
Browse files Browse the repository at this point in the history
  • Loading branch information
rewbs committed Sep 19, 2023
1 parent 840b900 commit 7593ef3
Show file tree
Hide file tree
Showing 2 changed files with 568 additions and 0 deletions.
61 changes: 61 additions & 0 deletions src/Deforum.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9339,4 +9339,65 @@ test('reverse_render_reversed', async () => {
}
await loadAndRender(fixture);
expect(screen.getByTestId("output")).toMatchSnapshot();
});

test('Cadence', async () => {
const fixture = {
"prompts": {
"format": "v2",
"enabled": true,
"commonPromptPos": "append",
"commonPrompt": {
"name": "Common",
"positive": "",
"negative": "",
"allFrames": true,
"from": 0,
"to": 119,
"overlap": {
"inFrames": 0,
"outFrames": 0,
"type": "none",
"custom": "prompt_weight_1"
}
},
"promptList": [
{
"name": "Prompt 1",
"positive": "prompt",
"negative": "nega",
"allFrames": false,
"from": 0,
"to": 119,
"overlap": {
"inFrames": 0,
"outFrames": 0,
"type": "none",
"custom": "prompt_weight_1"
}
}
]
},
"managedFields": [
"prompt_weight_1",
"prompt_weight_2"
],
"options": {
"cadence": 3,
},
"keyframes": [
{
"frame": 0,
"prompt_weight_1": "",
"prompt_weight_1_i": "is_generation()",
"prompt_weight_2": "",
"prompt_weight_2_i": "pulse(p=2b, pw=cadence)"
},
{
"frame": 40,
}
],
};
await loadAndRender(fixture);
expect(screen.getByTestId("output")).toMatchSnapshot();
});
Loading

0 comments on commit 7593ef3

Please sign in to comment.