This commit is contained in:
wailovet
2024-06-30 22:25:27 +08:00
parent d3aa37a554
commit fa4e57af58
2 changed files with 15 additions and 6 deletions
+1 -1
View File
@@ -647,7 +647,7 @@ class MZ_HYDiTSimpleT2I:
"steps": ("INT", {"default": 20}),
"cfg": ("FLOAT", {"default": 8.0, "min": 0.0, "max": 100.0, "step": 0.1, "round": 0.01}),
"scheduler": ([
"ddpm", "ddim", "dpmms",
"ddpm", "ddim", "dpmms", "uni_pc"
], {"default": "ddpm"}),
"prompt": ("STRING", {"default:": "", "dynamicPrompts": True, "multiline": True}),
"negative_prompt": ("STRING", {"default:": "", "dynamicPrompts": True, "multiline": True}),
+14 -5
View File
@@ -852,11 +852,6 @@ def MZ_HYDiTSimpleT2I_call(args={}):
print(f"add {HYDiT_tool_dir} to sys.path")
sys.path.append(HYDiT_tool_dir)
from hydit.inference import SAMPLER_FACTORY, HUNYUAN_DIT_CONFIG, get_fill_resize_and_crop, get_2d_rotary_pos_embed
from hydit.modules.text_encoder import MT5Embedder
from hydit.utils.tools import set_seeds
@@ -864,6 +859,20 @@ def MZ_HYDiTSimpleT2I_call(args={}):
from diffusers import schedulers, AutoencoderKL
from transformers import BertModel, BertTokenizer
SAMPLER_FACTORY["uni_pc"] = {
'scheduler': 'UniPCMultistepScheduler',
'name': 'UniPCMultistepScheduler',
'kwargs': {
# 'beta_schedule': 'scaled_linear',
# 'beta_start': 0.00085,
# 'beta_end': 0.03,
# 'prediction_type': 'v_prediction',
# 'trained_betas': None,
# 'solver_order': 2,
# 'algorithm_type': 'dpmsolver++',
}
}
width = args.get("width")
height = args.get("height")