Spaces:
Sleeping
Sleeping
zhiweili
commited on
Commit
•
c978d99
1
Parent(s):
c5b3fbd
remove lora
Browse files- inversion_run_base.py +0 -7
- requirements.txt +1 -2
inversion_run_base.py
CHANGED
@@ -56,12 +56,6 @@ pipeline.scheduler = DDPMScheduler.from_pretrained(
|
|
56 |
subfolder="scheduler",
|
57 |
)
|
58 |
|
59 |
-
os.makedirs('checkpoints/lora', exist_ok=True)
|
60 |
-
if not os.path.exists('checkpoints/lora/perfection_style.safetensors'):
|
61 |
-
os.system("wget https://civitai.com/api/download/models/458257?token=27eadde29f9f31d1b09af7e9b6d97577 -O ./checkpoints/lora/perfection_style.safetensors")
|
62 |
-
|
63 |
-
pipeline.load_lora_weights("checkpoints/lora", weight_name="perfection_style.safetensors", adapter_name="perfection_style")
|
64 |
-
|
65 |
config = get_config(args)
|
66 |
|
67 |
compel_proc = Compel(
|
@@ -84,7 +78,6 @@ def run(
|
|
84 |
guidance_scale:float,
|
85 |
adapter_weights:float,
|
86 |
):
|
87 |
-
pipeline.set_adapters(["perfection_style"], adapter_weights=[adapter_weights])
|
88 |
generator = torch.Generator().manual_seed(seed)
|
89 |
|
90 |
config.num_steps_inversion = num_steps
|
|
|
56 |
subfolder="scheduler",
|
57 |
)
|
58 |
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
config = get_config(args)
|
60 |
|
61 |
compel_proc = Compel(
|
|
|
78 |
guidance_scale:float,
|
79 |
adapter_weights:float,
|
80 |
):
|
|
|
81 |
generator = torch.Generator().manual_seed(seed)
|
82 |
|
83 |
config.num_steps_inversion = num_steps
|
requirements.txt
CHANGED
@@ -12,5 +12,4 @@ compel
|
|
12 |
gfpgan
|
13 |
git+https://github.com/XPixelGroup/BasicSR@master
|
14 |
facexlib
|
15 |
-
realesrgan
|
16 |
-
peft
|
|
|
12 |
gfpgan
|
13 |
git+https://github.com/XPixelGroup/BasicSR@master
|
14 |
facexlib
|
15 |
+
realesrgan
|
|