um235 commited on
Commit
15ade58
·
verified ·
1 Parent(s): 31516d8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -44,11 +44,11 @@ def infer(
44
  generator = torch.Generator().manual_seed(seed)
45
 
46
  pipe = None
47
- if (model_id=="stable-diffusion-v1-5/stable-diffusion-v1-5 with lora with text encoder"):
48
  pipe=DiffusionPipeline.from_pretrained("stable-diffusion-v1-5/stable-diffusion-v1-5", torch_dtype=torch_dtype)
49
  pipe.unet = PeftModel.from_pretrained(pipe.unet,"um235/VanillaCat",subfolder="unet")
50
  pipe.text_encoder= PeftModel.from_pretrained(pipe.text_encoder,"um235/VanillaCat",subfolder="text_encoder")
51
- elif (model_id=="stable-diffusion-v1-5/stable-diffusion-v1-5 without lora with text encoder"):
52
  pipe=DiffusionPipeline.from_pretrained("stable-diffusion-v1-5/stable-diffusion-v1-5", torch_dtype=torch_dtype)
53
  pipe.unet = PeftModel.from_pretrained(pipe.unet,"um235/cartoon_cat_stickers")
54
  else:
@@ -101,8 +101,8 @@ with gr.Blocks(css=css) as demo:
101
  choices=[
102
  "stable-diffusion-v1-5/stable-diffusion-v1-5",
103
  "CompVis/stable-diffusion-v1-4",
104
- "stable-diffusion-v1-5/stable-diffusion-v1-5 with lora with text encoder",
105
- "stable-diffusion-v1-5/stable-diffusion-v1-5 with lora without text encoder"
106
  ],
107
  value="stable-diffusion-v1-5/stable-diffusion-v1-5 with lora with text encoder",
108
  show_label=True,
 
44
  generator = torch.Generator().manual_seed(seed)
45
 
46
  pipe = None
47
+ if (model_id=="SD1.5 + lora Unet TextEncoder"):
48
  pipe=DiffusionPipeline.from_pretrained("stable-diffusion-v1-5/stable-diffusion-v1-5", torch_dtype=torch_dtype)
49
  pipe.unet = PeftModel.from_pretrained(pipe.unet,"um235/VanillaCat",subfolder="unet")
50
  pipe.text_encoder= PeftModel.from_pretrained(pipe.text_encoder,"um235/VanillaCat",subfolder="text_encoder")
51
+ elif (model_id=="SD1.5 + lora Unet"):
52
  pipe=DiffusionPipeline.from_pretrained("stable-diffusion-v1-5/stable-diffusion-v1-5", torch_dtype=torch_dtype)
53
  pipe.unet = PeftModel.from_pretrained(pipe.unet,"um235/cartoon_cat_stickers")
54
  else:
 
101
  choices=[
102
  "stable-diffusion-v1-5/stable-diffusion-v1-5",
103
  "CompVis/stable-diffusion-v1-4",
104
+ "SD1.5 + lora Unet TextEncoder",
105
+ "SD1.5 + lora Unet"
106
  ],
107
  value="stable-diffusion-v1-5/stable-diffusion-v1-5 with lora with text encoder",
108
  show_label=True,