We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5dd8409 commit 2cedfbdCopy full SHA for 2cedfbd
src/huggingface_inference_toolkit/diffusers_utils.py
@@ -65,7 +65,14 @@ def __call__(
65
logger.warning("Sending num_images_per_prompt > 1 to pipeline is not supported. Using default value 1.")
66
67
if "num_inference_steps" not in kwargs:
68
- kwargs["num_inference_steps"] = int(os.environ.get("DEFAULT_NUM_INFERENCE_STEPS", 50))
+ default_num_steps = os.environ.get("DEFAULT_NUM_INFERENCE_STEPS")
69
+ if default_num_steps:
70
+ kwargs["num_inference_steps"] = int(default_num_steps)
71
+
72
+ if "guidance_scale" not in kwargs:
73
+ guidance_scale = os.environ.get("DEFAULT_GUIDANCE_SCALE")
74
+ if guidance_scale is not None:
75
+ kwargs["guidance_scale"] = float(guidance_scale)
76
77
if "target_size" in kwargs:
78
kwargs["height"] = kwargs["target_size"].pop("height", None)
0 commit comments