File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -345,7 +345,7 @@ export default function ProductImageGenerator({
345345 { /* <p className="text-sm text-muted-foreground">
346346 Powered by{" "}
347347 <span className="font-medium text-primary">Trigger.dev</span> and{" "}
348- <span className="font-medium text-primary">Flux AI</span>
348+
349349 </p> */ }
350350 </ div >
351351 </ div >
Original file line number Diff line number Diff line change @@ -41,8 +41,6 @@ export async function triggerGenerationTask(payload: {
4141 baseImageUrl : string ;
4242 productAnalysis : ProductAnalysis ;
4343 customPrompt ?: string ;
44- model ?: "flux" ;
45- size ?: "1024x1792" ;
4644} ) {
4745 try {
4846 const handle = await tasks . trigger < typeof generateAndUploadImage > (
Original file line number Diff line number Diff line change @@ -17,13 +17,6 @@ import { triggerGenerationTask } from "../actions";
1717import type { generateAndUploadImage } from "../../src/trigger/generate-and-upload-image" ;
1818import type { ProductAnalysis } from "../types/trigger" ;
1919
20- type TaskRun = {
21- id ?: string ;
22- status ?: string ;
23- output ?: unknown ;
24- metadata ?: unknown ;
25- } ;
26-
2720interface GeneratedCardProps {
2821 baseImageUrl : string | null ;
2922 productAnalysis : ProductAnalysis | null ;
@@ -78,7 +71,6 @@ export default function GeneratedCard({
7871 promptStyle : promptId ,
7972 baseImageUrl,
8073 productAnalysis,
81- size : "1024x1792" ,
8274 } ) ;
8375
8476 if ( result . success ) {
@@ -186,7 +178,7 @@ export default function GeneratedCard({
186178 < div className = "absolute inset-0 bg-black/50 flex items-center justify-center backdrop-blur-sm" >
187179 < div className = "flex flex-col items-center gap-2" >
188180 < div className = "w-8 h-8 rounded-full flex items-center justify-center mb-4 transition-colors " >
189- < div className = "animate-spin rounded-full h-6 w-6" >
181+ < div className = "animate-spin h-6 w-6" >
190182 < Loader2 className = "h-6 w-6 text-gray-500" />
191183 </ div >
192184 </ div >
Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ const s3Client = new S3Client({
1515 } ,
1616} ) ;
1717
18+ const aiModel = "black-forest-labs/flux-dev" ;
19+
1820export const generateAndUploadImage = task ( {
1921 id : "generate-and-upload-image" ,
2022 maxDuration : 600 , // 10 minutes max
@@ -47,7 +49,7 @@ export const generateAndUploadImage = task({
4749 baseImageUrl,
4850 productAnalysis,
4951 customPrompt,
50- model = "flux" ,
52+ model = aiModel ,
5153 size = "1024x1792" ,
5254 strength = 0.2 ,
5355 guidance = 7 , // From your settings
@@ -127,7 +129,7 @@ export const generateAndUploadImage = task({
127129
128130 // Use Flux with structured prompt
129131 const generateParams : any = {
130- model : replicate . image ( "black-forest-labs/flux-dev" ) ,
132+ model : replicate . image ( aiModel ) ,
131133 prompt : enhancedPrompt ,
132134 image : baseImageUrl , // Reference image for img2img
133135 width : parseInt ( size . split ( "x" ) [ 0 ] ) ,
You can’t perform that action at this time.
0 commit comments