new mappings

This commit is contained in:
wil committed 2024-02-27 12:49:59 -05:00
1 parent 3be6ddede4
commit d40ebafab1
5 files changed
+55 -51

No files matched your search

@@ -2,29 +2,31 @@ import { ApiConfig } from "@storyteller/components";
export interface EnqueueVideoStyleTransferRequest {
"uuid_idempotency_token":string;
"maybe_sd_model": string;
"maybe_workflow_config": string;
"maybe_input_file": string;
"maybe_output_path": string;
"creator_set_visibility": string;
"maybe_sd_model": string; // SD Token
"maybe_workflow_config": string; // Workflow Toekn
"maybe_input_file": string; // Input File Token
"maybe_output_path": string; // Result Path
"creator_set_visibility": string; // Result Privacy
"maybe_json_modifications": {
"$.154.inputs.Value": number;
"$.510.inputs.Text": string;
"$.8.inputs.text": string;
"$.154.inputs.Value": number; // input FPS
"$.510.inputs.Text": string; // positive Prompt
"$.8.inputs.text": string; // negative Prompt
//"$.800.inputs.Value": number;
"$.772.inputs.Value": number;
"$.797.inputs.Value": number;
"$.796.inputs.Value": number;
//"$.1636.inputs.Value": number;
"$.771.inputs.Value": number;
"$.403.inputs.Value": number;
"$.1398.inputs.Value": number;
"$.1531.inputs.Value": number;
// "$.1449.inputs.filename_prefix": string;
// "$.208.inputs.lora_01": string;
// "$.208.inputs.strength_01": number;
"$.403.inputs.Value": number; // CN - SparseScribble
"$.771.inputs.Value": number; // CN - Open Pose
"$.772.inputs.Value": number; // CN - Depth
"$.796.inputs.Value": number; // CN - Line Art Realistic
"$.797.inputs.Value": number; // CN - Line Art Anime
"$.1398.inputs.Value": number; // CN - Soft Edge
"$.1531.inputs.Value": number; // CN - Regular Steps
//"$.800.inputs.Value": number; // CN - Canny
//"$.1636.inputs.Value": number; // CN - Libs Strength
// "$.1449.inputs.filename_prefix": string; // Output Path Prefix
// "$.208.inputs.lora_01": string; // LoRA Model Token
// "$.208.inputs.strength_01": number; // LoRA Model Strength
}
}
@@ -17,7 +17,7 @@ const defaultPreset = {
cnPipeFace: 0.7,
cnSparseScribble: 0.7,
cnSoftEdge: 0.7,
cnRegularSteps: 30,
cnRegularSteps: 20,
}
const closeupPreset = {
cnCanny: 0,
@@ -3,19 +3,18 @@ export {initialValues, hiddenValues};
const initialValues = {
//files Settings
fileToken: "",
outputPath: "",
outputPath: "vid2vid/SparseUpscaleInterp_00001.mp4",
//video Settings
width: 544,
height: 544,
maxFrames: 17,
framesCap: 16,
skipFrames: 0,
width: 1024,
height: 1024,
maxDuration: 2,
trimStart: 0,
trimEnd: 5,
//Presents
// workflowConfig: "weight_f5qh4s1dtp266yv313p09tkpa",
workflowConfig: "weight_99tz2nzbp5x9v55gqn5ekj1sd",
sdModelToken: "weight_83xpresyjswy97ppk0fyct146",
sdModelToken: "weight_p5x93dw8ec24zf9hz1zezsata",
loraModelToken: "weight_13yfxfafv195ejwh3meesebdk",
loraModelStrength: 1,
@@ -8,9 +8,9 @@ export type VSTType = {
// Video Settings
width: number;
height: number;
maxFrames: number;
framesCap: number;
skipFrames: number;
maxDuration: number;
trimStart: number;
trimEnd: number;
// Presets
workflowConfig: string;
@@ -53,7 +53,9 @@ export function mapRequest(vstValues: VSTType){
"maybe_sd_model": vstValues.sdModelToken,
"maybe_workflow_config":vstValues.workflowConfig,
"maybe_input_file": vstValues.fileToken,
"maybe_output_path": "vid2vid/SparseUpscaleInterp_00001.mp4",
"maybe_trim_start_seconds": vstValues.trimStart,
"maybe_trim_end_seconds": vstValues.trimEnd,
"maybe_output_path": vstValues.outputPath,
"creator_set_visibility": vstValues.visibility,
"maybe_json_modifications": {
"$.154.inputs.Value": vstValues.inputFps,
@@ -62,20 +64,21 @@ export function mapRequest(vstValues: VSTType){
"$.8.inputs.text":
hiddenValues.negPrompt+ vstValues.negPrompt,
//"$.800.inputs.Value": 0, // vstValues.cnCanny,
"$.772.inputs.Value": vstValues.cnDepth,
"$.797.inputs.Value": vstValues.cnLineArtAnime,
"$.796.inputs.Value": vstValues.cnLineArtRealistic,
//"$.1636.inputs.Value": 0, //vstValues.cnLipsStrength,
"$.771.inputs.Value": vstValues.cnOpenPose,
"$.403.inputs.Value": vstValues.cnSparseScribble,
"$.771.inputs.Value": vstValues.cnOpenPose,
"$.772.inputs.Value": vstValues.cnDepth,
"$.796.inputs.Value": vstValues.cnLineArtRealistic,
"$.797.inputs.Value": vstValues.cnLineArtAnime,
"$.1398.inputs.Value": vstValues.cnSoftEdge,
"$.1531.inputs.Value": vstValues.cnRegularSteps,
// "$.1449.inputs.filename_prefix": "vid2vid/SparseUpscaleInterp",
//"$.800.inputs.Value": 0, // vstValues.cnCanny,
//"$.1636.inputs.Value": 0, //vstValues.cnLipsStrength,
// "$.208.inputs.lora_01": vstValues.loraModelToken,
// "$.208.inputs.strength_01": vstValues.loraModelStrength
// "$.1449.inputs.filename_prefix": "vid2vid/SparseUpscaleInterp",
},
}
}
}
@@ -51,18 +51,18 @@ export default function PageVSTApp({
const newValues : {
width?: number;
height?: number;
maxFrames?: number;
framesCap?: number;
maxDuration?: number;
// trim?: number;
} = {};
if (ve.videoWidth && ve.videoHeight) {
const aspectRatio = ve.videoWidth/ve.videoHeight
if (aspectRatio > 1) newValues.width = 960;
else if (aspectRatio < 1) newValues.height = 960
else if (debug) console.log(`aspectRaio: ${aspectRatio}`);
}
// if (ve.videoWidth && ve.videoHeight) {
// const aspectRatio = ve.videoWidth/ve.videoHeight
// if (aspectRatio > 1) newValues.width = 960;
// else if (aspectRatio < 1) newValues.height = 960
// else if (debug) console.log(`aspectRaio: ${aspectRatio}`);
// }
if(ve.duration){
newValues.maxFrames = Math.floor(ve.duration)*vstValues.inputFps;
newValues.framesCap = newValues.maxFrames;
newValues.maxDuration = ve.duration
// newValues.framesCap = newValues.maxFrames;
}
setVstValues((curr)=>({
...curr,