frank-xwang / InstanceDiffusion

[CVPR 2024] Code release for "InstanceDiffusion: Instance-level Control for Image Generation"
https://people.eecs.berkeley.edu/~xdwang/projects/InstDiff/
Apache License 2.0
502 stars 29 forks source link

inference.py have bug #8

Closed machine52vision closed 8 months ago

machine52vision commented 8 months ago

File "E:\MWDeepLearning\1.Train\16.Gen_Defect\InstanceDiffusion-main\ldm\util.py", line 86, in get_obj_from_str return getattr(importlib.import_module(module, package=None), cls) AttributeError: module 'ldm.modules.diffusionmodules.text_grounding_net' has no attribute 'PositionNet'

frank-xwang commented 8 months ago

Hi, did you follow our instructions on mode inference? You can run the model inference following this code:

python inference.py \
  --num_images 8 \
  --output OUTPUT/ \
  --input_json demos/demo_cat_dog_robin.json \
  --ckpt pretrained/instancediffusion_sd15.pth \
  --test_config configs/test_box.yaml \
  --guidance_scale 5 \
  --alpha 0.8 \
  --seed 0 \
  --mis 0.36 \
  --cascade_strength 0.3 \

I just tried it locally, it worked fine. Let me know if it does not work for you.

machine52vision commented 8 months ago

configs

thanks,it work!