OneTrainer icon indicating copy to clipboard operation
OneTrainer copied to clipboard

[Feature] Able to set Conv layer padding mode

Open ultraman-blazar opened this issue 2 years ago • 9 comments

Hello folks,

Although there are some ways to generate tileable textures, like setting Conv layer padding mode to "circle" when generating, however, this kind of operation would greatly impact results with a bad influence. Hence, during training, if we are able to set the padding mode to "circle" by natural, then the trained model would have a good performance at generating tiling images when enable "tiling" feature in A1111.

This feature is often lacking in current finetuning tools on the market, which would make OneTrainer unique if it provided this feature during training.

Best regards.

ultraman-blazar avatar Feb 07 '24 05:02 ultraman-blazar

Reference: https://github.com/huggingface/diffusers/issues/2633#issuecomment-1676629872

ultraman-blazar avatar Feb 07 '24 07:02 ultraman-blazar

Hello guys,

Any plan on this topic please? Thanks

ultraman-blazar avatar Feb 19 '24 01:02 ultraman-blazar

Yes. This is an easy to add feature. I will add it. But right now all my time is spent adding stable cascade support.

Nerogar avatar Feb 19 '24 05:02 Nerogar

Yes. This is an easy to add feature. I will add it. But right now all my time is spent adding stable cascade support.

Thanks! Can't wait to see it. Btw, what is stable cascade? May I have some link to get familiar with it? Thanks

ultraman-blazar avatar Feb 19 '24 11:02 ultraman-blazar

new t2i model from sai https://stability.ai/news/introducing-stable-cascade, and there should be another one on the 22nd

Curlypla avatar Feb 19 '24 12:02 Curlypla

new t2i model from sai https://stability.ai/news/introducing-stable-cascade, and there should be another one on the 22nd

Thanks!

ultraman-blazar avatar Feb 22 '24 06:02 ultraman-blazar

When replacing the padding mode for SDXL, there are 2 TE, we need to replace all of the components of SDXL like: targets = [pipeline.vae, pipeline.text_encoder, pipeline.text_encoder_2, pipeline.unet]

ultraman-blazar avatar Feb 22 '24 06:02 ultraman-blazar

Hello guys, any works regarding this feature? Thanks

ultraman-blazar avatar Apr 26 '24 02:04 ultraman-blazar

Completely forgot about this. I added the setting now to the train tab. I don't have a good dataset to test it myself, so let me know how it goes.

When replacing the padding mode for SDXL, there are 2 TE, we need to replace all of the components of SDXL like: targets = [pipeline.vae, pipeline.text_encoder, pipeline.text_encoder_2, pipeline.unet]

The text encoders don't use conv layers, so this doesn't apply.

Nerogar avatar Apr 26 '24 19:04 Nerogar

Hi guys @mx @Nerogar

Just check the codes, seems we only applied the circular padding mode but without changing the behavior of conv2d. Could you please check this repo as reference please? Since it helps to generate seamless image. Thank you very much.

Ref: https://github.com/spinagon/ComfyUI-seamless-tiling/blob/master/SeamlessTile.py#L46

ultraman-blazar avatar Jun 28 '24 02:06 ultraman-blazar