-
-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5c344b3
commit 505167e
Showing
5 changed files
with
34 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,4 +21,3 @@ export type ComfyIcuWorkflowOutput = { | |
url: string | ||
thumbnail_url: string | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,21 @@ | ||
import { ClapInputValues, ClapWorkflow } from "@aitube/clap" | ||
import { ClapInputValues, ClapWorkflow } from '@aitube/clap' | ||
|
||
export function getWorkflowInputValues(workflow: ClapWorkflow): { | ||
workflowDefaultValues: ClapInputValues | ||
workflowValues: ClapInputValues | ||
} { | ||
const workflowDefaultValues = | ||
workflow.inputFields.reduce( | ||
const workflowDefaultValues = workflow.inputFields.reduce( | ||
(acc, field) => ({ | ||
...acc, | ||
[field.id]: field.defaultValue, | ||
}), | ||
{} as ClapInputValues | ||
) | ||
|
||
const workflowValues = workflow | ||
.inputValues as ClapInputValues | ||
const workflowValues = workflow.inputValues as ClapInputValues | ||
|
||
return { | ||
workflowDefaultValues, | ||
workflowValues | ||
workflowValues, | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters