Skip to content

Commit

Permalink
Merge branch 'develop' into feat/live-monorepo-types
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanleecode authored Dec 23, 2024
2 parents b4e35a4 + 8a0c051 commit d451b60
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
11 changes: 8 additions & 3 deletions packages/core/src/generation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -935,6 +935,8 @@ export const generateImage = async (
seed?: number;
modelId?: string;
jobId?: string;
stylePreset?: string;
hideWatermark?: boolean;
},
runtime: IAgentRuntime
): Promise<{
Expand Down Expand Up @@ -1121,9 +1123,12 @@ export const generateImage = async (
model: data.modelId || "fluently-xl",
prompt: data.prompt,
negative_prompt: data.negativePrompt,
width: data.width || 1024,
height: data.height || 1024,
steps: data.numIterations || 20,
width: data.width,
height: data.height,
steps: data.numIterations,
seed: data.seed,
style_preset: data.stylePreset,
hide_watermark: data.hideWatermark,
}),
}
);
Expand Down
2 changes: 2 additions & 0 deletions packages/core/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,8 @@ export type Character = {
modelId?: string;
jobId?: string;
count?: number;
stylePreset?: string;
hideWatermark?: boolean;
};
voice?: {
model?: string; // For VITS
Expand Down
4 changes: 4 additions & 0 deletions packages/plugin-image-generation/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ const imageGeneration: Action = {
seed?: number;
modelId?: string;
jobId?: string;
stylePreset?: string;
hideWatermark?: boolean;
},
callback: HandlerCallback
) => {
Expand Down Expand Up @@ -140,6 +142,8 @@ const imageGeneration: Action = {
...(options.seed != null || imageSettings.seed != null ? { seed: options.seed || imageSettings.seed } : {}),
...(options.modelId != null || imageSettings.modelId != null ? { modelId: options.modelId || imageSettings.modelId } : {}),
...(options.jobId != null || imageSettings.jobId != null ? { jobId: options.jobId || imageSettings.jobId } : {}),
...(options.stylePreset != null || imageSettings.stylePreset != null ? { stylePreset: options.stylePreset || imageSettings.stylePreset } : {}),
...(options.hideWatermark != null || imageSettings.hideWatermark != null ? { hideWatermark: options.hideWatermark || imageSettings.hideWatermark } : {}),
},
runtime
);
Expand Down

0 comments on commit d451b60

Please sign in to comment.