Update app.py
Browse files
app.py
CHANGED
@@ -49,10 +49,12 @@ def infer(
|
|
49 |
|
50 |
generator = torch.Generator().manual_seed(seed)
|
51 |
|
52 |
-
pipe =
|
53 |
if (model_repo_id=="stable-diffusion-v1-5/stable-diffusion-v1-5"):
|
54 |
-
pipe
|
55 |
-
pipe.
|
|
|
|
|
56 |
pipe = pipe.to(device)
|
57 |
|
58 |
image = pipe(
|
|
|
49 |
|
50 |
generator = torch.Generator().manual_seed(seed)
|
51 |
|
52 |
+
pipe = None
|
53 |
if (model_repo_id=="stable-diffusion-v1-5/stable-diffusion-v1-5"):
|
54 |
+
pipe=DiffusionPipeline.from_pretrained(model_id, torch_dtype=torch_dtype)
|
55 |
+
pipe.unet = PeftModel.from_pretrained(pipe.unet,"um235/cartoon_cat_stickers",cross_attention_kwargs={"scale": 0.5})
|
56 |
+
else:
|
57 |
+
pipe=DiffusionPipeline.from_pretrained(model_id, torch_dtype=torch_dtype)
|
58 |
pipe = pipe.to(device)
|
59 |
|
60 |
image = pipe(
|