linoyts HF Staff commited on
Commit
1d353cd
·
verified ·
1 Parent(s): 1295230

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -172,7 +172,10 @@ def infer_with_lora(input_image, prompt, selected_index, custom_lora, seed=42, r
172
  input_image = input_image.convert("RGB")
173
  # Add trigger word to prompt
174
  trigger_word = lora_to_use["trigger_word"]
175
- prompt = f"convert the style of this portrait photo to {trigger_word} while maintaining the identity of the person. {prompt}. make sure to maintain the person's facial identity and features, while still changing the style to {trigger_word}."
 
 
 
176
 
177
  try:
178
  image = pipe(
 
172
  input_image = input_image.convert("RGB")
173
  # Add trigger word to prompt
174
  trigger_word = lora_to_use["trigger_word"]
175
+ if trigger_word == "CCTUR3"
176
+ prompt = f"create a CCTUR3 caricature of the person in the photo {prompt}, maintain the facial identity of the person and general features while still turning it into a caricature"
177
+ else:
178
+ prompt = f"convert the style of this portrait photo to {trigger_word} while maintaining the identity of the person. {prompt}. Make sure to maintain the person's facial identity and features, while still changing the overall style to {trigger_word}."
179
 
180
  try:
181
  image = pipe(