@@ -131,23 +131,15 @@ const imageGeneration: Action = {
131
131
const images = await generateImage (
132
132
{
133
133
prompt : imagePrompt ,
134
- width : options . width || 1024 ,
135
- height : options . height || 1024 ,
136
- ...( options . count != null ? { count : options . count || 1 } : { } ) ,
137
- ...( options . negativePrompt != null
138
- ? { negativePrompt : options . negativePrompt }
139
- : { } ) ,
140
- ...( options . numIterations != null
141
- ? { numIterations : options . numIterations }
142
- : { } ) ,
143
- ...( options . guidanceScale != null
144
- ? { guidanceScale : options . guidanceScale }
145
- : { } ) ,
146
- ...( options . seed != null ? { seed : options . seed } : { } ) ,
147
- ...( options . modelId != null
148
- ? { modelId : options . modelId }
149
- : { } ) ,
150
- ...( options . jobId != null ? { jobId : options . jobId } : { } ) ,
134
+ width : options . width || imageSettings . width || 1024 ,
135
+ height : options . height || imageSettings . height || 1024 ,
136
+ ...( options . count != null || imageSettings . count != null ? { count : options . count || imageSettings . count || 1 } : { } ) ,
137
+ ...( options . negativePrompt != null || imageSettings . negativePrompt != null ? { negativePrompt : options . negativePrompt || imageSettings . negativePrompt } : { } ) ,
138
+ ...( options . numIterations != null || imageSettings . numIterations != null ? { numIterations : options . numIterations || imageSettings . numIterations } : { } ) ,
139
+ ...( options . guidanceScale != null || imageSettings . guidanceScale != null ? { guidanceScale : options . guidanceScale || imageSettings . guidanceScale } : { } ) ,
140
+ ...( options . seed != null || imageSettings . seed != null ? { seed : options . seed || imageSettings . seed } : { } ) ,
141
+ ...( options . modelId != null || imageSettings . modelId != null ? { modelId : options . modelId || imageSettings . modelId } : { } ) ,
142
+ ...( options . jobId != null || imageSettings . jobId != null ? { jobId : options . jobId || imageSettings . jobId } : { } ) ,
151
143
} ,
152
144
runtime
153
145
) ;
0 commit comments