log2_temperature -> temperature

main
Brett Kuprel 2 years ago
parent 22b3fd1961
commit 887706c9c9
  1. 4
      min_dalle.ipynb
  2. 8
      replicate_predictor.py

4
min_dalle.ipynb vendored

@ -194,7 +194,7 @@
"text = \"Dali painting of WALL·E\" #@param {type:\"string\"}\n", "text = \"Dali painting of WALL·E\" #@param {type:\"string\"}\n",
"intermediate_outputs = True #@param {type:\"boolean\"}\n", "intermediate_outputs = True #@param {type:\"boolean\"}\n",
"grid_size = 5 #@param {type:\"integer\"}\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", "supercondition_factor = 16 #@param {type:\"number\"}\n",
"top_k = 256 #@param {type:\"integer\"}\n", "top_k = 256 #@param {type:\"integer\"}\n",
"log2_mid_count = 3 if intermediate_outputs else 0\n", "log2_mid_count = 3 if intermediate_outputs else 0\n",
@ -204,7 +204,7 @@
" seed=-1,\n", " seed=-1,\n",
" grid_size=grid_size,\n", " grid_size=grid_size,\n",
" log2_mid_count=log2_mid_count,\n", " log2_mid_count=log2_mid_count,\n",
" temperature=2 ** log2_temperature,\n", " temperature=temperature,\n",
" top_k=int(top_k),\n", " top_k=int(top_k),\n",
" supercondition_factor=float(supercondition_factor)\n", " supercondition_factor=float(supercondition_factor)\n",
")\n", ")\n",

@ -27,11 +27,11 @@ class ReplicatePredictor(BasePredictor):
le=8, le=8,
default=4 default=4
), ),
log2_temperature: float = Input( temperature: float = Input(
description='A higher temperature results in more variety.', description='A higher temperature results in more variety.',
ge=-3, ge=0.01,
le=3, le=3,
default=0 default=1
), ),
) -> Iterator[Path]: ) -> Iterator[Path]:
try: try:
@ -40,7 +40,7 @@ class ReplicatePredictor(BasePredictor):
seed = -1, seed = -1,
grid_size = grid_size, grid_size = grid_size,
log2_mid_count = 3 if intermediate_outputs else 0, log2_mid_count = 3 if intermediate_outputs else 0,
temperature = 2 ** log2_temperature, temperature = temperature,
supercondition_factor = 2 ** 4, supercondition_factor = 2 ** 4,
top_k = 2 ** 8, top_k = 2 ** 8,
is_verbose = True is_verbose = True

Loading…
Cancel
Save