robhen commited on
Commit
24c7a83
·
1 Parent(s): bd2c038

Update model.py

Browse files
Files changed (1) hide show
  1. model.py +3 -2
model.py CHANGED
@@ -1,7 +1,7 @@
1
  from enum import Enum
2
  import gc
3
  import numpy as np
4
- import tomesd
5
  import torch
6
 
7
  from diffusers import StableDiffusionInstructPix2PixPipeline, StableDiffusionControlNetPipeline, ControlNetModel, UNet2DConditionModel
@@ -86,12 +86,13 @@ class Model:
86
  def inference(self, split_to_chunks=False, chunk_size=8, **kwargs):
87
  if not hasattr(self, "pipe") or self.pipe is None:
88
  return
89
-
90
  if "merging_ratio" in kwargs:
91
  merging_ratio = kwargs.pop("merging_ratio")
92
 
93
  # if merging_ratio > 0:
94
  tomesd.apply_patch(self.pipe, ratio=merging_ratio)
 
95
  seed = kwargs.pop('seed', 0)
96
  if seed < 0:
97
  seed = self.generator.seed()
 
1
  from enum import Enum
2
  import gc
3
  import numpy as np
4
+ #import tomesd
5
  import torch
6
 
7
  from diffusers import StableDiffusionInstructPix2PixPipeline, StableDiffusionControlNetPipeline, ControlNetModel, UNet2DConditionModel
 
86
  def inference(self, split_to_chunks=False, chunk_size=8, **kwargs):
87
  if not hasattr(self, "pipe") or self.pipe is None:
88
  return
89
+ '''
90
  if "merging_ratio" in kwargs:
91
  merging_ratio = kwargs.pop("merging_ratio")
92
 
93
  # if merging_ratio > 0:
94
  tomesd.apply_patch(self.pipe, ratio=merging_ratio)
95
+ '''
96
  seed = kwargs.pop('seed', 0)
97
  if seed < 0:
98
  seed = self.generator.seed()