ThePioneer commited on
Commit
b504b18
·
1 Parent(s): 8992f47

Added some comments.

Browse files
Files changed (1) hide show
  1. extras.py +3 -0
extras.py CHANGED
@@ -1,3 +1,5 @@
 
 
1
  from __future__ import annotations
2
  import math
3
  import os
@@ -396,6 +398,7 @@ def run_modelmerger(id_task, primary_model_name, secondary_model_name, tertiary_
396
  # this enables merging an inpainting model (A) with another one (B);
397
  # where normal model would have 4 channels, for latenst space, inpainting model would
398
  # have another 4 channels for unmasked picture's latent space, plus one channel for mask, for a total of 9
 
399
  if a.shape != b.shape: #and a.shape[0:1] + a.shape[2:] == b.shape[0:1] + b.shape[2:]:
400
  theta_0[key] = a # just let it go as it is on size mismatch
401
  #if a.shape[1] == 4 and b.shape[1] == 9:
 
1
+ # A script that enables merging SD 1.x based models to SD 2.x based models. Replace the same file of WebUI, which should be located at the modules folder.
2
+
3
  from __future__ import annotations
4
  import math
5
  import os
 
398
  # this enables merging an inpainting model (A) with another one (B);
399
  # where normal model would have 4 channels, for latenst space, inpainting model would
400
  # have another 4 channels for unmasked picture's latent space, plus one channel for mask, for a total of 9
401
+ # Note: I will keep the original code as a comment so that you can turn it back on whenever necessary.
402
  if a.shape != b.shape: #and a.shape[0:1] + a.shape[2:] == b.shape[0:1] + b.shape[2:]:
403
  theta_0[key] = a # just let it go as it is on size mismatch
404
  #if a.shape[1] == 4 and b.shape[1] == 9: