Closed StephenYangjz closed 4 months ago
Hi, I'm unsure why it might not be working on your project.
Regarding the image guidance arguments, I'm not getting the unrecognized options error and I'm seeing them in the pipeline section of ns-train igs2gs --help
. Could you try updating the repo with git pull
and run pip install -e .
in the igs2gs folder? You might also need to update nerfstudio, but I'm not sure.
The pipeline should be getting called including the Instruct-Pix2Pix image edit. Could you try saving and checking the instruct-pix2pix edited image to see if it is running correctly (adding plt.imsave("edited_image_"+ str(idx)+".jpg", edited_image.squeeze().permute(1, 2, 0).detach().cpu().numpy())
at around line 142 in igs2gs_pipeline.py). The pipeline should be working if the saved debug image appears edited.
The pipeline will first edit all images in the training set (which takes about few seconds per image) and then trains for 2.5k, then it repeats this process, so the splat won't appear edited until the full dataset is updated (should be a few min for ~100 image dataset).
Let me know if you run into any other problems
Hi @cvachha Thanks for your reply. I tried exactly what you suggested before already, but it seems like the igs2gs_pipeline.py is not even up running...
I just pulled gsplat, igs2gs, and nerfstudio and pip install -e .
'ed all of them. It seems like tho, the code will have the error message below if I run the same command:
(nerfstudio) stephen@itx:~/Desktop/dreamscenes$ ns-train igs2gs --data conditioning/gen_dataset --load-dir outputs/unnamed/splatfacto/2024-04-15_221736/nerfstudio_models --pipeline.model.prompt "turn the bed into a fire pit" blender-data
Traceback (most recent call last):
File "/home/stephen/.local/bin/ns-train", line 5, in <module>
from nerfstudio.scripts.train import entrypoint
File "/home/stephen/Desktop/dreamscenes/nerfstudio/nerfstudio/scripts/train.py", line 62, in <module>
from nerfstudio.configs.method_configs import AnnotatedBaseConfigUnion
File "/home/stephen/Desktop/dreamscenes/nerfstudio/nerfstudio/configs/method_configs.py", line 728, in <module>
all_methods, all_descriptions = merge_methods(all_methods, all_descriptions, *discover_methods())
^^^^^^^^^^^^^^^^^^
File "/home/stephen/Desktop/dreamscenes/nerfstudio/nerfstudio/plugins/registry.py", line 43, in discover_methods
spec = discovered_entry_points[name].load()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/importlib_metadata/__init__.py", line 203, in load
module = import_module(match.group('module'))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/stephen/Desktop/dreamscenes/instruct-gs2gs/igs2gs/igs2gs_config.py", line 32, in <module>
from igs2gs.igs2gs_datamanager import InstructGS2GSDataManagerConfig
File "/home/stephen/Desktop/dreamscenes/instruct-gs2gs/igs2gs/igs2gs_datamanager.py", line 87, in <module>
@dataclass
^^^^^^^^^
File "/usr/lib/python3.11/dataclasses.py", line 1230, in dataclass
return wrap(cls)
^^^^^^^^^
File "/usr/lib/python3.11/dataclasses.py", line 1220, in wrap
return _process_class(cls, init, repr, eq, order, unsafe_hash,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/dataclasses.py", line 958, in _process_class
cls_fields.append(_get_field(cls, name, type, kw_only))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/dataclasses.py", line 815, in _get_field
raise ValueError(f'mutable default {type(f.default)} for field '
ValueError: mutable default <class 'nerfstudio.data.dataparsers.nerfstudio_dataparser.NerfstudioDataParserConfig'> for field dataparser is not allowed: use default_factory
And it seems like commenting out the @dataclass
solves this error but gives me the issue commented above.
That was Python version 3.11 -- and I tried to install everything in python 3.8 as well and it still gives me the same error. It seems like default_factory is correctly used already in InstructGS2GSDataManagerConfig, so im not sure where the error comes from. @cvachha Any pointers would be greatly appreciated!
bumping up the message @cvachha thanks
Hi, I haven't seen this issue before, so I'm not sure what could be causing it. Last case scenario, you can try deleting and re-installing Instruct-GS2GS. I'm wondering if these errors occur when you use other nerfstudio methods or other custom methods.
There was a similar issue on the nerfstudio discord here. One of the proposed solutions mentions trying with python 3.10, but I'm not sure if that will fix it. If using python 3.10 doesn't resolve it, maybe you can try asking on the nerfstudio discord and see if someone else has encountered that error before.
Thank you! Turns out its still the issue with python version 3.11, I somehow had a global ns installation that runs in python 3.11 that overruns the one installed in the local conda env. Hope that helped others as well : )
Glad it worked! Thanks for letting me know
Hi, it seems like with the most up to date igs2gs, gsplat, and nerfstudio repo, training a gs2gs isnt fully working on my end.
The command I use is
ns-train igs2gs --data conditioning/gen_dataset --load-dir outputs/unnamed/splatfacto/2024-04-15_221736/nerfstudio_models --pipeline.model.prompt "turn the room into red color" --pipeline.guidance-scale 12.5 --pipeline.image-guidance-scale 1.5
It first doesnt recognize the guidance scale arguments (and they are not even in
ns-train igs2gs --help
)If I remove the argument and train it when just running
ns-train igs2gs --data conditioning/gen_dataset --load-dir outputs/unnamed/splatfacto/2024-04-15_221736/nerfstudio_models --pipeline.model.prompt "turn the room into red color"
, it would rather be not running the InstructGS2GSPipeline at all. After training the gs isnt changed, and I dong think theInstructGS2GSPipeline
gets run after some playing around.Maybe there's some hints printed out below
Thank you and any pointers would be greatly appreciated @cvachha @ayaanzhaque !