From 887706c9c9009cbddf06f77e32e6e5f0b2c399a4 Mon Sep 17 00:00:00 2001 From: Brett Kuprel Date: Mon, 11 Jul 2022 14:09:50 -0400 Subject: [PATCH] log2_temperature -> temperature --- min_dalle.ipynb | 4 ++-- replicate_predictor.py | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/min_dalle.ipynb b/min_dalle.ipynb index e0a0f05..d7b50d8 100644 --- a/min_dalle.ipynb +++ b/min_dalle.ipynb @@ -194,7 +194,7 @@ "text = \"Dali painting of WALL·E\" #@param {type:\"string\"}\n", "intermediate_outputs = True #@param {type:\"boolean\"}\n", "grid_size = 5 #@param {type:\"integer\"}\n", - "log2_temperature = 0 #@param {type:\"slider\", min:-5, max:5, step:0.1}\n", + "temperature = 1 #@param {type:\"slider\", min:0.01, max:3, step:0.01}\n", "supercondition_factor = 16 #@param {type:\"number\"}\n", "top_k = 256 #@param {type:\"integer\"}\n", "log2_mid_count = 3 if intermediate_outputs else 0\n", @@ -204,7 +204,7 @@ " seed=-1,\n", " grid_size=grid_size,\n", " log2_mid_count=log2_mid_count,\n", - " temperature=2 ** log2_temperature,\n", + " temperature=temperature,\n", " top_k=int(top_k),\n", " supercondition_factor=float(supercondition_factor)\n", ")\n", diff --git a/replicate_predictor.py b/replicate_predictor.py index 5a85b15..51f4afd 100644 --- a/replicate_predictor.py +++ b/replicate_predictor.py @@ -27,11 +27,11 @@ class ReplicatePredictor(BasePredictor): le=8, default=4 ), - log2_temperature: float = Input( + temperature: float = Input( description='A higher temperature results in more variety.', - ge=-3, + ge=0.01, le=3, - default=0 + default=1 ), ) -> Iterator[Path]: try: @@ -40,7 +40,7 @@ class ReplicatePredictor(BasePredictor): seed = -1, grid_size = grid_size, log2_mid_count = 3 if intermediate_outputs else 0, - temperature = 2 ** log2_temperature, + temperature = temperature, supercondition_factor = 2 ** 4, top_k = 2 ** 8, is_verbose = True