Fixed generation options

This commit is contained in:
Storyteller committed 2024-05-15 16:47:38 -07:00
1 parent 1eee336d68
commit b2f20342e8
4 files changed
+18 -9

No files matched your search

@@ -15,7 +15,7 @@ export function StyleButtons() {
const [upscale, setUpscale] = useState(false);
const [faceDetail, setFaceDetail] = useState(false);
const [value, setStyleStrength] = useState(0.7);
const [value, setStyleStrength] = useState(1.0);
const sliderChanged = (event: React.ChangeEvent<HTMLInputElement>) => {
setStyleStrength(parseFloat(event.target.value));
@@ -38,12 +38,7 @@ export function StyleButtons() {
};
const generateMovie = async () => {
const options: GenerationOptions = {
upscale: upscale,
faceDetail: faceDetail,
styleStrength: value,
};
const options = new GenerationOptions(upscale, faceDetail, value);
Queue.publish({
queueName: QueueNames.TO_ENGINE,
action: toEngineActions.GENERATE_VIDEO,
+1
View File
@@ -1235,6 +1235,7 @@ class Editor {
}
const upload_token = data["media_file_token"];
const result = await this.api_manager
.stylizeVideo(
upload_token,
+2 -1
View File
@@ -175,7 +175,8 @@ export class TimeLine {
this.editorEngine.switchCameraView();
break;
case toEngineActions.GENERATE_VIDEO:
this.editorEngine.generation_options = data;
const options = data["data"]; // super overloaded talk to the devs about this. TODO... refactor
this.editorEngine.generation_options = options;
this.editorEngine.generateVideo();
break;
default:
@@ -2,4 +2,16 @@ export interface GenerationOptions {
upscale: boolean;
faceDetail: boolean;
styleStrength: number;
}
}
export class GenerationOptions {
public upscale: boolean;
public faceDetail: boolean;
public styleStrength: number;
constructor(upscale: boolean, faceDetail: boolean, styleStrength: number) {
this.upscale = upscale;
this.faceDetail = faceDetail;
this.styleStrength = styleStrength;
}
}