fix: simplify PuLID ID extraction setup (#1664)

This commit is contained in:
leejet
2026-06-15 23:55:38 +08:00
committed by GitHub
parent 93527fda74
commit 146b6cc49e
10 changed files with 85 additions and 257 deletions

View File

@@ -417,7 +417,7 @@ ArgOptions SDContextParams::get_options() {
&photo_maker_path},
{"",
"--pulid-weights",
"path to PuLID flux weights (e.g. pulid_flux_v0.9.1.safetensors). Identity is injected during the denoise loop when paired with --pulid-id-embedding.",
"path to PuLID Flux weights",
&pulid_weights_path},
{"",
"--upscale-model",
@@ -894,7 +894,7 @@ ArgOptions SDGenerationParams::get_options() {
&pm_id_embed_path},
{"",
"--pulid-id-embedding",
"path to a .pulidembd binary produced by pulid_extract_id.py. Carries a (32, 2048) identity embedding extracted from a source portrait. Pair with --pulid-weights on the context.",
"path to PuLID id embedding",
&pulid_id_embedding_path},
{"",
"--hires-upscaler",
@@ -1048,7 +1048,7 @@ ArgOptions SDGenerationParams::get_options() {
&pm_style_strength},
{"",
"--pulid-id-weight",
"strength of PuLID identity injection (default: 1.0). 0.7-1.2 are typical; lower lets the prompt override the face more, higher tightens identity match.",
"strength of PuLID identity injection",
&pulid_id_weight},
{"",
"--control-strength",

View File

@@ -133,10 +133,6 @@ struct SDContextParams {
std::string control_net_path;
std::string embedding_dir;
std::string photo_maker_path;
// PuLID-Flux identity-preservation context path: the safetensors blob
// carrying the PerceiverAttentionCA cross-attention weights. Loaded
// once with the model. Per-generation pulid_id_embedding_path lives in
// SDGenerationParams below.
std::string pulid_weights_path;
sd_type_t wtype = SD_TYPE_COUNT;
std::string tensor_type_rules;
@@ -239,9 +235,6 @@ struct SDGenerationParams {
std::string pm_id_embed_path;
float pm_style_strength = 20.f;
// PuLID-Flux: per-generation identity embedding (binary file produced by
// runtime-scripts/pulid_extract_id.py). Format documented in
// include/stable-diffusion.h sd_pulid_params_t.
std::string pulid_id_embedding_path;
float pulid_id_weight = 1.0f;