Update app.py
Browse files
app.py
CHANGED
@@ -44,11 +44,11 @@ def infer(
|
|
44 |
generator = torch.Generator().manual_seed(seed)
|
45 |
|
46 |
pipe = None
|
47 |
-
if (model_id=="
|
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=="
|
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 |
-
"
|
105 |
-
"
|
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,
|