Spaces:
Running
on
Zero
Running
on
Zero
Update feifeilib/feifeimodload.py
Browse files- feifeilib/feifeimodload.py +20 -17
feifeilib/feifeimodload.py
CHANGED
@@ -19,14 +19,16 @@ def feifeimodload():
|
|
19 |
"aifeifei798/DarkIdol-flux-v1.1", torch_dtype=dtype, vae=taef1
|
20 |
).to(device)
|
21 |
|
22 |
-
|
23 |
-
|
24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
|
26 |
-
#pipe.load_lora_weights(
|
27 |
-
# hf_hub_download("aifeifei798/feifei-flux-lora-v1", "feifei.safetensors"),
|
28 |
-
# adapter_name="feifei",
|
29 |
-
#)
|
30 |
#pipe.load_lora_weights(
|
31 |
# hf_hub_download(
|
32 |
# "aifeifei798/feifei-flux-lora-v1", "FLUX-dev-lora-add_details.safetensors"
|
@@ -44,21 +46,22 @@ def feifeimodload():
|
|
44 |
# ["feifei", "FLUX-dev-lora-add_details", "Shadow-Projection"],
|
45 |
# adapter_weights=[0.65, 0.35, 0.35],
|
46 |
#)
|
|
|
47 |
#pipe.fuse_lora(
|
48 |
# adapter_name=["feifei", "FLUX-dev-lora-add_details", "Shadow-Projection"],
|
49 |
# lora_scale=1.0,
|
50 |
#)
|
51 |
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
pipe.vae.enable_tiling()
|
63 |
pipe.unload_lora_weights()
|
64 |
torch.cuda.empty_cache()
|
|
|
19 |
"aifeifei798/DarkIdol-flux-v1.1", torch_dtype=dtype, vae=taef1
|
20 |
).to(device)
|
21 |
|
22 |
+
pipe.load_lora_weights(
|
23 |
+
hf_hub_download("aifeifei798/feifei-flux-lora-v1", "feifei.safetensors"),
|
24 |
+
adapter_name="feifei",
|
25 |
+
)
|
26 |
+
|
27 |
+
pipe.load_lora_weights(
|
28 |
+
hf_hub_download("adirik/flux-cinestill", "lora.safetensors"),
|
29 |
+
adapter_name="fluxcinestill",
|
30 |
+
)
|
31 |
|
|
|
|
|
|
|
|
|
32 |
#pipe.load_lora_weights(
|
33 |
# hf_hub_download(
|
34 |
# "aifeifei798/feifei-flux-lora-v1", "FLUX-dev-lora-add_details.safetensors"
|
|
|
46 |
# ["feifei", "FLUX-dev-lora-add_details", "Shadow-Projection"],
|
47 |
# adapter_weights=[0.65, 0.35, 0.35],
|
48 |
#)
|
49 |
+
|
50 |
#pipe.fuse_lora(
|
51 |
# adapter_name=["feifei", "FLUX-dev-lora-add_details", "Shadow-Projection"],
|
52 |
# lora_scale=1.0,
|
53 |
#)
|
54 |
|
55 |
+
pipe.set_adapters(
|
56 |
+
["feifei","fluxcinestill"],
|
57 |
+
adapter_weights=[1,1],
|
58 |
+
)
|
59 |
+
|
60 |
+
pipe.fuse_lora(
|
61 |
+
adapter_name=["feifei","fluxcinestill"],
|
62 |
+
lora_scale=1.0,
|
63 |
+
)
|
64 |
+
|
65 |
pipe.vae.enable_tiling()
|
66 |
pipe.unload_lora_weights()
|
67 |
torch.cuda.empty_cache()
|