cleanup locations. make treasure bold. try to add some flair to the images
This commit is contained in:
@@ -8,13 +8,24 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
const COMFYUI_URL = process.env.COMFYUI_URL || "http://localhost:8188";
|
||||
|
||||
// Drawing style prefix
|
||||
const STYLE_PREFIX = `clean line art, minimalist sketch, concept art sketch, black and white line drawing, lots of white space, sparse shading, very minimal shading, simple black hatching, very low detail, single accent color`;
|
||||
const STYLE_PREFIX = `clean line art, minimalist sketch, concept art, black and white line drawing, lots of white space, sparse shading, simple black hatching, very low detail`;
|
||||
|
||||
const ACCENT_COLORS = ["red", "blue", "yellow", "green", "purple", "orange"];
|
||||
|
||||
function selectRandomAccentColor() {
|
||||
return ACCENT_COLORS[Math.floor(Math.random() * ACCENT_COLORS.length)];
|
||||
}
|
||||
|
||||
async function upscaleImage(inputPath, outputPath, width, height) {
|
||||
try {
|
||||
await sharp(inputPath)
|
||||
.resize(width, height, { kernel: 'lanczos3' })
|
||||
.sharpen()
|
||||
.blur(0.3)
|
||||
.sharpen({
|
||||
sigma: 1,
|
||||
flat: 1,
|
||||
jagged: 2,
|
||||
})
|
||||
.png({
|
||||
compressionLevel: 9,
|
||||
adaptiveFiltering: true,
|
||||
@@ -54,7 +65,9 @@ Output:`,
|
||||
"gemma3n:e4b", 3, "Generate Visual Prompt"
|
||||
);
|
||||
|
||||
return `${STYLE_PREFIX}, ${rawPrompt.trim().replace(/\n/g, " ")}`;
|
||||
const accentColor = selectRandomAccentColor();
|
||||
|
||||
return `${STYLE_PREFIX}, on white paper, monochrome with a single accent of ${accentColor}, ${rawPrompt.trim().replace(/\n/g, " ")}`;
|
||||
}
|
||||
|
||||
// 2. Save image buffer
|
||||
|
||||
Reference in New Issue
Block a user