Skip to content

refactoring and typing - #25

Open
noskill wants to merge 3 commits into
singnet:mainfrom
noskill:refactor
Open

refactoring and typing#25
noskill wants to merge 3 commits into
singnet:mainfrom
noskill:refactor

Conversation

@noskill

@noskill noskill commented Aug 11, 2023

Copy link
Copy Markdown
Collaborator

No description provided.

@noskill
noskill requested a review from Necr0x0Der August 11, 2023 10:51
@noskill
noskill requested a review from CICS-Oleg August 11, 2023 15:40
@noskill

noskill commented Aug 11, 2023

Copy link
Copy Markdown
Collaborator Author

We can also remove "Pipe" from class names in pipes.py It is clear anyway that in module pipes we have some pipes

@noskill
noskill requested review from mike-p-ni and removed request for mike-p-ni August 11, 2023 15:43
@noskill noskill changed the title minor refactoring and typing refactoring and typing Aug 14, 2023
@noskill
noskill requested a review from fernflow August 14, 2023 12:34
@noskill

noskill commented Aug 14, 2023

Copy link
Copy Markdown
Collaborator Author

I removed Pipe from class names as redundant. It still very clear from Prompt2Im what class is doing without "Pipe".

other renames:
CIm2ImPipe -> ControlNet2Im
fimage -> img_path
fname -> img_path
csalem -> default_cs

@Necr0x0Der Necr0x0Der closed this Aug 14, 2023
@noskill noskill reopened this Aug 14, 2023
@Necr0x0Der

Copy link
Copy Markdown
Collaborator

I removed Pipe from class names as redundant. It still very clear from Prompt2Im what class is doing without "Pipe".

This is a weak argument to rename all the classes introducing breaking changes. In diffusers, many classes start with "StableDiffusion" and end with "Pipeline", although this also is obvious. Since different points of view on naming exist, and no approach is unconditionally supreme, introducing such breaking changes without necessity is simply a bad practice. It should also be added that other classes are envisioned in metafusion, which will not be Pipes, so it makes sense to distinguish them by naming convention.

default_cs

This is a bad name, because it is obvious that these are default values, but it is not obvious what "cs" is. If renaming is introduced, it should really be superior (and hopefully optimal).

ControlNet2Im

This is a bad name, since there is no sense in transforming ControlNet to Im. And why ControlNet is fully written, while Im is not? It is also important to make naming of all Pipe classes consistent, while this renaming contradicts to both Im2ImPipe and Cond2ImPipe.

@Necr0x0Der Necr0x0Der left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments above.

@noskill

noskill commented Aug 15, 2023

Copy link
Copy Markdown
Collaborator Author

default_cs is superior to cscalem, because what "calem" or "alem" even means?

Other variants I can suggest:
control_scales or just cscales - feels the same as gscale we use for guidance scale

@Necr0x0Der

Copy link
Copy Markdown
Collaborator

default_cs is superior to cscalem, because what "calem" or "alem" even means?

"scale" means scale. Thus, default_cs is not precisely superior. And it is also not the question if it is superior or not, but if you are doing such refactoring, you should be sure that it will not be done once again right away.

Other variants I can suggest: control_scales or just cscales - feels the same as gscale we use for guidance scale

I don't have strong preferences over cscales, default_control_scales, control_scales by themselves. The only thing that the naming style should be uniform at least within components or separate files of the library.

@noskill

noskill commented Aug 17, 2023

Copy link
Copy Markdown
Collaborator Author

"scale" means scale.

Yes, but what scalem means?

@Necr0x0Der

Copy link
Copy Markdown
Collaborator

Yes, but what scalem means?

I don't even remember. It is a temporary name.

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