Skip to content

Commit

Permalink
fix: diff real/fake not needed + cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
beniz committed Sep 11, 2024
1 parent 92ad57d commit 5cbd1f0
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions models/cut_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,10 +260,6 @@ def __init__(self, opt, rank):
self.opt.model_input_nc += self.opt.train_mm_nz
self.netG_A = gan_networks.define_G(**vars(opt))

# XXX: early prompt support
# if self.opt.G_prompt:
# self.netG_A.prompt = self.opt.G_prompt

self.netG_A.lora_rank_unet = self.opt.G_lora_unet
self.netG_A.lora_rank_vae = self.opt.G_lora_vae

Expand Down Expand Up @@ -337,7 +333,6 @@ def __init__(self, opt, rank):
+ list(self.netG_A.vae.decoder.skip_conv_3.parameters())
+ list(self.netG_A.vae.decoder.skip_conv_4.parameters())
)
# print("layers_to_opt", len(layers_to_opt))

self.optimizer_G = opt.optim(
opt,
Expand Down Expand Up @@ -666,7 +661,8 @@ def forward_cut(self):
gaussian(getattr(self, name + context), self.opt.dataaug_D_noise),
)

self.diff_real_A_fake_B = self.real_A - self.fake_B
if self.opt.output_display_diff_fake_real:
self.diff_real_A_fake_B = self.real_A - self.fake_B

if self.opt.model_multimodal:
self.mu2 = self.netE(self.fake_B)
Expand Down

0 comments on commit 5cbd1f0

Please sign in to comment.