StyleFlow
StyleFlow copied to clipboard
SyleFlow WebUI - failed to initialize
Hi, I running streamlit run app.py on the WebUI branch on AWS p3.16xlarge server with the following setup GPU 8, GPU peer to Peer NVLink GPU memory (GB) 128 vCPU 64 Memory (GP) 488 Cuda compilation tools, release 10.0, V10.0.130
getting the error RuntimeError: CUDA error: out of memory
File "/home/ubuntu/.local/lib/python3.6/site-packages/streamlit/script_runner.py", line 338, in _run_script
exec(code, module.dict)
File "/home/ubuntu/src/StyleFlow/webui/app.py", line 312, in 
Any assistance would be appreciated Rony
me too
Hi, I running streamlit run app.py on the WebUI branch on AWS p3.16xlarge server with the following setup GPU 8, GPU peer to Peer NVLink GPU memory (GB) 128 vCPU 64 Memory (GP) 488 Cuda compilation tools, release 10.0, V10.0.130
getting the error RuntimeError: CUDA error: out of memory
File "/home/ubuntu/.local/lib/python3.6/site-packages/streamlit/script_runner.py", line 338, in _run_script exec(code, module.dict) File "/home/ubuntu/src/StyleFlow/webui/app.py", line 312, in main() File "/home/ubuntu/src/StyleFlow/webui/app.py", line 219, in main session, model, w_avg, flow_model = init_model() File "/home/ubuntu/.local/lib/python3.6/site-packages/streamlit/caching.py", line 573, in wrapped_func return get_or_create_cached_value() File "/home/ubuntu/.local/lib/python3.6/site-packages/streamlit/caching.py", line 557, in get_or_create_cached_value return_value = func(*args, **kwargs) File "/home/ubuntu/src/StyleFlow/webui/app.py", line 104, in init_model prior = cnf(512, '512-512-512-512-512', 17, 1) File "../module/flow.py", line 79, in cnf model = build_model(input_dim, dims, zdim, num_blocks, True).cuda() File "/home/ubuntu/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in cuda return self._apply(lambda t: t.cuda(device)) File "/home/ubuntu/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 387, in _apply module._apply(fn) File "/home/ubuntu/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 387, in _apply module._apply(fn) File "/home/ubuntu/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 409, in _apply param_applied = fn(param) File "/home/ubuntu/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in return self._apply(lambda t: t.cuda(device))
Any assistance would be appreciated Rony
I solved this problemjust now
Hi, I running streamlit run app.py on the WebUI branch on AWS p3.16xlarge server with the following setup GPU 8, GPU peer to Peer NVLink GPU memory (GB) 128 vCPU 64 Memory (GP) 488 Cuda compilation tools, release 10.0, V10.0.130
getting the error RuntimeError: CUDA error: out of memory
File "/home/ubuntu/.local/lib/python3.6/site-packages/streamlit/script_runner.py", line 338, in _run_script exec(code, module.dict) File "/home/ubuntu/src/StyleFlow/webui/app.py", line 312, in main() File "/home/ubuntu/src/StyleFlow/webui/app.py", line 219, in main session, model, w_avg, flow_model = init_model() File "/home/ubuntu/.local/lib/python3.6/site-packages/streamlit/caching.py", line 573, in wrapped_func return get_or_create_cached_value() File "/home/ubuntu/.local/lib/python3.6/site-packages/streamlit/caching.py", line 557, in get_or_create_cached_value return_value = func(*args, **kwargs) File "/home/ubuntu/src/StyleFlow/webui/app.py", line 104, in init_model prior = cnf(512, '512-512-512-512-512', 17, 1) File "../module/flow.py", line 79, in cnf model = build_model(input_dim, dims, zdim, num_blocks, True).cuda() File "/home/ubuntu/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in cuda return self._apply(lambda t: t.cuda(device)) File "/home/ubuntu/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 387, in _apply module._apply(fn) File "/home/ubuntu/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 387, in _apply module._apply(fn) File "/home/ubuntu/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 409, in _apply param_applied = fn(param) File "/home/ubuntu/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in return self._apply(lambda t: t.cuda(device))
Any assistance would be appreciated Rony

@st.cache(hash_funcs=HASH_FUNCS) def init_model(): # Open a new TensorFlow session. gpu_options = tf.GPUOptions(per_process_gpu_memory_fraction=0.2) # Set GPU resource occupancy ratio config = tf.ConfigProto(allow_soft_placement=True, gpu_options=gpu_options) session = tf.Session(config=config)
And some other minor modifications(cpu -> cuda、slider、etc...)
@st.cache(hash_funcs=HASH_FUNCS) def init_model():
Open a new TensorFlow session.
gpu_options = tf.GPUOptions(per_process_gpu_memory_fraction=0.2) # Set GPU resource occupancy ratio config = tf.ConfigProto(allow_soft_placement=True, gpu_options=gpu_options) session = tf.Session(config=config)
And some other minor modifications(cpu -> cuda、slider、etc...)
it works!!!! tks a lot

@xgy2000 you can modify the code at /usr/local/lib/python3.7/dist-packages/streamlit/state/widgets.py line 132, change element_proto.id = widget_id to widget_id = str(widget_id) element_proto.id = widget_id
it works for me!
Hi, I running streamlit run app.py on the WebUI branch on AWS p3.16xlarge server with the following setup GPU 8, GPU peer to Peer NVLink GPU memory (GB) 128 vCPU 64 Memory (GP) 488 Cuda compilation tools, release 10.0, V10.0.130
getting the error RuntimeError: CUDA error: out of memory
File "/home/ubuntu/.local/lib/python3.6/site-packages/streamlit/script_runner.py", line 338, in _run_script exec(code, module.dict) File "/home/ubuntu/src/StyleFlow/webui/app.py", line 312, in main() File "/home/ubuntu/src/StyleFlow/webui/app.py", line 219, in main session, model, w_avg, flow_model = init_model() File "/home/ubuntu/.local/lib/python3.6/site-packages/streamlit/caching.py", line 573, in wrapped_func return get_or_create_cached_value() File "/home/ubuntu/.local/lib/python3.6/site-packages/streamlit/caching.py", line 557, in get_or_create_cached_value return_value = func(*args, **kwargs) File "/home/ubuntu/src/StyleFlow/webui/app.py", line 104, in init_model prior = cnf(512, '512-512-512-512-512', 17, 1) File "../module/flow.py", line 79, in cnf model = build_model(input_dim, dims, zdim, num_blocks, True).cuda() File "/home/ubuntu/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in cuda return self._apply(lambda t: t.cuda(device)) File "/home/ubuntu/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 387, in _apply module._apply(fn) File "/home/ubuntu/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 387, in _apply module._apply(fn) File "/home/ubuntu/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 409, in _apply param_applied = fn(param) File "/home/ubuntu/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in return self._apply(lambda t: t.cuda(device))
Any assistance would be appreciated Rony
UnpicklingError: pickle data was truncated
