nickyreinert-vml
commited on
Commit
·
ddd360b
1
Parent(s):
739e268
fixing wrong event listener for attention_slicing
Browse files
app.py
CHANGED
@@ -125,6 +125,12 @@ def variant_change(variant, config):
|
|
125 |
config = set_config(config, 'variant', variant)
|
126 |
|
127 |
return config, config, assemble_code(config)
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
|
129 |
def safety_checker_change(safety_checker, config):
|
130 |
|
@@ -546,7 +552,7 @@ with gr.Blocks(analytics_enabled=False) as demo:
|
|
546 |
in_data_type.change(data_type_change, inputs=[in_data_type, config], outputs=[config, out_config, out_code], js="(value, config) => set_cookie('data_type', value, config)")
|
547 |
in_allow_tensorfloat32.change(tensorfloat32_change, inputs=[in_allow_tensorfloat32, config], outputs=[config, out_config, out_code], js="(value, config) => set_cookie('allow_tensorfloat32', value, config)")
|
548 |
in_variant.change(variant_change, inputs=[in_variant, config], outputs=[config, out_config, out_code], js="(value, config) => set_cookie('variant', value, config)")
|
549 |
-
in_attention_slicing.change(
|
550 |
in_model_refiner.change(model_refiner_change, inputs=[in_model_refiner, config], outputs=[config, out_config, out_code], js="(value, config) => set_cookie('model_refiner', value, config)")
|
551 |
in_cpu_offload.change(cpu_offload_change, inputs=[in_cpu_offload, config], outputs=[config, out_config, out_code], js="(value, config) => set_cookie('cpu_offload', value, config)")
|
552 |
in_safety_checker.change(safety_checker_change, inputs=[in_safety_checker, config], outputs=[config, out_config, out_code], js="(value, config) => set_cookie('safety_checker', value, config)")
|
|
|
125 |
config = set_config(config, 'variant', variant)
|
126 |
|
127 |
return config, config, assemble_code(config)
|
128 |
+
|
129 |
+
def attention_slicing_change(attention_slicing, config):
|
130 |
+
|
131 |
+
config = set_config(config, 'attention_slicing', attention_slicing)
|
132 |
+
|
133 |
+
return config, config, assemble_code(config)
|
134 |
|
135 |
def safety_checker_change(safety_checker, config):
|
136 |
|
|
|
552 |
in_data_type.change(data_type_change, inputs=[in_data_type, config], outputs=[config, out_config, out_code], js="(value, config) => set_cookie('data_type', value, config)")
|
553 |
in_allow_tensorfloat32.change(tensorfloat32_change, inputs=[in_allow_tensorfloat32, config], outputs=[config, out_config, out_code], js="(value, config) => set_cookie('allow_tensorfloat32', value, config)")
|
554 |
in_variant.change(variant_change, inputs=[in_variant, config], outputs=[config, out_config, out_code], js="(value, config) => set_cookie('variant', value, config)")
|
555 |
+
in_attention_slicing.change(attention_slicing_change, inputs=[in_attention_slicing, config], outputs=[config, out_config, out_code], js="(value, config) => set_cookie('attention_slicing', value, config)")
|
556 |
in_model_refiner.change(model_refiner_change, inputs=[in_model_refiner, config], outputs=[config, out_config, out_code], js="(value, config) => set_cookie('model_refiner', value, config)")
|
557 |
in_cpu_offload.change(cpu_offload_change, inputs=[in_cpu_offload, config], outputs=[config, out_config, out_code], js="(value, config) => set_cookie('cpu_offload', value, config)")
|
558 |
in_safety_checker.change(safety_checker_change, inputs=[in_safety_checker, config], outputs=[config, out_config, out_code], js="(value, config) => set_cookie('safety_checker', value, config)")
|