Tiling never coming back?
Is it officially abandoned?
This shit been dead for a while, homie. Comfy is all we have left. People don't even respond to bounties for this thing.
@DenOfEquity, I just came to notice your Ersatz Forge mentions 'Tiling'. So, did you get it to work again and is it a question of replacing a python script / some lines of code?
Quick examples:
Quick examples:
@DenOfEquity That looks absolutely perfect to me!
Is it possible to replace the needed scripts (etc.) to have Tiling working again in Forge WebUi? - I do not want to install an additional Forge fork (Ersatz Forge in this case), I would like to leave my current installation as is, just get the Tiling function integrated again.
If it is a matter of just replacing some lines of python code, I can do that, if you told me where and how.
Untested in official Forge:
- rewritten
apply_circular_forgefunction inmodules_forge/utils.py(new implementation is a bit hacky, patches a Torch function)- replacement code:
from typing import Optional
original_conv2dForward = torch.nn.Conv2d._conv_forward
def apply_circular_forge(model, tiling_enabled="None"):
if not (model.is_sd1 or model.is_sd2 or model.is_sdxl):
tiling_enabled = "None"
model.tiling_enabled = tiling_enabled
def __replacementConv2DForward(self, input: torch.Tensor, weight: torch.Tensor, bias: Optional[torch.Tensor]):
modeX = 'circular' if 'X' in model.tiling_enabled else 'constant'
modeY = 'circular' if 'Y' in model.tiling_enabled else 'constant'
paddingX = (self._reversed_padding_repeated_twice[0], self._reversed_padding_repeated_twice[1], 0, 0)
paddingY = (0, 0, self._reversed_padding_repeated_twice[2], self._reversed_padding_repeated_twice[3])
working = torch.nn.functional.pad(input, paddingX, mode=modeX)
working = torch.nn.functional.pad(working, paddingY, mode=modeY)
return torch.nn.functional.conv2d(working, weight, bias, self.stride, torch.nn.modules.utils._pair(0), self.dilation, self.groups)
if tiling_enabled == "None":
torch.nn.Conv2d._conv_forward = original_conv2dForward
else:
torch.nn.Conv2d._conv_forward = __replacementConv2DForward
return
- adjustment to the tiling setting in
modules/shared_options.pyfor width/height/both tiling (one line)- replacement line:
"tiling": OptionInfo("None", "Tiling", gr.Radio, {"choices": ["None", "X", "Y", "X and Y"]}, infotext='Tiling').info("produce a tileable picture"),
- replacement line:
- non-essential: update infotext writing in
modules/processing.py(one line) to properly write new setting - non-essential: update infotext reading in
modules/infotext_utils.py, only for back compat with old method
@DenOfEquity: You are the hero of the year, I can confirm that it is working. Thank you a lot!
SDXL model, DPM++ 3M SDE, Karras, CFG 7.5, 1024x1024 (values below 1024x1024 tend to give bad results)
