StyleFlow icon indicating copy to clipboard operation
StyleFlow copied to clipboard

The Web UI issue

Open Hans1984 opened this issue 4 years ago • 4 comments

Hi, thanks for your amazing work. However, I encountered some problem when using the Web UI, which is as follow: ValueError: Tensor("G_synthesis_1/noise0/new_value:0", shape=(1, 1, 4, 4), dtype=float32) must be from the same graph as Tensor("G_synthesis_1/noise0:0", shape=(1, 1, 4, 4), dtype=float32_ref). Traceback: File "/home/chaowang/anaconda3/envs/StyleFlow/lib/python3.7/site-packages/streamlit/script_runner.py", line 332, in _run_script exec(code, module.dict) File "/home/chaowang/StyleFlow/webui/app.py", line 312, in main() File "/home/chaowang/StyleFlow/webui/app.py", line 219, in main session, model, w_avg, flow_model = init_model() File "/home/chaowang/anaconda3/envs/StyleFlow/lib/python3.7/site-packages/streamlit/caching.py", line 604, in wrapped_func return get_or_create_cached_value() File "/home/chaowang/anaconda3/envs/StyleFlow/lib/python3.7/site-packages/streamlit/caching.py", line 588, in get_or_create_cached_value return_value = func(*args, **kwargs) File "/home/chaowang/StyleFlow/webui/app.py", line 101, in init_model model = Build_model(opt) File "../utils.py", line 208, in init tflib.set_vars({var: rnd.randn(*var.shape.as_list()) for var in self.noise_vars}) File "../dnnlib/tflib/tfutil.py", line 212, in set_vars setter = tf.assign(var, tf.placeholder(var.dtype, var.shape, "new_value"), name="setter") # create new setter File "/home/chaowang/anaconda3/envs/StyleFlow/lib/python3.7/site-packages/tensorflow_core/python/ops/state_ops.py", line 227, in assign validate_shape=validate_shape) File "/home/chaowang/anaconda3/envs/StyleFlow/lib/python3.7/site-packages/tensorflow_core/python/ops/gen_state_ops.py", line 66, in assign use_locking=use_locking, name=name) File "/home/chaowang/anaconda3/envs/StyleFlow/lib/python3.7/site-packages/tensorflow_core/python/framework/op_def_library.py", line 367, in _apply_op_helper g = ops._get_graph_from_inputs(_Flatten(keywords.values())) File "/home/chaowang/anaconda3/envs/StyleFlow/lib/python3.7/site-packages/tensorflow_core/python/framework/ops.py", line 5979, in _get_graph_from_inputs _assert_same_graph(original_graph_element, graph_element) File "/home/chaowang/anaconda3/envs/StyleFlow/lib/python3.7/site-packages/tensorflow_core/python/framework/ops.py", line 5914, in _assert_same_graph (item, original_item))

Could you please help me out? Thanks!

Hans1984 avatar Feb 08 '21 10:02 Hans1984

I had the same problem.

honeytidy avatar Feb 09 '21 09:02 honeytidy

I had the same problem [2]

vladradishevsky avatar Jun 02 '21 10:06 vladradishevsky

the same [3]

Racha1992 avatar Jun 07 '21 13:06 Racha1992

the same [4]

AceCoder0 avatar Nov 30 '23 13:11 AceCoder0