fix ctr null

This commit is contained in:
jiangzeyinzi
2024-02-07 19:46:48 +08:00
parent 8214227098
commit 9f1847501d
3 changed files with 6 additions and 1 deletions
@@ -923,7 +923,7 @@ class DiffusionUNetXL(DiffusionUNet):
context = cond
hint = kwargs.pop('hint', None)
if self.control_blocks is not None:
if self.control_blocks is not None and hint is not None:
out = self._forward_control(x, emb, context, hint, **kwargs)
else:
out = self._forward_origin(x, emb, context, **kwargs)
@@ -66,12 +66,14 @@ class GalleryUIName():
self.gallery_before_refine_output = 'Before Refine Output'
self.prompt_input = 'Type Prompt Here'
self.generate = 'Generate'
self.control_err1 = 'The conditional image does not exist'
elif language == 'zh':
self.gallery_block_name = '模型的输出'
self.gallery_diffusion_output = '扩散输出'
self.gallery_before_refine_output = '精炼前输出'
self.prompt_input = '在此输入提示'
self.generate = '生成'
self.control_err1 = '条件图片不存在'
class DiffusionUIName():
@@ -88,6 +88,9 @@ class GalleryUI(UIBase):
style_negative_template,
image_seed,
show_jpeg_image=True):
if control_state and control_cond_image is None:
raise gr.Error(self.component_names.control_err1)
current_pipeline = self.pipe_manager.get_pipeline_given_modules({
'diffusion_model':
diffusion_model,