Open bananasss00 opened 1 year ago
problem happening after import monkeypath-hypernetwork from this extension.
hypernetwork = importlib.import_module("extensions.Hypernetwork-MonkeyPatch-Extension.patches.hypernetwork")
adding the name check solved the problem, need to look for another fix https://github.com/aria1th/Hypernetwork-MonkeyPatch-Extension/blob/4c87144b5dc67f00784cb35aa52fe30d96e49da0/patches/hypernetwork.py#L680
Any ideas?
updated: Shit, but works
try:
# backup
import modules
xy_grid = importlib.import_module("scripts.xy_grid")
hn = modules.hypernetworks.hypernetwork
hn_backup = [
hn.list_hypernetworks,
hn.load_hypernetwork,
hn.apply_hypernetwork,
hn.apply_strength,
hn.Hypernetwork,
hn.HypernetworkModule,
xy_grid.apply_hypernetwork_strength,
processing.create_infotext
]
hypernetwork = importlib.import_module("extensions.Hypernetwork-MonkeyPatch-Extension.patches.hypernetwork")
# restore
hn.list_hypernetworks = hn_backup[0]
hn.load_hypernetwork = hn_backup[1]
hn.apply_hypernetwork = hn_backup[2]
hn.apply_strength = hn_backup[3]
hn.Hypernetwork = hn_backup[4]
hn.HypernetworkModule = hn_backup[5]
xy_grid.apply_hypernetwork_strength = hn_backup[6]
processing.create_infotext = hn_backup[7]
print('Hypernetwork-MonkeyPatch-Extension found!')
monkeypatch_found = True
except ImportError:
from modules.hypernetworks import hypernetwork
print('Hypernetwork-MonkeyPatch-Extension not found')
monkeypatch_found = False
Always used default value multiplier = 1.0
i'm tried add logs in to methods https://github.com/aria1th/Hypernetwork-MonkeyPatch-Extension/blob/4c87144b5dc67f00784cb35aa52fe30d96e49da0/patches/hypernetwork.py#L125 https://github.com/aria1th/Hypernetwork-MonkeyPatch-Extension/blob/4c87144b5dc67f00784cb35aa52fe30d96e49da0/patches/hypernetwork.py#L637
And output when i'm set strength and then start generating image
I'm change default value to 0.75 in .py file Actual value HypernetworkModule.multiplier = 0.556, but inside forward method it's return default value = 0.75