Merge branch 'main_upstream'

# Conflicts:
#	css/style.css
#	fooocus_colab.ipynb
#	fooocus_version.py
#	launch.py
#	modules/async_worker.py
#	modules/config.py
#	modules/flags.py
#	modules/meta_parser.py
#	webui.py
This commit is contained in:
Manuel Schmid
2024-03-18 21:27:56 +01:00
33 changed files with 513 additions and 273 deletions
+9 -10
View File
@@ -376,7 +376,7 @@ class A1111MetadataParser(MetadataParser):
data[key] = filename
break
if 'lora_hashes' in data:
if 'lora_hashes' in data and data['lora_hashes'] != '':
lora_filenames = modules.config.lora_filenames.copy()
if modules.config.sdxl_lcm_lora in lora_filenames:
lora_filenames.remove(modules.config.sdxl_lcm_lora)
@@ -430,16 +430,15 @@ class A1111MetadataParser(MetadataParser):
if key in data:
generation_params[self.fooocus_to_a1111[key]] = data[key]
lora_hashes = []
for index, (lora_name, lora_weight, lora_hash) in enumerate(self.loras):
# workaround for Fooocus not knowing LoRA name in LoRA metadata
lora_hashes.append(f'{lora_name}: {lora_hash}: {lora_weight}')
lora_hashes_string = ', '.join(lora_hashes)
if len(self.loras) > 0:
lora_hashes = []
for index, (lora_name, lora_weight, lora_hash) in enumerate(self.loras):
# workaround for Fooocus not knowing LoRA name in LoRA metadata
lora_hashes.append(f'{lora_name}: {lora_hash}: {lora_weight}')
lora_hashes_string = ', '.join(lora_hashes)
generation_params[self.fooocus_to_a1111['lora_hashes']] = lora_hashes_string
generation_params |= {
self.fooocus_to_a1111['lora_hashes']: lora_hashes_string,
self.fooocus_to_a1111['version']: data['version']
}
generation_params[self.fooocus_to_a1111['version']] = data['version']
if modules.config.metadata_created_by != '':
generation_params[self.fooocus_to_a1111['created_by']] = modules.config.metadata_created_by