mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-01-30 15:10:50 +08:00
sort TI hashes
This commit is contained in:
parent
e72a6c411a
commit
a57adde5ae
@ -3,7 +3,7 @@ from collections import namedtuple
|
||||
|
||||
import torch
|
||||
|
||||
from modules import prompt_parser, devices, sd_hijack, sd_emphasis
|
||||
from modules import prompt_parser, devices, sd_hijack, sd_emphasis, util
|
||||
from modules.shared import opts
|
||||
from modules.util import GenerationParamsState
|
||||
|
||||
@ -37,7 +37,7 @@ class EmbeddingHashes(GenerationParamsState):
|
||||
unique_hashes = dict.fromkeys(self.hashes)
|
||||
if existing_ti_hashes := extra_generation_params.get('TI hashes'):
|
||||
unique_hashes.update(dict.fromkeys(existing_ti_hashes.split(', ')))
|
||||
extra_generation_params['TI hashes'] = ', '.join(unique_hashes)
|
||||
extra_generation_params['TI hashes'] = ', '.join(sorted(unique_hashes, key=util.natural_sort_key))
|
||||
|
||||
|
||||
class EmphasisMode(GenerationParamsState):
|
||||
|
Loading…
Reference in New Issue
Block a user