File tree Expand file tree Collapse file tree 4 files changed +10
-5
lines changed Expand file tree Collapse file tree 4 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -1539,11 +1539,14 @@ SDVersion ModelLoader::get_sd_version() {
15391539 }
15401540 }
15411541 bool is_inpaint = input_block_weight.ne [2 ] == 9 ;
1542- bool is_ip2p = input_block_weight.ne [2 ] == 8 ;
1542+ bool is_ip2p = input_block_weight.ne [2 ] == 8 ;
15431543 if (is_xl) {
15441544 if (is_inpaint) {
15451545 return VERSION_SDXL_INPAINT;
15461546 }
1547+ if (is_ip2p) {
1548+ return VERSION_SDXL_PIX2PIX;
1549+ }
15471550 return VERSION_SDXL;
15481551 }
15491552
@@ -1559,7 +1562,7 @@ SDVersion ModelLoader::get_sd_version() {
15591562 if (is_inpaint) {
15601563 return VERSION_SD1_INPAINT;
15611564 }
1562- if (is_ip2p) {
1565+ if (is_ip2p) {
15631566 return VERSION_SD1_PIX2PIX;
15641567 }
15651568 return VERSION_SD1;
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ enum SDVersion {
2626 VERSION_SD2_INPAINT,
2727 VERSION_SDXL,
2828 VERSION_SDXL_INPAINT,
29+ VERSION_SDXL_PIX2PIX,
2930 VERSION_SVD,
3031 VERSION_SD3,
3132 VERSION_FLUX,
@@ -62,7 +63,7 @@ static inline bool sd_version_is_sd2(SDVersion version) {
6263}
6364
6465static inline bool sd_version_is_sdxl (SDVersion version) {
65- if (version == VERSION_SDXL || version == VERSION_SDXL_INPAINT) {
66+ if (version == VERSION_SDXL || version == VERSION_SDXL_INPAINT || version == VERSION_SDXL_PIX2PIX ) {
6667 return true ;
6768 }
6869 return false ;
@@ -83,7 +84,7 @@ static inline bool sd_version_is_dit(SDVersion version) {
8384}
8485
8586static inline bool sd_version_is_edit (SDVersion version) {
86- return version == VERSION_SD1_PIX2PIX;
87+ return version == VERSION_SD1_PIX2PIX || version == VERSION_SDXL_PIX2PIX ;
8788}
8889
8990static bool sd_version_use_concat (SDVersion version) {
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ const char* model_version_to_str[] = {
3232 " SD 2.x Inpaint" ,
3333 " SDXL" ,
3434 " SDXL Inpaint" ,
35+ " SDXL Instruct-Pix2Pix" ,
3536 " SVD" ,
3637 " SD3.x" ,
3738 " Flux" ,
Original file line number Diff line number Diff line change @@ -207,7 +207,7 @@ class UnetModelBlock : public GGMLBlock {
207207 }
208208 if (sd_version_is_inpaint (version)) {
209209 in_channels = 9 ;
210- } else if (version == VERSION_SD1_PIX2PIX ) {
210+ } else if (sd_version_is_edit ( version) ) {
211211 in_channels = 8 ;
212212 }
213213
You can’t perform that action at this time.
0 commit comments