feat: try to make sure the portraits are sharp

This commit is contained in:
max_richter 2023-11-20 13:58:25 +01:00
parent ef0ced88dc
commit e824e16f9d

View File

@ -51,12 +51,12 @@ export const POST: RequestHandler = async ({ params, request }) => {
const { hairType, hairColor, hairLength, skinColor, name } = await request.json(); const { hairType, hairColor, hairLength, skinColor, name } = await request.json();
console.log(`[AI] Generating image for ${inputName} ${JSON.stringify({ hairType, hairColor, hairLength, skinColor, name })}`) console.log(`[AI] Generating image for ${inputName} ${JSON.stringify({ hairType, hairColor, hairLength, skinColor, inputName })}`)
if (!hairType || !hairColor || !hairLength) { if (!hairType || !hairColor || !hairLength) {
throw new Error("Missing hairType, hairColor or hairLength"); throw new Error("Missing hairType, hairColor or hairLength");
} }
const prompt = `realistic portrait oil painting of a masked ${inputName}, baroque, in the style of Charles Vess, masked ball attire, opulence, mystery, elegance, ${hairLength} ${hairType} ${hairColor} hair, ${skinColor} skin`; const prompt = `realistic sharp portrait oil painting of a masked ${inputName}, baroque, in the style of Charles Vess, masked ball attire, opulence, mystery, elegance, ${hairLength} ${hairType} ${hairColor} hair, ${skinColor} skin`;
const negativePrompt = "blurry, multiple persons, picture frame" const negativePrompt = "blurry, multiple persons, picture frame"
const a = performance.now() const a = performance.now()