-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Re-train the openpose ControlNet model with DWPose annotated data #2
Comments
Yes, we also notice the situation. Later we will consider training a new ControlNet model for DWPose. |
I am working on porting the preprocessor to ControlNet extension here: Mikubill/sd-webui-controlnet#1856 Somehow if I run the test I get following error:
The same |
I follow your code and try openpose_e2e_test.py. But I do not meet the problem. The problem is here when the point is None. After I fix this, I get the final output as this: |
Maybe the pth is broken? Or there are some problems with the file dir? |
Ok I found the cause. It was A1111 banning loading unsafe class RestrictedUnpickler(pickle.Unpickler):
extra_handler = None
def persistent_load(self, saved_id):
assert saved_id[0] == 'storage'
try:
return TypedStorage(_internal=True)
except TypeError:
return TypedStorage() # PyTorch before 2.0 does not have the _internal argument
def find_class(self, module, name):
if self.extra_handler is not None:
res = self.extra_handler(module, name)
if res is not None:
return res
if module == 'collections' and name == 'OrderedDict':
return getattr(collections, name)
if module == 'torch._utils' and name in ['_rebuild_tensor_v2', '_rebuild_parameter', '_rebuild_device_tensor_from_numpy']:
return getattr(torch._utils, name)
if module == 'torch' and name in ['FloatStorage', 'HalfStorage', 'IntStorage', 'LongStorage', 'DoubleStorage', 'ByteStorage', 'float32', 'BFloat16Storage']:
return getattr(torch, name)
if module == 'torch.nn.modules.container' and name in ['ParameterDict']:
return getattr(torch.nn.modules.container, name)
if module == 'numpy.core.multiarray' and name in ['scalar', '_reconstruct']:
return getattr(numpy.core.multiarray, name)
if module == 'numpy' and name in ['dtype', 'ndarray']:
return getattr(numpy, name)
if module == '_codecs' and name == 'encode':
return encode
if module == "pytorch_lightning.callbacks" and name == 'model_checkpoint':
import pytorch_lightning.callbacks
return pytorch_lightning.callbacks.model_checkpoint
if module == "pytorch_lightning.callbacks.model_checkpoint" and name == 'ModelCheckpoint':
import pytorch_lightning.callbacks.model_checkpoint
return pytorch_lightning.callbacks.model_checkpoint.ModelCheckpoint
if module == "__builtin__" and name == 'set':
return set
# Forbid everything else.
raise Exception(f"global '{module}/{name}' is forbidden") Currently the workaround seems to be pass |
Thanks for pointer! I discussed with AUTO on discord. Issue already resolved. |
@huchenlei We will release a new version with onnx. It will not rely on any mmxx. |
@huchenlei @yzd-v @continue-revolution I have controlnet installaed inside A1111 and i just downloaded the pth model and put it inside and it does not included the yaml file! can i use the model now? should i set the resolution to 384x288 as model trainde on it? Thanks |
@p0mad See Mikubill/sd-webui-controlnet#1863 for more details on how to use it in A1111 extension. The main branch is rolled back as lvmin does not want to introduce cpp dependency. Also please submit a new issue instead of continuing the thread here, as this issue is tracking the re-train ControlNet openpose model task. |
@huchenlei Now we can avoid installing mmcv through onnxruntime. Could it be available for A1111? |
what happened to this? any updates? Thanks! I realized we have the same problem. (me and thread OP) |
How was it resolved? I want to know since aI am having the same problem. Thank you! 🙏🏻 |
looking forward to seeing the model soon |
where is the new model? thanks |
hi guys, i test the controlnet openpose will not accurately produce similar number persons, such as the origial pose has three persons, while the output inference has four persons. |
Hi, Thanks for your great work!
One thing I noticed previously in ControlNet is that the openpose model is not performing well on Controlling hands. Even very accuate pose is provided (Through manual editing). I was suspecting that was caused by training set of the ControlNet model containing large amount of mis-annotated data.
Is there a existing work/plan to re-train the openpose ControlNet model with DWPose annotaed data?
Thanks for your work again!
The text was updated successfully, but these errors were encountered: