Skip to content

Adding A Person Mask Generator#231

Merged
w-e-w merged 2 commits intoAUTOMATIC1111:extensionsfrom
djbielejeski:extensions
Nov 18, 2023
Merged

Adding A Person Mask Generator#231
w-e-w merged 2 commits intoAUTOMATIC1111:extensionsfrom
djbielejeski:extensions

Conversation

@djbielejeski
Copy link
Copy Markdown
Contributor

@djbielejeski djbielejeski commented Nov 17, 2023

Info

https://github.com/djbielejeski/a-person-mask-generator
Generates masks for people for img2img

https://github.com/djbielejeski/folder-batch-automatic1111-extension
Better batching from a folder

Checklist:

  • I have read the Readme.md
  • The description is written in English.
  • The index.json and extension_template.json have not been modified.
  • The entry is placed in the extensions directory with the .json file extension.

@w-e-w
Copy link
Copy Markdown
Collaborator

w-e-w commented Nov 17, 2023

@djbielejeski thanks for submitting a PR

I tested a-person-mask-generator and it works fine,
but I'm unsure why you tagged this extension with the online tag
yes you are downloading the model from internet but this is considered a one-time download of assets which is an exception to the online tag
unless there is something that I missed (like hidden telemetry somewhere) this extension should not be using the online tag
if you just misunderstood and readme then please remove the tag

online tag is Required for any extension that connections to external server during regular use aside from one time downloading of assets.

after they tag issue has been cleared up this extension can be added at any time

found 1 minor Improvement, your explicitly setting a static path for your model path,
https://github.com/djbielejeski/a-person-mask-generator/blob/main/scripts/a_person_mask_generator.py#L55
even though nothing will be broken by you setting a static path, best practice is to base your path off modules/paths_internal.py models_path this would mean that the path can be changed via --data-dir cmd arg


about folder-batch-automatic1111-extension

  1. sorry to say this but I don't understand why this extension exist
    you claim this to be a "Better batching from a folder", but I don't see this offer anything more than the built-in batch mode
    since you don't have any documentations explaining the future of your extension I look at the code and didn't found anything special
    so unless I'm missing something major, this extension cannot be added to the index
    image

  2. Error
    you're unused of sd_model import seems to trigger a following import error https://github.com/djbielejeski/folder-batch-automatic1111-extension/blob/main/scripts/folder_batch.py#L9C51-L9C59

expand to to see error logs

loading stable diffusion model: ImportError
Traceback (most recent call last):
  File "B:\GitHub\stable-diffusion-webui\launch.py", line 48, in <module>
    main()
  File "B:\GitHub\stable-diffusion-webui\launch.py", line 44, in main
    start()
  File "B:\GitHub\stable-diffusion-webui\modules\launch_utils.py", line 436, in start
    webui.webui()
  File "B:\GitHub\stable-diffusion-webui\webui.py", line 52, in webui
    initialize.initialize()
  File "B:\GitHub\stable-diffusion-webui\modules\initialize.py", line 75, in initialize
    initialize_rest(reload_script_modules=False)
  File "B:\GitHub\stable-diffusion-webui\modules\initialize.py", line 111, in initialize_rest
    scripts.load_scripts()
  File "B:\GitHub\stable-diffusion-webui\modules\scripts.py", line 382, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "B:\GitHub\stable-diffusion-webui\modules\script_loading.py", line 10, in load_module
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "B:\GitHub\stable-diffusion-webui\extensions\folder-batch-automatic1111-extension\scripts\folder_batch.py", line 9, in <module>
    from modules.shared import opts, cmd_opts, state, sd_model
  File "B:\GitHub\stable-diffusion-webui\modules\shared_items.py", line 112, in sd_model
    return modules.sd_models.model_data.get_sd_model()
  File "B:\GitHub\stable-diffusion-webui\modules\sd_models.py", line 522, in get_sd_model
    load_model()
  File "B:\GitHub\stable-diffusion-webui\modules\sd_models.py", line 655, in load_model
    sd_hijack.model_hijack.hijack(sd_model)
  File "B:\GitHub\stable-diffusion-webui\modules\sd_hijack.py", line 259, in hijack
    import modules.models.diffusion.ddpm_edit
  File "B:\GitHub\stable-diffusion-webui\modules\models\diffusion\ddpm_edit.py", line 27, in <module>
    from ldm.models.autoencoder import VQModelInterface, IdentityFirstStage, AutoencoderKL
ImportError: cannot import name 'VQModelInterface' from 'ldm.models.autoencoder' (B:\GitHub\stable-diffusion-webui\repositories\stable-diffusion-stability-ai\ldm\models\autoencoder.py)

  1. if it's the case that I have misunderstood the point of this extension then about self advertisement and ads tag
    you have a repo link which serves no purpose other than self-advertisement in the script
    image
    I don't want to repeat the same conversation again so I'll just link to a previous conversation
    add sd-webui-FaceChain #206 (comment)

@w-e-w
Copy link
Copy Markdown
Collaborator

w-e-w commented Nov 17, 2023

update
looking at folder-batch-automatic1111-extension again
I realize the function of your extension seems to be the presentation

basically your extensions allow showing the resulting images in the UI
which is something that the built-in batch mode does not do

realizing this this I make a PR to make it possible to show generated images in the built-in batch mode
AUTOMATIC1111/stable-diffusion-webui#14009

@djbielejeski
Copy link
Copy Markdown
Contributor Author

@w-e-w Thank you for your detailed feedback.

I've removed the Folder-Batch extension and updated the tags for a-person-mask-generator to remove the online tag.

@w-e-w w-e-w changed the title Adding A Person Mask Generator and Folder Batch extensions Adding A Person Mask Generator Nov 18, 2023
@w-e-w w-e-w merged commit e6bcc12 into AUTOMATIC1111:extensions Nov 18, 2023
github-actions bot pushed a commit that referenced this pull request Nov 18, 2023
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

Successfully merging this pull request may close these issues.

2 participants