Skip to content

Commit

Permalink
[WIP] DF-IF: Optimise default CFGs
Browse files Browse the repository at this point in the history
  • Loading branch information
bghira committed Jul 22, 2023
1 parent e4b432f commit bcd8472
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ def _invoke_stage2(
output_type=output_type,
width=s2_width,
height=s2_height,
num_images_per_prompt=4
num_images_per_prompt=4,
guidance_scale=user_config.get("df_guidance_scale_2", 5.7),
).images
logging.debug(f'Result: {type(stage2_result)}')
return stage2_result
Expand All @@ -100,6 +101,7 @@ def _invoke_stage3(self, prompt: str, negative_prompt: str, image: Image, user_c
negative_prompt=[negative_prompt] * len(image),
image=image,
noise_level=(100 * user_strength),
guidance_scale=user_config.get("df_guidance_scale_3", 5.6),
).images

def _invoke_stage1(
Expand All @@ -109,6 +111,7 @@ def _invoke_stage1(
prompt_embeds=prompt_embed,
negative_prompt_embeds=negative_prompt_embed,
generator=self.diffusion_manager._get_generator(user_config),
guidance_scale=user_config.get('df_guidance_scale_1', 9.2),
output_type="pt",
width=width,
height=height,
Expand Down

0 comments on commit bcd8472

Please sign in to comment.