File tree Expand file tree Collapse file tree 4 files changed +27
-5
lines changed
npm-packages/cli/source/components/commands Expand file tree Collapse file tree 4 files changed +27
-5
lines changed Original file line number Diff line number Diff line change @@ -95,6 +95,12 @@ export default function Create({cli}: {cli: Result<Flags>}) {
9595 fs . rmSync ( githubDirPath , { recursive : true , force : true } ) ;
9696 }
9797
98+ // Remove LICENSE file
99+ const licenseFilePath = path . join ( process . cwd ( ) , name , 'LICENSE' ) ;
100+ if ( fs . existsSync ( licenseFilePath ) ) {
101+ fs . rmSync ( licenseFilePath , { force : true } ) ;
102+ }
103+
98104 setMessage (
99105 < Box >
100106 < Spinner type = "dots" />
Original file line number Diff line number Diff line change @@ -145,7 +145,11 @@ export function getImageGenModel(
145145 console . log ( { prediction : prediction } ) ;
146146 }
147147
148- const imgUrl = prediction . output [ prediction . output . length - 1 ] ;
148+ // Get the last output if output is an array, else if it is string get the output directly
149+ const imgUrl =
150+ typeof prediction . output === "string"
151+ ? prediction . output
152+ : prediction . output [ prediction . output . length - 1 ] ;
149153
150154 const arrayBuffer = await fetch ( imgUrl ) . then ( ( res ) => res . arrayBuffer ( ) ) ;
151155
Original file line number Diff line number Diff line change @@ -13,6 +13,14 @@ export const imageGenProviderOptions: {
1313 model : "black-forest-labs/flux-schnell" ,
1414 isSupported : true ,
1515 } ,
16+ {
17+ model : "black-forest-labs/flux-1.1-pro" ,
18+ isSupported : true ,
19+ } ,
20+ {
21+ model : "black-forest-labs/flux-1.1-pro-ultra" ,
22+ isSupported : true ,
23+ } ,
1624 ] ,
1725 } ,
1826} ;
Original file line number Diff line number Diff line change @@ -174,14 +174,18 @@ export function getVideoGenModel(
174174 console . log ( { prediction : prediction } ) ;
175175 }
176176
177- const imgUrl = prediction . output ;
177+ const videoUrl =
178+ typeof prediction . output === "string"
179+ ? prediction . output
180+ : prediction . output [ prediction . output . length - 1 ] ;
178181
179- console . log ( "Video URL:" , imgUrl ) ;
180182
181- const arrayBuffer = await fetch ( imgUrl ) . then ( ( res ) => res . arrayBuffer ( ) ) ;
183+ console . log ( "Video URL:" , videoUrl ) ;
184+
185+ const arrayBuffer = await fetch ( videoUrl ) . then ( ( res ) => res . arrayBuffer ( ) ) ;
182186
183187 return {
184- url : imgUrl ,
188+ url : videoUrl ,
185189 arrayBuffer : arrayBuffer ,
186190 } ;
187191 }
You can’t perform that action at this time.
0 commit comments