amildravid4292 commited on
Commit
8091383
·
verified ·
1 Parent(s): 8fdcb49

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -39,7 +39,6 @@ def load_models(device):
39
  pretrained_model_name_or_path = "stablediffusionapi/realistic-vision-v51"
40
 
41
  revision = None
42
- rank = 1
43
  weight_dtype = torch.bfloat16
44
 
45
  # Load scheduler, tokenizer and models.
@@ -318,7 +317,7 @@ class main():
318
  @spaces.GPU(duration=120)
319
  def sample_then_run(self):
320
  self.unet = UNet2DConditionModel.from_pretrained(
321
- "stablediffusionapi/realistic-vision-v51" , subfolder="unet", revision=revision
322
  )
323
  self.unet.to(self.device, dtype=torch.bfloat16)
324
  self.weights = sample_weights(self.unet, self.proj, self.mean, self.std, self.v[:, :1000], self.device, factor = 1.00)
 
39
  pretrained_model_name_or_path = "stablediffusionapi/realistic-vision-v51"
40
 
41
  revision = None
 
42
  weight_dtype = torch.bfloat16
43
 
44
  # Load scheduler, tokenizer and models.
 
317
  @spaces.GPU(duration=120)
318
  def sample_then_run(self):
319
  self.unet = UNet2DConditionModel.from_pretrained(
320
+ "stablediffusionapi/realistic-vision-v51" , subfolder="unet", revision=None
321
  )
322
  self.unet.to(self.device, dtype=torch.bfloat16)
323
  self.weights = sample_weights(self.unet, self.proj, self.mean, self.std, self.v[:, :1000], self.device, factor = 1.00)