Spaces:
Runtime error
Runtime error
alfredplpl
commited on
Commit
β’
a6b996a
1
Parent(s):
88d5174
Update app.py
Browse files
app.py
CHANGED
@@ -21,6 +21,10 @@ state_dict = load_file(negative_ti_file)
|
|
21 |
pipe_normal.load_textual_inversion(state_dict["clip_g"], token="unaestheticXLv31", text_encoder=pipe_normal.text_encoder_2, tokenizer=pipe_normal.tokenizer_2)
|
22 |
pipe_normal.load_textual_inversion(state_dict["clip_l"], token="unaestheticXLv31", text_encoder=pipe_normal.text_encoder, tokenizer=pipe_normal.tokenizer)
|
23 |
|
|
|
|
|
|
|
|
|
24 |
pipe_normal.to("cuda")
|
25 |
|
26 |
pipe_normal.enable_freeu(s1=1.2, s2=0.7, b1=1.1, b2=1.3)
|
@@ -40,7 +44,7 @@ def run_normal(prompt, negative_prompt="", guidance_scale=7.5, progress=gr.Progr
|
|
40 |
conditioning, pooled = compel("1girl, (upper body)++, brown bob short hair, brown eyes, looking at viewer, cherry blossom")
|
41 |
else:
|
42 |
conditioning, pooled = compel(prompt)
|
43 |
-
negative_conditioning, negatice_pooled = compel("(unaestheticXLv31)
|
44 |
result = pipe_normal(
|
45 |
prompt_embeds=conditioning,
|
46 |
pooled_prompt_embeds=pooled,
|
|
|
21 |
pipe_normal.load_textual_inversion(state_dict["clip_g"], token="unaestheticXLv31", text_encoder=pipe_normal.text_encoder_2, tokenizer=pipe_normal.tokenizer_2)
|
22 |
pipe_normal.load_textual_inversion(state_dict["clip_l"], token="unaestheticXLv31", text_encoder=pipe_normal.text_encoder, tokenizer=pipe_normal.tokenizer)
|
23 |
|
24 |
+
state_dict = load_file("unaestheticXL_Alb2.safetensors")
|
25 |
+
pipe_normal.load_textual_inversion(state_dict["clip_g"], token="unaestheticXL_Alb2", text_encoder=pipe_normal.text_encoder_2, tokenizer=pipe_normal.tokenizer_2)
|
26 |
+
pipe_normal.load_textual_inversion(state_dict["clip_l"], token="unaestheticXL_Alb2", text_encoder=pipe_normal.text_encoder, tokenizer=pipe_normal.tokenizer)
|
27 |
+
|
28 |
pipe_normal.to("cuda")
|
29 |
|
30 |
pipe_normal.enable_freeu(s1=1.2, s2=0.7, b1=1.1, b2=1.3)
|
|
|
44 |
conditioning, pooled = compel("1girl, (upper body)++, brown bob short hair, brown eyes, looking at viewer, cherry blossom")
|
45 |
else:
|
46 |
conditioning, pooled = compel(prompt)
|
47 |
+
negative_conditioning, negatice_pooled = compel("(unaestheticXLv31)++, (unaestheticXL_Alb2)++, bad hands, bad anatomy, low quality, 3d, photo, realism, text, sign, "+negative_prompt)
|
48 |
result = pipe_normal(
|
49 |
prompt_embeds=conditioning,
|
50 |
pooled_prompt_embeds=pooled,
|