ironjr commited on
Commit
2ffb19d
1 Parent(s): 1856601

Update model.py

Browse files
Files changed (1) hide show
  1. model.py +7 -7
model.py CHANGED
@@ -143,12 +143,12 @@ class StreamMultiDiffusion(nn.Module):
143
  self.pipe = load_model(model_key, self.sd_version, self.device, self.dtype).to(dtype=self.dtype)
144
 
145
  self.pipe.load_lora_weights(lora_key, weight_name=lora_weight_name, adapter_name='lcm')
146
- self.pipe.fuse_lora(
147
- fuse_unet=True,
148
- fuse_text_encoder=True,
149
- lora_scale=1.0,
150
- safe_fusing=False,
151
- )
152
  self.pipe.to(device=self.device, dtype=self.dtype)
153
  if use_xformers:
154
  self.pipe.enable_xformers_memory_efficient_attention()
@@ -1098,7 +1098,7 @@ class StreamMultiDiffusion(nn.Module):
1098
  bootstrap_latent = self.scheduler.add_noise(
1099
  self.bootstrap_latent,
1100
  self.stock_noise,
1101
- torch.tensor(self.sub_timesteps_tensor, device=self.device),
1102
  )
1103
 
1104
  x_t_latent = rearrange(x_t_latent, '(t p) c h w -> p t c h w', p=p)
 
143
  self.pipe = load_model(model_key, self.sd_version, self.device, self.dtype).to(dtype=self.dtype)
144
 
145
  self.pipe.load_lora_weights(lora_key, weight_name=lora_weight_name, adapter_name='lcm')
146
+ # self.pipe.fuse_lora(
147
+ # fuse_unet=True,
148
+ # fuse_text_encoder=True,
149
+ # lora_scale=1.0,
150
+ # safe_fusing=False,
151
+ # )
152
  self.pipe.to(device=self.device, dtype=self.dtype)
153
  if use_xformers:
154
  self.pipe.enable_xformers_memory_efficient_attention()
 
1098
  bootstrap_latent = self.scheduler.add_noise(
1099
  self.bootstrap_latent,
1100
  self.stock_noise,
1101
+ self.sub_timesteps_tensor.clone().detach().to(self.device),
1102
  )
1103
 
1104
  x_t_latent = rearrange(x_t_latent, '(t p) c h w -> p t c h w', p=p)