Spaces:
Running
on
Zero
Running
on
Zero
fixing slider load func
Browse files
app.py
CHANGED
@@ -73,7 +73,7 @@ def infer(
|
|
73 |
if randomize_seed:
|
74 |
seed = random.randint(0, MAX_SEED)
|
75 |
|
76 |
-
sliderspace_path = f"sliderspace_weights/{slider_space}/{discovered_directions}",
|
77 |
for net in networks:
|
78 |
networks[net].load_state_dict(torch.load(sliderspace_path))
|
79 |
|
@@ -242,7 +242,7 @@ with gr.Blocks(css=css) as demo:
|
|
242 |
value=4, # Replace with defaults that work for your model
|
243 |
)
|
244 |
|
245 |
-
# gr.Examples(examples=
|
246 |
gr.on(
|
247 |
triggers=[run_button.click, prompt.submit],
|
248 |
fn=infer,
|
|
|
73 |
if randomize_seed:
|
74 |
seed = random.randint(0, MAX_SEED)
|
75 |
|
76 |
+
sliderspace_path = f"sliderspace_weights/{slider_space}/slider_{int(discovered_directions[-1])-1}.pt",
|
77 |
for net in networks:
|
78 |
networks[net].load_state_dict(torch.load(sliderspace_path))
|
79 |
|
|
|
242 |
value=4, # Replace with defaults that work for your model
|
243 |
)
|
244 |
|
245 |
+
# gr.Examples(examples=examples, inputs=[prompt])
|
246 |
gr.on(
|
247 |
triggers=[run_button.click, prompt.submit],
|
248 |
fn=infer,
|