Skip to content

Commit 8a0c051

Browse files
authored
Merge pull request elizaOS#1410 from proteanx/veniceImgFeats
feat: add venice style presets & option to remove watermark (image generation)
2 parents c735ef7 + eda9d18 commit 8a0c051

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

packages/core/src/generation.ts

+8-3
Original file line numberDiff line numberDiff line change
@@ -935,6 +935,8 @@ export const generateImage = async (
935935
seed?: number;
936936
modelId?: string;
937937
jobId?: string;
938+
stylePreset?: string;
939+
hideWatermark?: boolean;
938940
},
939941
runtime: IAgentRuntime
940942
): Promise<{
@@ -1121,9 +1123,12 @@ export const generateImage = async (
11211123
model: data.modelId || "fluently-xl",
11221124
prompt: data.prompt,
11231125
negative_prompt: data.negativePrompt,
1124-
width: data.width || 1024,
1125-
height: data.height || 1024,
1126-
steps: data.numIterations || 20,
1126+
width: data.width,
1127+
height: data.height,
1128+
steps: data.numIterations,
1129+
seed: data.seed,
1130+
style_preset: data.stylePreset,
1131+
hide_watermark: data.hideWatermark,
11271132
}),
11281133
}
11291134
);

packages/core/src/types.ts

+2
Original file line numberDiff line numberDiff line change
@@ -718,6 +718,8 @@ export type Character = {
718718
modelId?: string;
719719
jobId?: string;
720720
count?: number;
721+
stylePreset?: string;
722+
hideWatermark?: boolean;
721723
};
722724
voice?: {
723725
model?: string; // For VITS

packages/plugin-image-generation/src/index.ts

+4
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ const imageGeneration: Action = {
109109
seed?: number;
110110
modelId?: string;
111111
jobId?: string;
112+
stylePreset?: string;
113+
hideWatermark?: boolean;
112114
},
113115
callback: HandlerCallback
114116
) => {
@@ -140,6 +142,8 @@ const imageGeneration: Action = {
140142
...(options.seed != null || imageSettings.seed != null ? { seed: options.seed || imageSettings.seed } : {}),
141143
...(options.modelId != null || imageSettings.modelId != null ? { modelId: options.modelId || imageSettings.modelId } : {}),
142144
...(options.jobId != null || imageSettings.jobId != null ? { jobId: options.jobId || imageSettings.jobId } : {}),
145+
...(options.stylePreset != null || imageSettings.stylePreset != null ? { stylePreset: options.stylePreset || imageSettings.stylePreset } : {}),
146+
...(options.hideWatermark != null || imageSettings.hideWatermark != null ? { hideWatermark: options.hideWatermark || imageSettings.hideWatermark } : {}),
143147
},
144148
runtime
145149
);

0 commit comments

Comments
 (0)