lllyasviel / lllyasviel/ControlNet

Refactor code to use a dictionary for models instead of global variables for improved readability and maintainability.

Open
#87 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
34.1k
Forks
3k
PR merge metrics
No merged PRs in 30d

Description

Use a dictionary to store the models instead of global variables. Instead of using model_canny, model_hed, model_mlsd, model_midas, model_openpose, and model_uniformer, you could create a dictionary with the model name as the key and the value as the corresponding model. This would make the code more readable and easier to maintain.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue does not identify a file, test, or entry point. Start by locating the definitions and uses of model_canny, model_hed, model_mlsd, model_midas, model_openpose, and model_uniformer, then trace how they are accessed. Done means those globals are replaced by a model-name dictionary without changing model behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.