seregasmirnov commited on
Commit
b063f8f
·
verified ·
1 Parent(s): f487768

load_lora_weights

Browse files
Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -33,15 +33,12 @@ def infer(
33
  else:
34
  torch_dtype = torch.float32
35
  #print(model_id)
 
36
  if model_id == "CompVis/stable-diffusion-v1-4" and lora == "pepe":
37
  lora_id = "seregasmirnov/pepe-lora"
38
- pipe = DiffusionPipeline.from_pretrained(model_id, lora_id, torch_dtype=torch_dtype)
39
- else:
40
- pipe = DiffusionPipeline.from_pretrained(model_id, torch_dtype=torch_dtype)
41
  pipe = pipe.to(device)
42
 
43
-
44
-
45
  if randomize_seed:
46
  seed = random.randint(0, MAX_SEED)
47
 
 
33
  else:
34
  torch_dtype = torch.float32
35
  #print(model_id)
36
+ pipe = DiffusionPipeline.from_pretrained(model_id, torch_dtype=torch_dtype)
37
  if model_id == "CompVis/stable-diffusion-v1-4" and lora == "pepe":
38
  lora_id = "seregasmirnov/pepe-lora"
39
+ pipe.load_lora_weights(lora_id)
 
 
40
  pipe = pipe.to(device)
41
 
 
 
42
  if randomize_seed:
43
  seed = random.randint(0, MAX_SEED)
44