um235 commited on
Commit
47501a2
·
verified ·
1 Parent(s): 452e572

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -46,7 +46,8 @@ def infer(
46
  pipe = None
47
  if (model_id=="stable-diffusion-v1-5/stable-diffusion-v1-5 with lora"):
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/cartoon_cat_stickers")
 
50
  else:
51
  print("stable-diffusion-v1-5/stable-diffusion-v1-5 with lora")
52
  pipe=DiffusionPipeline.from_pretrained(model_id, torch_dtype=torch_dtype)
@@ -69,7 +70,7 @@ def infer(
69
  examples = [
70
  "Sticker VanillaCat. Cartoon-style cat with soft yellow fur and a white flower on its head, sitting up with a relaxed expression, eyes half-closed, content and calm, casual pose, peaceful mood, white background.",
71
  "Sticker VanillaCat. Cartoon-style cat with soft yellow fur and a white flower on its head, standing with a mischievous grin, one paw raised playfully, bright eyes full of energy, cheeky and fun, white background",
72
- "VanillaCat. Cartoon-style cat with soft yellow fur and a white flower on its head, jumping mid-air with a surprised expression, wide eyes, and mouth open in excitement, paws stretched out, energetic and playful, white background.",
73
  ]
74
 
75
  css = """
 
46
  pipe = None
47
  if (model_id=="stable-diffusion-v1-5/stable-diffusion-v1-5 with lora"):
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/cartoon_cat_stickers/unet")
50
+ pipe.text_encoder= PeftModel.from_pretrained(pipe.text_encoder,"um235/cartoon_cat_stickers/text_encoder")
51
  else:
52
  print("stable-diffusion-v1-5/stable-diffusion-v1-5 with lora")
53
  pipe=DiffusionPipeline.from_pretrained(model_id, torch_dtype=torch_dtype)
 
70
  examples = [
71
  "Sticker VanillaCat. Cartoon-style cat with soft yellow fur and a white flower on its head, sitting up with a relaxed expression, eyes half-closed, content and calm, casual pose, peaceful mood, white background.",
72
  "Sticker VanillaCat. Cartoon-style cat with soft yellow fur and a white flower on its head, standing with a mischievous grin, one paw raised playfully, bright eyes full of energy, cheeky and fun, white background",
73
+ "Sticker VanillaCat. Cartoon-style cat with soft yellow fur and a white flower on its head, jumping mid-air with a surprised expression, wide eyes, and mouth open in excitement, paws stretched out, energetic and playful, forest background.",
74
  ]
75
 
76
  css = """