summaryrefslogtreecommitdiff
path: root/app/client/modules/pix2pixhd/views/pix2pixhd.train.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/client/modules/pix2pixhd/views/pix2pixhd.train.js')
-rw-r--r--app/client/modules/pix2pixhd/views/pix2pixhd.train.js35
1 files changed, 23 insertions, 12 deletions
diff --git a/app/client/modules/pix2pixhd/views/pix2pixhd.train.js b/app/client/modules/pix2pixhd/views/pix2pixhd.train.js
index 6aade36..1641976 100644
--- a/app/client/modules/pix2pixhd/views/pix2pixhd.train.js
+++ b/app/client/modules/pix2pixhd/views/pix2pixhd.train.js
@@ -72,9 +72,10 @@ class Pix2PixHDTrain extends Component {
if (this.props.pix2pixhd.loading) {
return <Loading progress={this.props.pix2pixhd.progress} />
}
- const { pix2pixhd, match, history, queue } = this.props
+ const { pix2pixhd, match, history } = this.props
const { folderLookup, datasetLookup } = (pix2pixhd.data || {})
const folder = (folderLookup || {})[pix2pixhd.folder_id] || {}
+ const { checkpoint } = pix2pixhd
// console.log(pix2pixhd)
const checkpointGroups = Object.keys(folderLookup).map(id => {
@@ -122,19 +123,29 @@ class Pix2PixHDTrain extends Component {
</Group>
</div>
</div>
- <div>
- <Group title='Sequence Editor'>
- <SequenceEditor
- module={pix2pixhdModule}
- checkpoint={this.props.pix2pixhd.checkpoint}
- />
- </Group>
- </div>
+ {checkpoint && checkpoint.sequence && checkpoint.sequence.length
+ ? this.renderEditor()
+ : checkpoint && <div>Sequence empty, augmentation impossible</div>}
+ </div>
+ )
+ }
+
+ renderEditor(){
+ const { pix2pixhd, queue } = this.props
+ const { checkpoint } = pix2pixhd
+ return (
+ <div>
+ <Group title='Sequence Editor'>
+ <SequenceEditor
+ module={pix2pixhdModule}
+ checkpoint={checkpoint}
+ />
+ </Group>
<div className='columns'>
<div className='column'>
<Group title='Augmentation Grid'>
<AugmentationGrid
- checkpoint={this.props.pix2pixhd.checkpoint}
+ checkpoint={checkpoint}
take={[1,2,3,4,5,10,15,20,25,50,75,100,200,300,400,500,1000]}
make={[1,2,3,4,5,10,15,20,25,50,75,100,200,]}
onAugment={(augment_take, augment_make) => {
@@ -153,7 +164,7 @@ class Pix2PixHDTrain extends Component {
augment_make: 149,
no_symlinks: true,
mov: true,
- folder_id: this.props.pix2pixhd.data.resultsFolder.id
+ folder_id: pix2pixhd.data.resultsFolder.id
})
}, 250)
}}
@@ -191,7 +202,7 @@ class Pix2PixHDTrain extends Component {
...this.state,
no_symlinks: true,
mov: true,
- folder_id: this.props.pix2pixhd.data.resultsFolder.id
+ folder_id: pix2pixhd.data.resultsFolder.id
})
}}
/>