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

[Bug]: --sd_model in "Promts from file or textbox" script is not working #8079

Open
1 task done
DukemFIVE opened this issue Feb 24, 2023 · 1 comment
Open
1 task done
Labels
bug-report Report of a bug, yet to be confirmed

Comments

@DukemFIVE
Copy link

Is there an existing issue for this?

  • I have searched the existing issues and checked the recent builds/commits

What happened?

When you try to change the model with the --sd_model command the error "AssertionError: unknown commandline option: --sd_model" comes up

Steps to reproduce the problem

  1. Select Script "Prompts from file or textbox"
  2. Type in --sd_model "modelname"
  3. Get the Error

What should have happened?

The model should have changed to "modelname"

Commit where the problem happens

65995a2

What platforms do you use to access the UI ?

Windows

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

No

List of extensions

No

Console logs

venv "C:\ai\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.9 (tags/v3.10.9:1dd9be6, Dec  6 2022, 20:01:21) [MSC v.1934 64 bit (AMD64)]
Commit hash: 0cc0ee1bcb4c24a8c9715f66cede06601bfc00c8
Installing requirements for Web UI
Launching Web UI with arguments:
No module 'xformers'. Proceeding without it.
[AddNet] Updating model hashes...
0it [00:00, ?it/s]
[AddNet] Updating model hashes...
0it [00:00, ?it/s]
Loading Unprompted v7.5.9 by Therefore Games
(SETUP) Initializing Unprompted object...
(SETUP) Loading configuration files...
(SETUP) Debug mode is False
Loading weights [68395c85a8] from C:\ai\stable-diffusion-webui\models\Stable-diffusion\alliedunn5000.ckpt
Creating model from config: C:\ai\stable-diffusion-webui\configs\v1-inference.yaml
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
Applying cross attention optimization (Doggettx).
Model loaded in 3.3s (load weights from disk: 0.5s, create model: 0.4s, apply weights to model: 0.4s, apply half(): 0.5s, move model to device: 0.6s, load textual inversion embeddings: 0.9s).
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Error parsing line --prompt "photo of annapinna, detailed skin, woman, looking to camera, natural look, high quality photography, Canon EOS R3" --negative_prompt "deformed, ugly, creepy, mutation" --steps 30 --cfg_scale 9.5 --sampler_name "Eulera"  --width 512 --height 512 --sd_model [68395c85a81] as commandline:
Traceback (most recent call last):
  File "C:\ai\stable-diffusion-webui\scripts\prompts_from_file.py", line 141, in run
    args = cmdargs(line)
  File "C:\ai\stable-diffusion-webui\scripts\prompts_from_file.py", line 88, in cmdargs
    assert func, f'unknown commandline option: {arg}'
AssertionError: unknown commandline option: --sd_model

Will process 1 lines in 1 jobs.
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:05<00:00,  3.79it/s]
Total progress: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:04<00:00,  4.53it/s]

Additional information

No response

@DukemFIVE DukemFIVE added the bug-report Report of a bug, yet to be confirmed label Feb 24, 2023
@rnapoli
Copy link

rnapoli commented Sep 22, 2023

Thanks a lot Zolxys, the fix worked fine !!!

k1nos added a commit to k1nos/stable-diffusion-webui that referenced this issue Oct 11, 2023
commit 891ccb7
Author: Kohaku-Blueleaf <[email protected]>
Date:   Tue Oct 10 15:07:25 2023 +0800

    Fix lint

commit 81e94de
Author: Kohaku-Blueleaf <[email protected]>
Date:   Tue Oct 10 14:44:20 2023 +0800

    Add warning when meet emb name conflicting

    Choose standalone embedding (in /embeddings folder) first

commit 2282eb8
Author: Kohaku-Blueleaf <[email protected]>
Date:   Tue Oct 10 12:11:00 2023 +0800

    Remove dev debug print

commit 3d8b1af
Author: Kohaku-Blueleaf <[email protected]>
Date:   Tue Oct 10 12:09:33 2023 +0800

    Support string_to_param nested dict

    format:
    bundle_emb.EMBNAME.string_to_param.KEYNAME

commit 2aa485b
Author: Kohaku-Blueleaf <[email protected]>
Date:   Mon Oct 9 22:52:09 2023 +0800

    add lora bundle system

commit 7d60076
Author: AUTOMATIC1111 <[email protected]>
Date:   Tue Oct 3 16:22:32 2023 +0300

    case-insensitive search for settings

commit 7717192
Merge: c4ffeb8 c2279da
Author: AUTOMATIC1111 <[email protected]>
Date:   Tue Oct 3 12:38:11 2023 +0300

    Merge pull request AUTOMATIC1111#13475 from wkpark/regress-fix

    fix regression

