diff options
| -rw-r--r-- | app/client/live/live.reducer.js | 2 | ||||
| -rw-r--r-- | app/client/modules/biggan/views/biggan.categoryList.js | 2 | ||||
| -rw-r--r-- | app/client/modules/biggan/views/biggan.encodingList.js | 8 | ||||
| -rw-r--r-- | app/relay/modules/biggan.js | 30 |
4 files changed, 35 insertions, 7 deletions
diff --git a/app/client/live/live.reducer.js b/app/client/live/live.reducer.js index d352d25..2abb527 100644 --- a/app/client/live/live.reducer.js +++ b/app/client/live/live.reducer.js @@ -123,7 +123,7 @@ const liveReducer = (state = liveInitialState, action) => { ...state, opt: { ...state.opt, - [line[1]]: line[2], + ...new_opt, } } } diff --git a/app/client/modules/biggan/views/biggan.categoryList.js b/app/client/modules/biggan/views/biggan.categoryList.js index e1cc2d1..7d38efc 100644 --- a/app/client/modules/biggan/views/biggan.categoryList.js +++ b/app/client/modules/biggan/views/biggan.categoryList.js @@ -10,7 +10,7 @@ import actions from '../../../actions' import * as bigganTasks from '../biggan.tasks' import * as bigganActions from '../biggan.actions' -const ALL_CATEGORIES = 'inversion/categories/biggan_all.json' +const ALL_CATEGORIES = 'categories/biggan_all.json' class BigGANCategoryList extends Component { state = { diff --git a/app/client/modules/biggan/views/biggan.encodingList.js b/app/client/modules/biggan/views/biggan.encodingList.js index 76c306c..710752e 100644 --- a/app/client/modules/biggan/views/biggan.encodingList.js +++ b/app/client/modules/biggan/views/biggan.encodingList.js @@ -37,11 +37,11 @@ class BigGANEncodingList extends Component { /> <Slider live name='encoding_mix_n' - title={"Blend mix"} + title={"Latent mix"} min={0} max={1} type='float' /> <Slider live - name='encoding_mix_n' + name='encoding_stored_n' title={"Encoding mix"} min={0} max={1} type='float' /> @@ -55,7 +55,9 @@ class BigGANEncodingList extends Component { <img key={file.id} src={file.url} - onClick={() => actions.live.send_command('setEncoding', 'id=' + file.id)} + onClick={() => actions.live.send_command('setEncoding', JSON.stringify({ + id: file.id, + }))} /> ))} </div> diff --git a/app/relay/modules/biggan.js b/app/relay/modules/biggan.js index 44e8e4e..74d308b 100644 --- a/app/relay/modules/biggan.js +++ b/app/relay/modules/biggan.js @@ -9,19 +9,45 @@ const env = { LC_ALL: 'C.UTF-8', LANG: 'C.UTF-8', } + +const invert = { + type: 'pytorch_biggan', + script: 'cli.py', + params: (task) => { + console.log(task) + return [ + 'biggan', 'extract_dense_vectors', + '--folder_id', task.opt.folder_id, + '--stochastic_clipping', '--label_clipping', '--clip_interval', 200 + ] + } +} + const live = { type: 'pytorch_biggan', script: 'cli.py', params: (task) => { console.log(task) const opt = task.opt || {} - return ["biggan", "live"] + return ['biggan', 'live'] + }, + after: 'render', +} + +const render = { + type: 'pytorch_biggan', + script: 'cli.py', + params: (task) => { + console.log(task) + return [ + 'cortex', 'upload_video', + ] } } export default { name, cwd, env, activities: { - live, + invert, live, render, } } |
