use fooocus inpaint control model (#429)

use fooocus inpaint control model (#429)
This commit is contained in:
lllyasviel
2023-09-19 04:52:22 -07:00
committed by GitHub
parent 6ae7de377d
commit 0927445492
9 changed files with 304 additions and 19 deletions
+8 -2
View File
@@ -101,8 +101,14 @@ def refresh_loras(loras):
if name == 'None':
continue
filename = os.path.join(modules.path.lorafile_path, name)
model = core.load_lora(model, filename, strength_model=weight, strength_clip=weight)
if os.path.exists(name):
filename = name
else:
filename = os.path.join(modules.path.lorafile_path, name)
assert os.path.exists(filename), 'Lora file not found!'
model = core.load_sd_lora(model, filename, strength_model=weight, strength_clip=weight)
xl_base_patched = model
xl_base_patched_hash = str(loras)
print(f'LoRAs loaded: {xl_base_patched_hash}')