Merge branch 'feature/mvp' of https://github.com/storytold/storyteller-frontend into feature/mvp

This commit is contained in:
Victor committed 2024-02-02 23:16:42 -08:00
commit af86813b1a
5 files changed
+12 -14

No files matched your search

+1 -1
View File
@@ -488,7 +488,7 @@ class ApiConfig {
// =============== Image Generation ===============
enqueueImageGeneration(): string {
return `${this.getApiOrigin()}/v1/image_gen/inference/enqueue_image_gen`;
return `${this.getApiOrigin()}/v1/image_gen/enqueue/inference`;
}
// =============== Motion Capture / mocap ===============
@@ -5,9 +5,9 @@ export interface UploadModelRequest {
type_of_inference: String, // upload_lora / check_point / inference
maybe_upload_path?: String,
maybe_lora_upload_path?: String,
title: String,
maybe_name: String,
maybe_description: String,
visibility: String,
description: String
}
export interface UploadModelResponse {
@@ -18,5 +18,5 @@ export interface UploadModelResponse {
export const UploadModel = MakeRequest<string, UploadModelRequest, UploadModelResponse,{}>({
method: "POST",
routingFunction: () => "/v1/image_gen/model/upload",
routingFunction: () => "/v1/image_gen/upload/model",
});
@@ -30,11 +30,11 @@ export default function useLoraUpload() {
...(coverImg.token
? { cover_image_media_file_token: coverImg.token }
: {}),
description: descriptionMD,
maybe_name: title,
maybe_description: descriptionMD,
uuid_idempotency_token: uuidv4(),
type_of_inference: "inference",
maybe_upload_path: uploadPath,
title,
visibility,
})
.then((res: any) => {
@@ -30,11 +30,11 @@ export default function useSdUpload() {
...(coverImg.token
? { cover_image_media_file_token: coverImg.token }
: {}),
description: descriptionMD,
maybe_description: descriptionMD,
uuid_idempotency_token: uuidv4(),
type_of_inference: "inference",
maybe_upload_path: uploadPath,
title,
maybe_name: title,
visibility,
})
.then((res: any) => {
@@ -1,4 +1,4 @@
import React, { useState } from "react";
import React from "react";
import { useParams } from "react-router-dom";
import {
faCircleExclamation,
@@ -34,7 +34,6 @@ export default function WeightEditPage({
// const [fetched, fetchedSet] = useState(false);
// const history = useHistory();
const { weight_token } = useParams<{ weight_token: string }>();
const [weightCreatorToken] = useState("");
const {
coverImg,
@@ -61,10 +60,9 @@ export default function WeightEditPage({
{ label: "Private", value: "private" },
];
if (
!sessionWrapper.canEditTtsModelByUserToken(weightCreatorToken) === false ||
!weight_token
) {
let weightToken = weight?.creator?.user_token;
if (!weightToken || !sessionWrapper.canEditTtsModelByUserToken(weightToken)) {
return (
<Container type="panel">
<PageHeader