Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merging Lora with Model - "Ratios" - TypeError: sequence item 12: expected str instance, float found #23

Open
cosmiclantern opened this issue Apr 9, 2023 · 0 comments

Comments

@cosmiclantern
Copy link

I'm trying to merge a Lora into a checkpoint (safetensors), and it won't let me. I think it has something to do with the value in the "Ratios" field. What is the required format for this field?
When I put any integer or float value in the "ratios" field, such as "0.7" (without quotation marks), it gives me this:

Traceback (most recent call last):
File "/opt/conda/lib/python3.10/site-packages/gradio/routes.py", line 337, in run_predict
output = await app.get_blocks().process_api(
File "/opt/conda/lib/python3.10/site-packages/gradio/blocks.py", line 1015, in process_api
result = await self.call_function(
File "/opt/conda/lib/python3.10/site-packages/gradio/blocks.py", line 833, in call_function
prediction = await anyio.to_thread.run_sync(
File "/opt/conda/lib/python3.10/site-packages/anyio/to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/opt/conda/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "/opt/conda/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 867, in run
result = context.run(func, *args)
File "/content/kohya-sd-scripts-webui/scripts/runner.py", line 38, in run
proc = run_python(script_file, get_templates(), get_options(), args)
File "/content/kohya-sd-scripts-webui/scripts/utilities.py", line 277, in run_python
print("Start process: ", " ".join(proc_args))
TypeError: sequence item 12: expected str instance, float found


If I leave the "ratios" field blank, it gives me this:

Traceback (most recent call last):
File "/content/kohya-sd-scripts-webui/kohya_ss/networks/merge_lora.py", line 243, in
merge(args)
File "/content/kohya-sd-scripts-webui/kohya_ss/networks/merge_lora.py", line 173, in merge
assert len(args.models) == len(args.ratios), f"number of models must be equal to number of ratios / モデルの数と重みの数は合わせてください"
TypeError: object of type 'NoneType' has no len()


Where are these typeerrors? What am I doing wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant