Skip to content

Commit 67eba95

Browse files
committed
feat: builder — default florence2 step config + load-time migration
1 parent 37a7b6a commit 67eba95

1 file changed

Lines changed: 23 additions & 1 deletion

File tree

web/conf_builder/conf-builder-config-management.js

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5387,6 +5387,26 @@ export function renderConfigPromptsSection(node, div, configArray, arrayIdx) {
53875387
// UPSCALING SETTINGS (Session-level, pipeline-based with sequential steps)
53885388
// ============================================================================
53895389

5390+
// Default Florence2 Hi-Res Fix options
5391+
function createDefaultFlorence2Options() {
5392+
return {
5393+
model: "microsoft/Florence-2-base",
5394+
text_input: "face",
5395+
output_mask_select: "",
5396+
target_megapixels: 1.0,
5397+
crop_padding: 64,
5398+
min_crop_resolution: 256,
5399+
max_crop_resolution: 1536,
5400+
grow_expand: 32,
5401+
feather_left: 128,
5402+
feather_top: 128,
5403+
feather_right: 128,
5404+
feather_bottom: 128,
5405+
model_source: "from_manifest",
5406+
on_no_detection: "skip"
5407+
};
5408+
}
5409+
53905410
// Default SeedVR2 options — matches SeedVR2 node defaults
53915411
function createDefaultSeedVR2Options() {
53925412
return {
@@ -5436,7 +5456,8 @@ function createDefaultStep() {
54365456
hires_mask_blur: 8,
54375457
hires_tile_padding: 32,
54385458
hires_force_uniform_tiles: false,
5439-
seedvr2: createDefaultSeedVR2Options()
5459+
seedvr2: createDefaultSeedVR2Options(),
5460+
florence2: createDefaultFlorence2Options()
54405461
};
54415462
}
54425463

@@ -5456,6 +5477,7 @@ function ensureStepFields(step) {
54565477
if (!step.hires_tile_padding) step.hires_tile_padding = 32;
54575478
if (step.hires_force_uniform_tiles === undefined) step.hires_force_uniform_tiles = false;
54585479
if (!step.seedvr2) step.seedvr2 = createDefaultSeedVR2Options();
5480+
if (!step.florence2) step.florence2 = createDefaultFlorence2Options();
54595481
}
54605482

54615483
export function renderUpscalingSection(node, container, modelLists) {

0 commit comments

Comments
 (0)