multimodalart HF staff commited on
Commit
5fb94fd
1 Parent(s): 231b814

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -275,7 +275,11 @@ def run_lora(face_image, prompt, negative, lora_scale, selected_state, face_stre
275
  pipe.load_textual_inversion(state_dict_embedding["text_encoders_1"], token=["<s0>", "<s1>"], text_encoder=pipe.text_encoder_2, tokenizer=pipe.tokenizer_2)
276
 
277
  conditioning, pooled = compel(prompt)
278
- negative_conditioning, negative_pooled = compel(negative)
 
 
 
 
279
  image = pipe(
280
  prompt_embeds=conditioning,
281
  pooled_prompt_embeds=pooled,
 
275
  pipe.load_textual_inversion(state_dict_embedding["text_encoders_1"], token=["<s0>", "<s1>"], text_encoder=pipe.text_encoder_2, tokenizer=pipe.tokenizer_2)
276
 
277
  conditioning, pooled = compel(prompt)
278
+ if(negative):
279
+ negative_conditioning, negative_pooled = compel(negative)
280
+ else:
281
+ negative_conditioning, negative_pooled = None, None
282
+
283
  image = pipe(
284
  prompt_embeds=conditioning,
285
  pooled_prompt_embeds=pooled,