aifeifei798 commited on
Commit
c583ff1
·
verified ·
1 Parent(s): cdc491c

Update feifeilib/feifeimodload.py

Browse files
Files changed (1) hide show
  1. feifeilib/feifeimodload.py +3 -20
feifeilib/feifeimodload.py CHANGED
@@ -11,13 +11,6 @@ def feifeimodload():
11
 
12
  dtype = torch.bfloat16
13
  device = "cuda" if torch.cuda.is_available() else "cpu"
14
- #taef1 = AutoencoderTiny.from_pretrained("aifeifei798/taef1", torch_dtype=dtype).to(
15
- # device
16
- #)
17
-
18
- #pipe = DiffusionPipeline.from_pretrained(
19
- # "aifeifei798/DarkIdol-flux-v1", torch_dtype=dtype, vae=taef1
20
- #).to(device)
21
 
22
  pipe = DiffusionPipeline.from_pretrained(
23
  "aifeifei798/DarkIdol-flux-v1", torch_dtype=dtype
@@ -28,23 +21,13 @@ def feifeimodload():
28
  adapter_name="feifei",
29
  )
30
 
31
- pipe.load_lora_weights(
32
- hf_hub_download("aifeifei798/AWPortraitCN", "AWPortraitCN.safetensors"),
33
- adapter_name="AWPortraitCN",
34
- )
35
-
36
- #pipe.load_lora_weights(
37
- # hf_hub_download("aifeifei798/flux-nsfw-lora", "Ultra-Realistic Nipple Generator_v2.safetensors"),
38
- # adapter_name="Ultra-Realistic",
39
- #)
40
-
41
  pipe.set_adapters(
42
- ["feifei", "AWPortraitCN"],
43
- adapter_weights=[0.8,0.5],
44
  )
45
 
46
  pipe.fuse_lora(
47
- adapter_name=["feifei", "AWPortraitCN"],
48
  lora_scale=1.0,
49
  )
50
 
 
11
 
12
  dtype = torch.bfloat16
13
  device = "cuda" if torch.cuda.is_available() else "cpu"
 
 
 
 
 
 
 
14
 
15
  pipe = DiffusionPipeline.from_pretrained(
16
  "aifeifei798/DarkIdol-flux-v1", torch_dtype=dtype
 
21
  adapter_name="feifei",
22
  )
23
 
 
 
 
 
 
 
 
 
 
 
24
  pipe.set_adapters(
25
+ ["feifei"],
26
+ adapter_weights=[0.8],
27
  )
28
 
29
  pipe.fuse_lora(
30
+ adapter_name=["feifei"],
31
  lora_scale=1.0,
32
  )
33