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

add lora to model

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -33,8 +33,11 @@ def infer(
33
  else:
34
  torch_dtype = torch.float32
35
  #print(model_id)
36
-
37
- pipe = DiffusionPipeline.from_pretrained(model_id, torch_dtype=torch_dtype)
 
 
 
38
  pipe = pipe.to(device)
39
 
40
 
 
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