Skip to content

Commit

Permalink
add field
Browse files Browse the repository at this point in the history
  • Loading branch information
jbilcke-hf committed Aug 17, 2024
1 parent 9bfb74e commit 493ad11
Show file tree
Hide file tree
Showing 12 changed files with 74 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ WORKDIR /app
COPY --chown=user package*.json /app

# make sure the .env is copied as well
COPY --chown=user .env.example /app/.env
COPY --chown=user packages/app/.env.example /app/.env

RUN ffmpeg -version

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ export const aitubeWorkflows: ClapWorkflow[] = [
tags: ['OpenClap', 'image', 'storyboard'],
author: 'AiTube.at',
thumbnailUrl: '',
nonCommercial: false,
engine: ClapWorkflowEngine.OPENCLAP,
category: ClapWorkflowCategory.IMAGE_GENERATION,
provider: ClapWorkflowProvider.AITUBE,
data: 'api/v1/edit/storyboards',
schema: '',
inputFields: [genericPrompt, genericWidth2048, genericHeight2048],
inputValues: {
[genericPrompt.id]: genericPrompt.defaultValue,
Expand All @@ -42,10 +44,12 @@ export const aitubeWorkflows: ClapWorkflow[] = [
tags: ['OpenClap', 'music'],
author: 'AiTube.at',
thumbnailUrl: '',
nonCommercial: false,
engine: ClapWorkflowEngine.OPENCLAP,
category: ClapWorkflowCategory.MUSIC_GENERATION,
provider: ClapWorkflowProvider.AITUBE,
data: 'api/v1/edit/music',
schema: '',
inputFields: [genericPrompt],
inputValues: {
[genericPrompt.id]: genericPrompt.defaultValue,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ export const anthropicWorkflows: ClapWorkflow[] = [
tags: ['Claude', 'Sonnet'],
author: 'Anthropic',
thumbnailUrl: '',
nonCommercial: false,
engine: ClapWorkflowEngine.REST_API,
category: ClapWorkflowCategory.ASSISTANT,
provider: ClapWorkflowProvider.ANTHROPIC,
data: 'claude-3-5-sonnet-20240620',
schema: '',
inputFields: [genericPrompt],
inputValues: {
prompt: genericPrompt.defaultValue,
Expand All @@ -40,10 +42,12 @@ export const anthropicWorkflows: ClapWorkflow[] = [
tags: ['Claude', 'Opus'],
author: 'Anthropic',
thumbnailUrl: '',
nonCommercial: false,
engine: ClapWorkflowEngine.REST_API,
category: ClapWorkflowCategory.ASSISTANT,
provider: ClapWorkflowProvider.ANTHROPIC,
data: 'claude-3-opus-20240229',
schema: '',
inputFields: [genericPrompt],
inputValues: {
prompt: genericPrompt.defaultValue,
Expand All @@ -56,10 +60,12 @@ export const anthropicWorkflows: ClapWorkflow[] = [
tags: ['Claude', 'Haiku'],
author: 'Anthropic',
thumbnailUrl: '',
nonCommercial: false,
engine: ClapWorkflowEngine.REST_API,
category: ClapWorkflowCategory.ASSISTANT,
provider: ClapWorkflowProvider.ANTHROPIC,
data: 'claude-3-haiku-20240307',
schema: '',
inputFields: [genericPrompt],
inputValues: {
prompt: genericPrompt.defaultValue,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ export const bigModelWorkflows: ClapWorkflow[] = [
tags: ['video'],
author: '',
thumbnailUrl: '',
nonCommercial: false,
engine: ClapWorkflowEngine.REST_API,
provider: ClapWorkflowProvider.BIGMODEL,
category: ClapWorkflowCategory.VIDEO_GENERATION,
data: 'cogvideox', // <- "code" of the model, see: https://bigmodel.cn/dev/api#cogvideox
schema: '',
inputFields: [genericImageUrl],
inputValues: {
[genericImageUrl.id]: genericImageUrl.defaultValue,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,12 @@ export const cohereWorkflows: ClapWorkflow[] = [
tags: ['command'],
author: 'Cohere',
thumbnailUrl: '',
nonCommercial: false,
engine: ClapWorkflowEngine.REST_API,
category: ClapWorkflowCategory.ASSISTANT,
provider: ClapWorkflowProvider.COHERE,
data: 'command',
schema: '',
inputFields: [genericPrompt],
inputValues: {
prompt: genericPrompt.defaultValue,
Expand All @@ -71,10 +73,12 @@ export const cohereWorkflows: ClapWorkflow[] = [
tags: ['command', 'light'],
author: 'Cohere',
thumbnailUrl: '',
nonCommercial: false,
engine: ClapWorkflowEngine.REST_API,
category: ClapWorkflowCategory.ASSISTANT,
provider: ClapWorkflowProvider.COHERE,
data: 'command-light',
schema: '',
inputFields: [genericPrompt],
inputValues: {
prompt: genericPrompt.defaultValue,
Expand All @@ -87,10 +91,12 @@ export const cohereWorkflows: ClapWorkflow[] = [
tags: ['command', 'nightly'],
author: 'Cohere',
thumbnailUrl: '',
nonCommercial: false,
engine: ClapWorkflowEngine.REST_API,
category: ClapWorkflowCategory.ASSISTANT,
provider: ClapWorkflowProvider.COHERE,
data: 'command-nightly',
schema: '',
inputFields: [genericPrompt],
inputValues: {
prompt: genericPrompt.defaultValue,
Expand All @@ -103,10 +109,12 @@ export const cohereWorkflows: ClapWorkflow[] = [
tags: ['command', 'light', 'nightly'],
author: 'Cohere',
thumbnailUrl: '',
nonCommercial: false,
engine: ClapWorkflowEngine.REST_API,
category: ClapWorkflowCategory.ASSISTANT,
provider: ClapWorkflowProvider.COHERE,
data: 'command-light-nightly',
schema: '',
inputFields: [genericPrompt],
inputValues: {
prompt: genericPrompt.defaultValue,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,15 @@ export const comfyicuWorkflows: ClapWorkflow[] = [
tags: ['flux'],
author: 'BFL (https://BlackForestLabs.ai)',
thumbnailUrl: '',
nonCommercial: false,
engine: ClapWorkflowEngine.COMFYUI_WORKFLOW,
provider: ClapWorkflowProvider.COMFYICU,
category: ClapWorkflowCategory.IMAGE_GENERATION,
// note: ComfyICU uses "API Workflows", which are simplified ComfyUI workflows
data: '{"5":{"inputs":{"width":1024,"height":1024,"batch_size":1},"class_type":"EmptyLatentImage"},"6":{"inputs":{"clip":["11",0],"text":"detailed cinematic dof render of an old dusty detailed CRT monitor on a wooden desk in a dim room with items around, messy dirty room. On the screen are the letters "FLUX Schnell" glowing softly. High detail hard surface render"},"class_type":"CLIPTextEncode"},"8":{"inputs":{"vae":["10",0],"samples":["13",0]},"class_type":"VAEDecode"},"9":{"inputs":{"images":["8",0],"filename_prefix":"ComfyUI"},"class_type":"SaveImage"},"10":{"inputs":{"vae_name":"flux1-ae.safetensors"},"class_type":"VAELoader"},"11":{"inputs":{"type":"flux","clip_name1":"t5xxl_fp16.safetensors","clip_name2":"clip_l.safetensors"},"class_type":"DualCLIPLoader"},"12":{"inputs":{"unet_name":"flux1-schnell.safetensors","weight_dtype":"default"},"class_type":"UNETLoader"},"13":{"inputs":{"noise":["25",0],"guider":["22",0],"sigmas":["17",0],"sampler":["16",0],"latent_image":["5",0]},"class_type":"SamplerCustomAdvanced"},"16":{"inputs":{"sampler_name":"euler"},"class_type":"KSamplerSelect"},"17":{"inputs":{"model":["12",0],"steps":4,"denoise":1,"scheduler":"simple"},"class_type":"BasicScheduler"},"22":{"inputs":{"model":["12",0],"conditioning":["6",0]},"class_type":"BasicGuider"},"25":{"inputs":{"noise_seed":24016052484185},"class_type":"RandomNoise"}}',
schema: '',
inputFields: [genericPrompt, genericWidth2048, genericHeight2048],
inputValues: {
[genericPrompt.id]: genericPrompt.defaultValue,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ export const comfyuiWorkflows: ClapWorkflow[] = [
tags: [],
author: '',
thumbnailUrl: '',
nonCommercial: false,
engine: ClapWorkflowEngine.COMFYUI_WORKFLOW,
provider: ClapWorkflowProvider.COMFYUI,
category: ClapWorkflowCategory.IMAGE_GENERATION,
data: JSON.stringify(text_to_image_demo_workflow),
schema: '',
inputFields: [genericPrompt],
inputValues: {
[genericPrompt.id]: genericPrompt.defaultValue,
Expand All @@ -49,10 +51,12 @@ export async function getDynamicComfyuiWorkflows(): Promise<ClapWorkflow[]> {
tags: ['custom', 'image generation'],
author: 'You',
thumbnailUrl: '',
nonCommercial: false,
engine: ClapWorkflowEngine.COMFYUI_WORKFLOW,
provider: ClapWorkflowProvider.COMFYUI,
category: ClapWorkflowCategory.IMAGE_GENERATION,
data: settings.comfyWorkflowForImage,
schema: '',
inputFields: [genericPrompt],
inputValues: {
[genericPrompt.id]: genericPrompt.defaultValue,
Expand All @@ -65,10 +69,12 @@ export async function getDynamicComfyuiWorkflows(): Promise<ClapWorkflow[]> {
tags: ['custom', 'video generation'],
author: 'You',
thumbnailUrl: '',
nonCommercial: false,
engine: ClapWorkflowEngine.COMFYUI_WORKFLOW,
provider: ClapWorkflowProvider.COMFYUI,
category: ClapWorkflowCategory.VIDEO_GENERATION,
data: settings.comfyWorkflowForVideo,
schema: '',
inputFields: [genericImage],
inputValues: {
[genericImage.id]: genericImage.defaultValue,
Expand All @@ -81,10 +87,12 @@ export async function getDynamicComfyuiWorkflows(): Promise<ClapWorkflow[]> {
tags: ['custom', 'voice generation'],
author: 'You',
thumbnailUrl: '',
nonCommercial: false,
engine: ClapWorkflowEngine.COMFYUI_WORKFLOW,
provider: ClapWorkflowProvider.COMFYUI,
category: ClapWorkflowCategory.VOICE_GENERATION,
data: settings.comfyWorkflowForVoice,
schema: '',
inputFields: [genericPrompt],
inputValues: {
[genericPrompt.id]: genericPrompt.defaultValue,
Expand All @@ -97,10 +105,12 @@ export async function getDynamicComfyuiWorkflows(): Promise<ClapWorkflow[]> {
tags: ['custom', 'music generation'],
author: 'You',
thumbnailUrl: '',
nonCommercial: false,
engine: ClapWorkflowEngine.COMFYUI_WORKFLOW,
provider: ClapWorkflowProvider.COMFYUI,
category: ClapWorkflowCategory.MUSIC_GENERATION,
data: settings.comfyWorkflowForMusic,
schema: '',
inputFields: [genericPrompt],
inputValues: {
[genericPrompt.id]: genericPrompt.defaultValue,
Expand All @@ -113,10 +123,12 @@ export async function getDynamicComfyuiWorkflows(): Promise<ClapWorkflow[]> {
tags: ['custom', 'sound generation'],
author: 'You',
thumbnailUrl: '',
nonCommercial: false,
engine: ClapWorkflowEngine.COMFYUI_WORKFLOW,
provider: ClapWorkflowProvider.COMFYUI,
category: ClapWorkflowCategory.SOUND_GENERATION,
data: settings.comfyWorkflowForSound,
schema: '',
inputFields: [genericPrompt],
inputValues: {
[genericPrompt.id]: genericPrompt.defaultValue,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ export const elevenlabsWorkflows: ClapWorkflow[] = [
tags: ['TTS'],
author: 'ElevenLabs',
thumbnailUrl: '',
nonCommercial: false,
engine: ClapWorkflowEngine.REST_API,
provider: ClapWorkflowProvider.ELEVENLABS,
category: ClapWorkflowCategory.VOICE_GENERATION,
data: 'v1/text-to-speech',
schema: '',
/**
* Inputs of the workflow (this is used to build an UI for the automatically)
*/
Expand All @@ -37,10 +39,12 @@ export const elevenlabsWorkflows: ClapWorkflow[] = [
tags: ['sound'],
author: 'ElevenLabs',
thumbnailUrl: '',
nonCommercial: false,
engine: ClapWorkflowEngine.REST_API,
provider: ClapWorkflowProvider.ELEVENLABS,
category: ClapWorkflowCategory.SOUND_GENERATION,
data: 'v1/sound-generation',
schema: '',
/**
* Inputs of the workflow (this is used to build an UI for the automatically)
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,12 @@ export const defaultWorkflows: ClapWorkflow[] = [
tags: ['video'],
author: '',
thumbnailUrl: '',
nonCommercial: false,
engine: ClapWorkflowEngine.REST_API,
provider: ClapWorkflowProvider.FALAI,
category: ClapWorkflowCategory.VIDEO_GENERATION,
data: 'fal-ai/stable-video',
schema: '',
inputFields: [
genericImageUrl,
genericSeed,
Expand All @@ -70,10 +72,12 @@ export const defaultWorkflows: ClapWorkflow[] = [
tags: ['flux', 'LoRA', 'realism'],
author: '',
thumbnailUrl: '',
nonCommercial: false,
engine: ClapWorkflowEngine.REST_API,
provider: ClapWorkflowProvider.FALAI,
category: ClapWorkflowCategory.IMAGE_GENERATION,
data: 'fal-ai/flux-realism',
schema: '',
/**
* Inputs of the workflow (this is used to build an UI for the automatically)
*/
Expand All @@ -97,10 +101,12 @@ export const defaultWorkflows: ClapWorkflow[] = [
tags: ['flux'],
author: 'BFL (https://BlackForestLabs.ai)',
thumbnailUrl: '',
nonCommercial: false,
engine: ClapWorkflowEngine.REST_API,
provider: ClapWorkflowProvider.FALAI,
category: ClapWorkflowCategory.IMAGE_GENERATION,
data: 'fal-ai/flux-pro',
schema: '',
/**
* Inputs of the workflow (this is used to build an UI for the automatically)
*/
Expand All @@ -126,10 +132,12 @@ export const defaultWorkflows: ClapWorkflow[] = [
tags: ['flux'],
author: 'BFL (https://BlackForestLabs.ai)',
thumbnailUrl: '',
nonCommercial: false,
engine: ClapWorkflowEngine.REST_API,
provider: ClapWorkflowProvider.FALAI,
category: ClapWorkflowCategory.IMAGE_GENERATION,
data: 'fal-ai/flux-schnell',
schema: '',
inputFields: [genericPrompt, genericWidth2048, genericHeight2048],
inputValues: {
prompt: genericPrompt.defaultValue,
Expand All @@ -144,10 +152,12 @@ export const defaultWorkflows: ClapWorkflow[] = [
tags: ['flux'],
author: 'BFL (https://BlackForestLabs.ai)',
thumbnailUrl: '',
nonCommercial: false,
engine: ClapWorkflowEngine.REST_API,
provider: ClapWorkflowProvider.FALAI,
category: ClapWorkflowCategory.IMAGE_GENERATION,
data: 'fal-ai/flux-dev',
schema: '',
/**
* Inputs of the workflow (this is used to build an UI for the automatically)
*/
Expand All @@ -173,10 +183,12 @@ export const defaultWorkflows: ClapWorkflow[] = [
tags: ['SD3'],
author: 'Stability AI',
thumbnailUrl: '',
nonCommercial: false,
engine: ClapWorkflowEngine.REST_API,
provider: ClapWorkflowProvider.FALAI,
category: ClapWorkflowCategory.IMAGE_GENERATION,
data: 'fal-ai/fast-sdxl',
schema: '',
/**
* Inputs of the workflow (this is used to build an UI for the automatically)
*/
Expand All @@ -202,10 +214,12 @@ export const defaultWorkflows: ClapWorkflow[] = [
tags: ['SD3'],
author: 'Stability AI',
thumbnailUrl: '',
nonCommercial: false,
engine: ClapWorkflowEngine.REST_API,
provider: ClapWorkflowProvider.FALAI,
category: ClapWorkflowCategory.IMAGE_GENERATION,
data: 'fal-ai/stable-diffusion-v3-medium',
schema: '',
/**
* Inputs of the workflow (this is used to build an UI for the automatically)
*/
Expand All @@ -231,10 +245,12 @@ export const defaultWorkflows: ClapWorkflow[] = [
tags: ['upscaling'],
author: 'AuraSR',
thumbnailUrl: '',
nonCommercial: false,
engine: ClapWorkflowEngine.REST_API,
provider: ClapWorkflowProvider.FALAI,
category: ClapWorkflowCategory.IMAGE_UPSCALING,
data: 'fal-ai/aura-sr',
schema: '',
inputFields: [
genericImageUrl,
genericUpscalingFactor,
Expand Down
2 changes: 2 additions & 0 deletions packages/clap/src/factories/newWorkflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ export function newWorkflow(maybeWorkflow?: Partial<ClapWorkflow>) {
tags: Array.isArray(maybeWorkflow?.tags) ? maybeWorkflow?.tags : [],
author: typeof maybeWorkflow?.author === "string" ? maybeWorkflow.author : "",
thumbnailUrl: typeof maybeWorkflow?.thumbnailUrl === "string" ? maybeWorkflow.thumbnailUrl : "",
nonCommercial: !!maybeWorkflow?.nonCommercial,
engine: parseWorkflowEngine(maybeWorkflow?.engine, ClapWorkflowEngine.DEFAULT),
category: parseWorkflowCategory(maybeWorkflow?.category, ClapWorkflowCategory.IMAGE_GENERATION),
provider: parseWorkflowProvider(maybeWorkflow?.provider, ClapWorkflowProvider.NONE),
data: typeof maybeWorkflow?.data === "string" ? maybeWorkflow.data : "",
schema: typeof maybeWorkflow?.schema === "string" ? maybeWorkflow.schema : "",
inputFields: Array.isArray(maybeWorkflow?.inputFields) ? maybeWorkflow.inputFields : [],
inputValues: typeof maybeWorkflow?.inputValues === "object" ? maybeWorkflow.inputValues : {},
}
Expand Down
Loading

0 comments on commit 493ad11

Please sign in to comment.