alfredplpl commited on
Commit
12e4277
1 Parent(s): da26a59

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -3
app.py CHANGED
@@ -13,8 +13,10 @@ from compel import Compel, ReturnedEmbeddingsType
13
  from safetensors.torch import load_file
14
  import spaces
15
 
16
- model_id = "aipicasso/emix-0-4-turbo"
17
  auth_token=os.environ["ACCESS_TOKEN"]
 
 
18
 
19
  scheduler = EulerAncestralDiscreteScheduler.from_pretrained(model_id, subfolder="scheduler",token=auth_token)
20
 
@@ -24,6 +26,9 @@ pipe = AutoPipelineForText2Image.from_pretrained(
24
  scheduler=scheduler,
25
  token=auth_token)
26
 
 
 
 
27
  pipe.enable_freeu(s1=0.9, s2=0.2, b1=1.3, b2=1.4)
28
 
29
  state_dict = load_file("unaestheticXLv31.safetensors")
@@ -47,8 +52,8 @@ def inference(prompt, guidance, steps, seed=0, neg_prompt="", disable_auto_promp
47
 
48
  prompt,neg_prompt=auto_prompt_correction(prompt,neg_prompt,disable_auto_prompt_correction)
49
 
50
- height=768
51
- width=768
52
 
53
  print(prompt,neg_prompt)
54
 
 
13
  from safetensors.torch import load_file
14
  import spaces
15
 
16
+ model_id = "aipicasso/emix-0-5"
17
  auth_token=os.environ["ACCESS_TOKEN"]
18
+ repo = "ByteDance/SDXL-Lightning"
19
+ ckpt = "sdxl_lightning_4step_lora.safetensors"
20
 
21
  scheduler = EulerAncestralDiscreteScheduler.from_pretrained(model_id, subfolder="scheduler",token=auth_token)
22
 
 
26
  scheduler=scheduler,
27
  token=auth_token)
28
 
29
+ pipe.load_lora_weights(hf_hub_download(repo, ckpt))
30
+ pipe.fuse_lora()
31
+
32
  pipe.enable_freeu(s1=0.9, s2=0.2, b1=1.3, b2=1.4)
33
 
34
  state_dict = load_file("unaestheticXLv31.safetensors")
 
52
 
53
  prompt,neg_prompt=auto_prompt_correction(prompt,neg_prompt,disable_auto_prompt_correction)
54
 
55
+ height=1024
56
+ width=1024
57
 
58
  print(prompt,neg_prompt)
59