File tree 4 files changed +10
-5
lines changed
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() {
1539
1539
}
1540
1540
}
1541
1541
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 ;
1543
1543
if (is_xl) {
1544
1544
if (is_inpaint) {
1545
1545
return VERSION_SDXL_INPAINT;
1546
1546
}
1547
+ if (is_ip2p) {
1548
+ return VERSION_SDXL_PIX2PIX;
1549
+ }
1547
1550
return VERSION_SDXL;
1548
1551
}
1549
1552
@@ -1559,7 +1562,7 @@ SDVersion ModelLoader::get_sd_version() {
1559
1562
if (is_inpaint) {
1560
1563
return VERSION_SD1_INPAINT;
1561
1564
}
1562
- if (is_ip2p) {
1565
+ if (is_ip2p) {
1563
1566
return VERSION_SD1_PIX2PIX;
1564
1567
}
1565
1568
return VERSION_SD1;
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ enum SDVersion {
26
26
VERSION_SD2_INPAINT,
27
27
VERSION_SDXL,
28
28
VERSION_SDXL_INPAINT,
29
+ VERSION_SDXL_PIX2PIX,
29
30
VERSION_SVD,
30
31
VERSION_SD3,
31
32
VERSION_FLUX,
@@ -62,7 +63,7 @@ static inline bool sd_version_is_sd2(SDVersion version) {
62
63
}
63
64
64
65
static 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 ) {
66
67
return true ;
67
68
}
68
69
return false ;
@@ -83,7 +84,7 @@ static inline bool sd_version_is_dit(SDVersion version) {
83
84
}
84
85
85
86
static inline bool sd_version_is_edit (SDVersion version) {
86
- return version == VERSION_SD1_PIX2PIX;
87
+ return version == VERSION_SD1_PIX2PIX || version == VERSION_SDXL_PIX2PIX ;
87
88
}
88
89
89
90
static 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[] = {
32
32
" SD 2.x Inpaint" ,
33
33
" SDXL" ,
34
34
" SDXL Inpaint" ,
35
+ " SDXL Instruct-Pix2Pix" ,
35
36
" SVD" ,
36
37
" SD3.x" ,
37
38
" Flux" ,
Original file line number Diff line number Diff line change @@ -207,7 +207,7 @@ class UnetModelBlock : public GGMLBlock {
207
207
}
208
208
if (sd_version_is_inpaint (version)) {
209
209
in_channels = 9 ;
210
- } else if (version == VERSION_SD1_PIX2PIX ) {
210
+ } else if (sd_version_is_edit ( version) ) {
211
211
in_channels = 8 ;
212
212
}
213
213
You can’t perform that action at this time.
0 commit comments