commit c4ffeb8
Merge: dc2074c e538132
Author: AUTOMATIC1111 <[email protected]>
Date:   Tue Oct 3 12:37:46 2023 +0300

    Merge pull request AUTOMATIC1111#13480 from AUTOMATIC1111/popup-fix

    Fix accidentally closing popup dialogs

commit e538132
Author: missionfloyd <[email protected]>
Date:   Mon Oct 2 22:33:03 2023 -0600

    Lint

commit 86a46e8
Author: missionfloyd <[email protected]>
Date:   Mon Oct 2 22:22:15 2023 -0600

    Fix accidentally closing popup dialogs

commit c2279da
Author: Won-Kyu Park <[email protected]>
Date:   Tue Oct 3 01:16:41 2023 +0900

    fix re_param_code (regression bug PR AUTOMATIC1111#13458)

commit dc2074c
Merge: 362675e 3f763d4
Author: AUTOMATIC1111 <[email protected]>
Date:   Mon Oct 2 13:05:27 2023 +0300

    Merge pull request AUTOMATIC1111#13466 from AUTOMATIC1111/denoising-none

    Change denoising_strength default to None.

commit 362675e
Merge: e3c849d 6ab0b65
Author: AUTOMATIC1111 <[email protected]>
Date:   Mon Oct 2 12:47:02 2023 +0300

    Merge pull request AUTOMATIC1111#13469 from PermissionDenied7335/master

    I found a code snippet in webui.sh that disables python venv and moved it to the appropriate location

commit 6ab0b65
Author: PermissionDenied7335 <[email protected]>
Date:   Mon Oct 2 15:43:59 2023 +0800

    Added an option not to enable venv

commit 3f763d4
Author: missionfloyd <[email protected]>
Date:   Sun Oct 1 22:38:27 2023 -0600

    Change denoising_strength default to None.

commit e3c849d
Merge: c011387 deeec0b
Author: AUTOMATIC1111 <[email protected]>
Date:   Sun Oct 1 11:49:42 2023 +0300

    Merge pull request AUTOMATIC1111#13458 from wkpark/fieldname-regex

    fix fieldname regex

commit c011387
Author: AUTOMATIC1111 <[email protected]>
Date:   Sun Oct 1 11:48:41 2023 +0300

    add search field to settings

commit deeec0b
Author: Won-Kyu Park <[email protected]>
Date:   Sun Oct 1 00:25:53 2023 +0900

    fix fieldname regex to accept additional [-/] chars

commit c7e810a
Author: AUTOMATIC1111 <[email protected]>
Date:   Sun Oct 1 10:15:23 2023 +0300

    add onEdit function for js and rework token-counter.js to use it

commit 7026b96
Merge: b2f9709 56ef5e9
Author: AUTOMATIC1111 <[email protected]>
Date:   Sun Oct 1 07:04:08 2023 +0300

    Merge pull request AUTOMATIC1111#13444 from AUTOMATIC1111/edit-attn-delimiters

    edit-attention: Allow editing whitespace delimiters

commit 56ef5e9
Author: missionfloyd <[email protected]>
Date:   Sat Sep 30 21:44:05 2023 -0600

    Remove end parenthesis from weight

commit 0eb5fde
Author: missionfloyd <[email protected]>
Date:   Sat Sep 30 21:20:58 2023 -0600

    Remove unneeded code

commit 0935d2c
Author: missionfloyd <[email protected]>
Date:   Sat Sep 30 18:37:44 2023 -0600

    Use checkboxes for whitespace delimiters

commit b2f9709
Author: AUTOMATIC1111 <[email protected]>
Date:   Sat Sep 30 10:29:10 2023 +0300

    get AUTOMATIC1111#13121 to work without restart

commit 5cc7bf3
Author: AUTOMATIC1111 <[email protected]>
Date:   Sat Sep 30 10:10:57 2023 +0300

    reword sd_checkpoint_dropdown_use_short setting and add explanation

commit 416fbde
Merge: 951842d 4588170
Author: AUTOMATIC1111 <[email protected]>
Date:   Sat Sep 30 10:09:45 2023 +0300

    Merge pull request AUTOMATIC1111#13121 from AUTOMATIC1111/consolidated-allowed-preview-formats

    Consolidated allowed preview formats, Fix extra network `.gif` not woking as preview

commit 1cc7c4b
Author: missionfloyd <[email protected]>
Date:   Sat Sep 30 01:09:09 2023 -0600

    Allow editing whitespace delimiters

commit 951842d
Merge: 591ad1d 63485b2
Author: AUTOMATIC1111 <[email protected]>
Date:   Sat Sep 30 10:02:28 2023 +0300

    Merge pull request AUTOMATIC1111#13139 from AUTOMATIC1111/ckpt-dir-path-separator

    fix `--ckpt-dir` path separator and option use `short name` for checkpoint dropdown

commit 591ad1d
Merge: fcfe5c1 ab57417
Author: AUTOMATIC1111 <[email protected]>
Date:   Sat Sep 30 09:59:21 2023 +0300

    Merge pull request AUTOMATIC1111#13170 from AUTOMATIC1111/re-fix-batch-img2img-output-dir-with-script

    Re fix batch img2img output dir with script

commit fcfe5c1
Merge: a0e979b 26d0d87
Author: AUTOMATIC1111 <[email protected]>
Date:   Sat Sep 30 09:49:37 2023 +0300

    Merge pull request AUTOMATIC1111#12877 from zixaphir/removeExtraNetworksFromPrompt_fix

    account for customizable extra network separators in remove code

commit a0e979b
Merge: 3aa9f01 7d4d871
Author: AUTOMATIC1111 <[email protected]>
Date:   Sat Sep 30 09:48:38 2023 +0300

    Merge pull request AUTOMATIC1111#13178 from wpdong0727/fix-lora-bias-backup-reset

    fix: lora-bias-backup don't reset cache

commit 3aa9f01
Merge: 4e5d252 413123f
Author: AUTOMATIC1111 <[email protected]>
Date:   Sat Sep 30 09:47:52 2023 +0300

    Merge pull request AUTOMATIC1111#13077 from sdwebui-extensions/master

    fix localization when there are multi same localization file in the extensions

commit 4e5d252
Merge: ab63054 c485a7d
Author: AUTOMATIC1111 <[email protected]>
Date:   Sat Sep 30 09:46:55 2023 +0300

    Merge pull request AUTOMATIC1111#13189 from AUTOMATIC1111/make-InputAccordion-work-with-ui-config

    make InputAccordion work with ui-config

commit ab63054
Author: AUTOMATIC1111 <[email protected]>
Date:   Sat Sep 30 09:34:50 2023 +0300

    write infotext to gif image as comment

commit 0c71967
Merge: b20cd35 022639a
Author: AUTOMATIC1111 <[email protected]>
Date:   Sat Sep 30 09:33:14 2023 +0300

    Merge pull request AUTOMATIC1111#13068 from JaredTherriault/master

    Load comments from gif images to gather geninfo from gif outputs

commit b20cd35
Merge: 3a4290f 5b761b4
Author: AUTOMATIC1111 <[email protected]>
Date:   Sat Sep 30 09:23:32 2023 +0300

    Merge pull request AUTOMATIC1111#13210 from AUTOMATIC1111/fetch-version-info-when-webui_dir-is-not-work_dir-

    fix issues when webui_dir is not work_dir

commit 3a4290f
Merge: df48222 cf1edc2
Author: AUTOMATIC1111 <[email protected]>
Date:   Sat Sep 30 09:21:47 2023 +0300

    Merge pull request AUTOMATIC1111#13229 from AUTOMATIC1111/initialize-state.time_start-befroe-state.job_count

    initialize state.time_start befroe state.job_count

commit df48222
Merge: ee8e987 0ad38a9
Author: AUTOMATIC1111 <[email protected]>
Date:   Sat Sep 30 09:21:08 2023 +0300

    Merge pull request AUTOMATIC1111#13231 from der3318/better-support-for-portable-git

    Better Support for Portable Git

commit ee8e987
Merge: 87b5039 afd0624
Author: AUTOMATIC1111 <[email protected]>
Date:   Sat Sep 30 09:17:24 2023 +0300

    Merge pull request AUTOMATIC1111#13266 from wkpark/xyz-prepare

    xyz_grid: add prepare

commit 87b5039
Author: AUTOMATIC1111 <[email protected]>
Date:   Sat Sep 30 09:11:31 2023 +0300

    add missing import, simplify code, use patches module for AUTOMATIC1111#13276

commit e309583
Merge: 7ce1f3a d9d9414
Author: AUTOMATIC1111 <[email protected]>
Date:   Sat Sep 30 09:01:12 2023 +0300

    Merge pull request AUTOMATIC1111#13276 from woweenie/patch-1

    patch DDPM.register_betas so that users can put given_betas in model yaml

commit 7ce1f3a
Merge: db63cf7 663fb87
Author: AUTOMATIC1111 <[email protected]>
Date:   Sat Sep 30 08:59:28 2023 +0300

    Merge pull request AUTOMATIC1111#13281 from AUTOMATIC1111/Config-states-time-ISO-in-system-time-zone

    Config states time ISO in system time zone

commit db63cf7
Merge: cdafbca d2878a8
Author: AUTOMATIC1111 <[email protected]>
Date:   Sat Sep 30 08:58:07 2023 +0300

    Merge pull request AUTOMATIC1111#13282 from AUTOMATIC1111/XYZ-if-not-Include-Sub-Grids-do-not-save-Sub-Grid

    XYZ if not include sub grids do not save sub grid

commit cdafbca
Merge: 34055f9 8e355fb
Author: AUTOMATIC1111 <[email protected]>
Date:   Sat Sep 30 08:55:54 2023 +0300

    Merge pull request AUTOMATIC1111#13313 from chu8129/dev

    use orderdict as lru cache:opt/bug

commit 34055f9
Merge: 9b17416 701feab
Author: AUTOMATIC1111 <[email protected]>
Date:   Sat Sep 30 08:49:26 2023 +0300

    Merge pull request AUTOMATIC1111#13302 from Zolxys/patch-1

    Fix: --sd_model in "Prompts from file or textbox" script is not working

commit 9b17416
Merge: 833b9b6 fdecf81
Author: AUTOMATIC1111 <[email protected]>
Date:   Sat Sep 30 08:46:48 2023 +0300

    Merge pull request AUTOMATIC1111#13372 from ezt19/patch-1

    Update dragdrop.js

commit 833b9b6
Merge: 3b0be0f d00f6dc
Author: AUTOMATIC1111 <[email protected]>
Date:   Sat Sep 30 08:32:38 2023 +0300

    Merge pull request AUTOMATIC1111#13395 from AUTOMATIC1111/escape-names

    Fix viewing/editing metadata when filename contains an apostrophe

commit 3b0be0f
Merge: 4083639 99aa702
Author: AUTOMATIC1111 <[email protected]>
Date:   Sat Sep 30 08:32:07 2023 +0300

    Merge pull request AUTOMATIC1111#13411 from AUTOMATIC1111/update-card-metadata

    Update card on correct tab when editing metadata

commit 4083639
Merge: 8a75838 30f4f25
Author: AUTOMATIC1111 <[email protected]>
Date:   Sat Sep 30 08:31:30 2023 +0300

    Merge pull request AUTOMATIC1111#13418 from akx/torchsde-bump

    Bump to torchsde==0.2.6

commit 8a75838
Merge: ad3b8a1 a69daae
Author: AUTOMATIC1111 <[email protected]>
Date:   Sat Sep 30 08:24:37 2023 +0300

    Merge pull request AUTOMATIC1111#13412 from AUTOMATIC1111/data-sort-name-fix

    Fix data-sort-name containing spaces

commit ad3b8a1
Author: AUTOMATIC1111 <[email protected]>
Date:   Sat Sep 30 08:23:12 2023 +0300

    alternative solution to AUTOMATIC1111#13434

commit 1b9ca01
Merge: 102b661 ab3d352
Author: AUTOMATIC1111 <[email protected]>
Date:   Sat Sep 30 08:15:00 2023 +0300

    Merge pull request AUTOMATIC1111#13253 from LeonZhao28/feature_skip_load_model_at_start

    add --skip-load-model-at-start

commit 30f4f25
Author: Aarni Koskela <[email protected]>
Date:   Wed Sep 27 10:21:14 2023 +0300

    Bump to torchsde==0.2.6

commit a69daae
Author: missionfloyd <[email protected]>
Date:   Tue Sep 26 22:02:52 2023 -0600

    Fix data-sort-name containing spaces

commit 99aa702
Author: missionfloyd <[email protected]>
Date:   Tue Sep 26 21:08:55 2023 -0600

    Update card on correct tab

commit d00f6dc
Author: missionfloyd <[email protected]>
Date:   Mon Sep 25 22:08:24 2023 -0600

    Escape item names

commit fdecf81
Author: ezt19 <[email protected]>
Date:   Sat Sep 23 20:41:28 2023 +0000

    Update dragdrop.js

    Fixing a problem when u cannot put two images and they are going into two different places for images.

commit 8e355fb
Author: 王秋文/qwwang <[email protected]>
Date:   Mon Sep 18 16:45:42 2023 +0800

    fix

commit 701feab
Author: Zolxys <[email protected]>
Date:   Sun Sep 17 11:37:15 2023 -0500

    Fix: --sd_model in "Promts from file or textbox" script is not working

    Fix for bug report AUTOMATIC1111#8079

commit d9d9414
Author: woweenie <[email protected]>
Date:   Fri Sep 15 18:59:44 2023 +0200

    patch DDPM.register_betas so that users can put given_betas in model yaml

commit 813535d
Author: qiuwen.wang <[email protected]>
Date:   Fri Sep 15 18:23:23 2023 +0800

    use dict[key]=model; did not update orderdict order, should use move to end

commit afd0624
Author: Won-Kyu Park <[email protected]>
Date:   Fri Sep 15 17:10:01 2023 +0900

    xyz_grid: add prepare option to AxisOption

commit ab3d352
Author: Leon <[email protected]>
Date:   Thu Sep 14 18:42:56 2023 +0800

    add --skip-load-model-at-start

commit 0ad38a9
Author: Der Chien <[email protected]>
Date:   Wed Sep 13 20:20:01 2023 +0800

    20230913 setup GIT_PYTHON_GIT_EXECUTABLE for GitPython

commit cf1edc2
Author: w-e-w <[email protected]>
Date:   Wed Sep 13 16:27:02 2023 +0900

    initialize state.time_start befroe state.job_count

commit c485a7d
Author: w-e-w <[email protected]>
Date:   Mon Sep 11 13:47:44 2023 +0900

    make InputAccordion work with ui-config

commit 413123f
Author: liubo0902 <[email protected]>
Date:   Mon Sep 11 09:22:27 2023 +0800

    Update localization.py

commit 7d4d871
Author: dongwenpu <[email protected]>
Date:   Sun Sep 10 17:53:42 2023 +0800

    fix: lora-bias-backup don't reset cache

commit 26d0d87
Author: zixaphir <[email protected]>
Date:   Sat Sep 9 17:26:46 2023 -0700

    Remove extra spaces

commit d6478a6
Author: zixaphir <[email protected]>
Date:   Sat Sep 9 17:22:10 2023 -0700

    Remove extra network separator without regex

commit 63485b2
Author: w-e-w <[email protected]>
Date:   Fri Sep 8 10:00:27 2023 +0900

    option use short name for checkpoint dropdown

commit e4726cc
Author: w-e-w <[email protected]>
Date:   Fri Sep 8 09:46:34 2023 +0900

    parsing string to path

commit 4588170
Author: w-e-w <[email protected]>
Date:   Thu Sep 7 12:11:36 2023 +0900

    consolidated allowed preview formats

commit ff7027f
Author: liubo0902 <[email protected]>
Date:   Tue Sep 5 15:08:59 2023 +0800

    Update localization.py

commit 0c1c9e7
Author: liubo0902 <[email protected]>
Date:   Tue Sep 5 15:06:47 2023 +0800

    Update localization.py

commit 022639a
Author: JaredTherriault <[email protected]>
Date:   Mon Sep 4 17:37:48 2023 -0700

    Load comments from gif images to gather geninfo from gif outputs

commit 5e16914
Merge: 8f3b02f 5ef669d
Author: JaredTherriault <[email protected]>
Date:   Mon Sep 4 17:29:33 2023 -0700

    Merge branch 'AUTOMATIC1111:master' into master

commit 8f3b02f
Author: JaredTherriault <[email protected]>
Date:   Sun Sep 3 13:31:42 2023 -0700

    Revert "Offloading custom work"

    This reverts commit f3d1631.

    This work has been offloaded now into an extension called Prompt Control.

commit 78c1a74
Author: zixaphir <[email protected]>
Date:   Thu Aug 31 14:18:35 2023 -0700

    Account for edge case where user deleted leading separator.

commit 41196cc
Author: zixaphir <[email protected]>
Date:   Wed Aug 30 20:20:19 2023 -0700

    account for customizable extra network separators in remove code

    previous behavior only searched for leading spaces

commit f3d1631
Author: JaredTherriault <[email protected]>
Date:   Sun Aug 27 21:54:05 2023 -0700

    Offloading custom work

    -custom_statics works to do mass replace strings, intended for copy-pasting gen info from internet generations and replacing unsavory prompts with safer prompts for my own sanity
    -tried to implement this into generation_parameters_copypaste but it didn't work out this iteration, presumably because we return a string and the calling method is looking for an object type
    -updated webui-user.bat to set a custom temp directory (for disk space concerns) and to apply xformers (for generation speed)

    I probably won't be merging any of this work into the main repo since I don't want to mess with anyone else's prompts, this is just intended to keep my workspace safe from anything I don't want to see. Eventually this should be done in an extension which I could then publish, but I need to learn a lot more about the extension and callback systems in the main repo first. just uploading this to my fork for now so i don't lose the current progress.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-report Report of a bug, yet to be confirmed
Projects
None yet
Development

No branches or pull requests

2 participants