ugcinc 4.5.8 → 4.5.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { TextValue, ImageValue } from '../types';
|
|
2
2
|
import { type OutputMode, type SelectionMode } from './types';
|
|
3
3
|
export interface GenerateImageNodeInputs {
|
|
4
|
-
|
|
4
|
+
/** Only present when promptIsVariable is true */
|
|
5
|
+
prompt?: TextValue;
|
|
5
6
|
/** Only present when using an edit model */
|
|
6
7
|
image?: ImageValue;
|
|
7
8
|
}
|
|
@@ -29,6 +30,8 @@ declare const definition: import("./types").NodeDefinition<"generate-image", "ge
|
|
|
29
30
|
model: ImageGenerationModel;
|
|
30
31
|
aspectRatio: string;
|
|
31
32
|
numImages: number;
|
|
33
|
+
prompt: string;
|
|
34
|
+
promptIsVariable: boolean;
|
|
32
35
|
outputMode: OutputMode;
|
|
33
36
|
selectionMode: SelectionMode | null;
|
|
34
37
|
}, GenerateImageNodeInputs, GenerateImageNodeOutputs, false>;
|
|
@@ -47,14 +47,18 @@ const definition = (0, types_1.defineNode)({
|
|
|
47
47
|
model: 'fal-ai/nano-banana',
|
|
48
48
|
aspectRatio: '1:1',
|
|
49
49
|
numImages: 1,
|
|
50
|
+
prompt: '',
|
|
51
|
+
promptIsVariable: false,
|
|
50
52
|
outputMode: 'per-input',
|
|
51
53
|
selectionMode: null,
|
|
52
54
|
},
|
|
53
55
|
computePorts: ({ config }) => {
|
|
54
56
|
const model = (config?.model ?? 'fal-ai/nano-banana');
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
-
|
|
57
|
+
const promptIsVariable = config?.promptIsVariable ?? false;
|
|
58
|
+
const inputs = [];
|
|
59
|
+
if (promptIsVariable) {
|
|
60
|
+
inputs.push({ id: 'prompt', type: 'text', isArray: false, required: true });
|
|
61
|
+
}
|
|
58
62
|
if (isEditModel(model)) {
|
|
59
63
|
inputs.push({ id: 'image', type: 'image', isArray: false, required: true });
|
|
60
64
|
}
|
|
@@ -160,6 +160,8 @@ export declare const nodeDefinitions: {
|
|
|
160
160
|
model: import("./generate-image").ImageGenerationModel;
|
|
161
161
|
aspectRatio: string;
|
|
162
162
|
numImages: number;
|
|
163
|
+
prompt: string;
|
|
164
|
+
promptIsVariable: boolean;
|
|
163
165
|
outputMode: import("./types").OutputMode;
|
|
164
166
|
selectionMode: import("./types").SelectionMode | null;
|
|
165
167
|
}, import("./generate-image").GenerateImageNodeInputs, import("./generate-image").GenerateImageNodeOutputs, false> & {
|
|
@@ -173,7 +173,7 @@ function RGBAShiftOverlay({ src, srcType }) {
|
|
|
173
173
|
const mediaStyle = {
|
|
174
174
|
width: '100%',
|
|
175
175
|
height: '100%',
|
|
176
|
-
objectFit: '
|
|
176
|
+
objectFit: 'contain',
|
|
177
177
|
};
|
|
178
178
|
const MediaElement = srcType === 'video'
|
|
179
179
|
? () => (0, jsx_runtime_1.jsx)(remotion_1.Video, { src: src, style: mediaStyle })
|
|
@@ -305,7 +305,7 @@ function DeduplicationPreview({ src, srcType, config, }) {
|
|
|
305
305
|
const mediaStyle = {
|
|
306
306
|
width: '100%',
|
|
307
307
|
height: '100%',
|
|
308
|
-
objectFit: '
|
|
308
|
+
objectFit: 'contain',
|
|
309
309
|
};
|
|
310
310
|
return ((0, jsx_runtime_1.jsxs)(remotion_1.AbsoluteFill, { style: { backgroundColor: '#000000' }, children: [(0, jsx_runtime_1.jsx)("div", { style: {
|
|
311
311
|
position: 'absolute',
|