Sxela / WarpFusion

WarpFusion
Other
964 stars 108 forks source link

AttributeError: 'set' object has no attribute 'keys' #88

Closed sunmin-lee99 closed 11 months ago

sunmin-lee99 commented 11 months ago
Checking downloaded Annotator and ControlNet Models
Loading ControlNet Models
Loading model from ControlNet//control_v11p_sd15_softedge.pth
Loading model from ControlNet//control_v11p_sd15_normalbae.pth
Loading model from ControlNet//control_v11p_sd15_openpose.pth
Loading model from ControlNet//control_v11p_sd15_inpaint.pth
Loading base model ()...Done.
Removing last two layers (global_pool & classifier).
Loaded NormalBaeDetector
Loaded PidiNetDetector
cuda
cuda
cuda
Loaded OpenposeDetector
Applying scaled dot product cross attention optimization.
Textual inversion embeddings loaded(0): 
Starting Run: candy_1(0) at frame 0
Inferred loras schedule:
 {}
---prompt_weights--- {0: array([1.], dtype=float16), 232: array([1.], dtype=float16), 318: array([1.], dtype=float16), 534: array([1.], dtype=float16), 772: array([1.], dtype=float16), 1134: array([1.], dtype=float16), 1254: array([1.], dtype=float16), 1494: array([1.], dtype=float16), 1733: array([1.], dtype=float16), 1817: array([1.], dtype=float16), 1974: array([1.], dtype=float16), 2274: array([1.], dtype=float16), 2573: array([1.], dtype=float16), 2694: array([1.], dtype=float16), 2806: array([1.], dtype=float16), 2942: array([1.], dtype=float16), 3028: array([1.], dtype=float16), 3172: array([1.], dtype=float16), 3234: array([1.], dtype=float16), 3294: array([1.], dtype=float16), 3368: array([1.], dtype=float16)} {0: ['(blue) glass (nutcracker) holding lollipop candy in candy world  realistic, high detailed, high resolution, 8k, 4k 3d, trending on artstation'], 232: ['(yellow) glass (nutcracker) holding lollipop candy in candy world  realistic, high detailed, high resolution, 8k, 4k 3d, trending on artstation'], 318: ['(red) glass (nutcracker) holding lollipop candy in candy world  realistic, high detailed, high resolution, 8k, 4k 3d, trending on artstation'], 534: ['(deep green) glass (nutcracker) holding lollipop candy in candy world  realistic, high detailed, high resolution, 8k, 4k 3d, trending on artstation'], 772: ['(orange) glass (nutcracker) holding lollipop candy in candy world  realistic, high detailed, high resolution, 8k, 4k 3d, trending on artstation'], 1134: ['(blue) glass (nutcracker) holding lollipop candy in candy world  realistic, high detailed, high resolution, 8k, 4k 3d, trending on artstation'], 1254: ['(yellow) glass (nutcracker) holding lollipop candy in candy world  realistic, high detailed, high resolution, 8k, 4k 3d, trending on artstation'], 1494: ['(red) glass (nutcracker) holding lollipop candy in candy world  realistic, high detailed, high resolution, 8k, 4k 3d, trending on artstation'], 1733: ['(deep green) glass (nutcracker) holding lollipop candy in candy world  realistic, high detailed, high resolution, 8k, 4k 3d, trending on artstation'], 1817: ['(orange) glass (nutcracker) holding lollipop candy in candy world  realistic, high detailed, high resolution, 8k, 4k 3d, trending on artstation'], 1974: ['(blue) glass (nutcracker) holding lollipop candy in candy world  realistic, high detailed, high resolution, 8k, 4k 3d, trending on artstation'], 2274: ['(yellow) glass (nutcracker) holding lollipop candy in candy world  realistic, high detailed, high resolution, 8k, 4k 3d, trending on artstation'], 2573: ['(red) glass (nutcracker) holding lollipop candy in candy world  realistic, high detailed, high resolution, 8k, 4k 3d, trending on artstation'], 2694: ['(deep green) glass (nutcracker) holding lollipop candy in candy world  realistic, high detailed, high resolution, 8k, 4k 3d, trending on artstation'], 2806: ['(orange) glass (nutcracker) holding lollipop candy in candy world  realistic, high detailed, high resolution, 8k, 4k 3d, trending on artstation'], 2942: ['(blue) glass (nutcracker) holding lollipop candy in candy world  realistic, high detailed, high resolution, 8k, 4k 3d, trending on artstation'], 3028: ['(yellow) glass (nutcracker) holding lollipop candy in candy world  realistic, high detailed, high resolution, 8k, 4k 3d, trending on artstation'], 3172: ['(red) glass (nutcracker) holding lollipop candy in candy world  realistic, high detailed, high resolution, 8k, 4k 3d, trending on artstation'], 3234: ['(deep green) glass (nutcracker) holding lollipop candy in candy world  realistic, high detailed, high resolution, 8k, 4k 3d, trending on artstation'], 3294: ['(orange) glass (nutcracker) holding lollipop candy in candy world  realistic, high detailed, high resolution, 8k, 4k 3d, trending on artstation'], 3368: ['(rainbow) glass (nutcracker) holding lollipop candy in candy world  realistic, high detailed, high resolution, 8k, 4k 3d, trending on artstation']}
range(0, 3357)
Frames: 0%
1/3357 [00:00<00:14, 236.19it/s]
Frames: 0%
1/3357 [00:00<00:14, 236.19it/s]
init image blue.png
None

960 512 blue.png
Frame 0 Prompt: ['(blue) glass (nutcracker) holding lollipop candy in candy world  realistic, high detailed, high resolution, 8k, 4k 3d, trending on artstation']
used_loras, used_loras_weights [] []
prompt weights, frame_prompt_weights {0: array([1.], dtype=float16), 232: array([1.], dtype=float16), 318: array([1.], dtype=float16), 534: array([1.], dtype=float16), 772: array([1.], dtype=float16), 1134: array([1.], dtype=float16), 1254: array([1.], dtype=float16), 1494: array([1.], dtype=float16), 1733: array([1.], dtype=float16), 1817: array([1.], dtype=float16), 1974: array([1.], dtype=float16), 2274: array([1.], dtype=float16), 2573: array([1.], dtype=float16), 2694: array([1.], dtype=float16), 2806: array([1.], dtype=float16), 2942: array([1.], dtype=float16), 3028: array([1.], dtype=float16), 3172: array([1.], dtype=float16), 3234: array([1.], dtype=float16), 3294: array([1.], dtype=float16), 3368: array([1.], dtype=float16)} [1.]
Traceback (most recent call last):
  File "/tmp/ipykernel_1100794/448851262.py", line 596, in <module>
    do_run()
  File "/tmp/ipykernel_1100794/387483213.py", line 1082, in do_run
    neg_prompt = get_sched_from_json(frame_num, args.neg_prompts_series, blend=False)
  File "/tmp/ipykernel_1100794/387483213.py", line 565, in get_sched_from_json
    for key in sched_json.keys():
AttributeError: 'set' object has no attribute 'keys'
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[34], line 596
    595 try:
--> 596   do_run()
    597 except:

Cell In[4], line 1082, in do_run()
   1081 if args.neg_prompts_series is not None:
-> 1082   neg_prompt = get_sched_from_json(frame_num, args.neg_prompts_series, blend=False)
   1083 else:

Cell In[4], line 565, in get_sched_from_json(frame_num, sched_json, blend)
    564 sched_int = {}
--> 565 for key in sched_json.keys():
    566   sched_int[int(key)] = sched_json[key]

AttributeError: 'set' object has no attribute 'keys'

During handling of the above exception, another exception occurred:

SystemExit                                Traceback (most recent call last)
    [... skipping hidden 1 frame]

Cell In[34], line 599
    598   traceback.print_exc()
--> 599   sys.exit()
    601 print('n_stats_avg (mean, std): ', n_mean_avg, n_std_avg)

SystemExit: 

During handling of the above exception, another exception occurred:

AssertionError                            Traceback (most recent call last)
    [... skipping hidden 1 frame]

File ~/WarpFusion/WarpFusion0.23.11/warpenv/lib/python3.10/site-packages/IPython/core/interactiveshell.py:2047, in InteractiveShell.showtraceback(self, exc_tuple, filename, tb_offset, exception_only, running_compiled_code)
   2044 if exception_only:
   2045     stb = ['An exception has occurred, use %tb to see '
   2046            'the full traceback.\n']
-> 2047     stb.extend(self.InteractiveTB.get_exception_only(etype,
   2048                                                      value))
   2049 else:
   2050     try:
   2051         # Exception classes can customise their traceback - we
   2052         # use this in IPython.parallel for exceptions occurring
   2053         # in the engines. This should return a list of strings.

File ~/WarpFusion/WarpFusion0.23.11/warpenv/lib/python3.10/site-packages/IPython/core/ultratb.py:585, in ListTB.get_exception_only(self, etype, value)
    577 def get_exception_only(self, etype, value):
    578     """Only print the exception type and message, without a traceback.
    579 
    580     Parameters
   (...)
    583     value : exception value
    584     """
--> 585     return ListTB.structured_traceback(self, etype, value)

File ~/WarpFusion/WarpFusion0.23.11/warpenv/lib/python3.10/site-packages/IPython/core/ultratb.py:452, in ListTB.structured_traceback(self, etype, evalue, etb, tb_offset, context)
    449     chained_exc_ids.add(id(exception[1]))
    450     chained_exceptions_tb_offset = 0
    451     out_list = (
--> 452         self.structured_traceback(
    453             etype, evalue, (etb, chained_exc_ids),
    454             chained_exceptions_tb_offset, context)
    455         + chained_exception_message
    456         + out_list)
    458 return out_list

File ~/WarpFusion/WarpFusion0.23.11/warpenv/lib/python3.10/site-packages/IPython/core/ultratb.py:1118, in AutoFormattedTB.structured_traceback(self, etype, value, tb, tb_offset, number_of_lines_of_context)
   1116 else:
   1117     self.tb = tb
-> 1118 return FormattedTB.structured_traceback(
   1119     self, etype, value, tb, tb_offset, number_of_lines_of_context)

File ~/WarpFusion/WarpFusion0.23.11/warpenv/lib/python3.10/site-packages/IPython/core/ultratb.py:1012, in FormattedTB.structured_traceback(self, etype, value, tb, tb_offset, number_of_lines_of_context)
   1009 mode = self.mode
   1010 if mode in self.verbose_modes:
   1011     # Verbose modes need a full traceback
-> 1012     return VerboseTB.structured_traceback(
   1013         self, etype, value, tb, tb_offset, number_of_lines_of_context
   1014     )
   1015 elif mode == 'Minimal':
   1016     return ListTB.get_exception_only(self, etype, value)

File ~/WarpFusion/WarpFusion0.23.11/warpenv/lib/python3.10/site-packages/IPython/core/ultratb.py:865, in VerboseTB.structured_traceback(self, etype, evalue, etb, tb_offset, number_of_lines_of_context)
    856 def structured_traceback(
    857     self,
    858     etype: type,
   (...)
    862     number_of_lines_of_context: int = 5,
    863 ):
    864     """Return a nice text document describing the traceback."""
--> 865     formatted_exception = self.format_exception_as_a_whole(etype, evalue, etb, number_of_lines_of_context,
    866                                                            tb_offset)
    868     colors = self.Colors  # just a shorthand + quicker name lookup
    869     colorsnormal = colors.Normal  # used a lot

File ~/WarpFusion/WarpFusion0.23.11/warpenv/lib/python3.10/site-packages/IPython/core/ultratb.py:799, in VerboseTB.format_exception_as_a_whole(self, etype, evalue, etb, number_of_lines_of_context, tb_offset)
    796 assert isinstance(tb_offset, int)
    797 head = self.prepare_header(etype, self.long_header)
    798 records = (
--> 799     self.get_records(etb, number_of_lines_of_context, tb_offset) if etb else []
    800 )
    802 frames = []
    803 skipped = 0

File ~/WarpFusion/WarpFusion0.23.11/warpenv/lib/python3.10/site-packages/IPython/core/ultratb.py:854, in VerboseTB.get_records(self, etb, number_of_lines_of_context, tb_offset)
    848     formatter = None
    849 options = stack_data.Options(
    850     before=before,
    851     after=after,
    852     pygments_formatter=formatter,
    853 )
--> 854 return list(stack_data.FrameInfo.stack_data(etb, options=options))[tb_offset:]

File ~/WarpFusion/WarpFusion0.23.11/warpenv/lib/python3.10/site-packages/stack_data/core.py:578, in FrameInfo.stack_data(cls, frame_or_tb, options, collapse_repeated_frames)
    562 @classmethod
    563 def stack_data(
    564         cls,
   (...)
    568         collapse_repeated_frames: bool = True
    569 ) -> Iterator[Union['FrameInfo', RepeatedFrames]]:
    570     """
    571     An iterator of FrameInfo and RepeatedFrames objects representing
    572     a full traceback or stack. Similar consecutive frames are collapsed into RepeatedFrames
   (...)
    576     and optionally an Options object to configure.
    577     """
--> 578     stack = list(iter_stack(frame_or_tb))
    580     # Reverse the stack from a frame so that it's in the same order
    581     # as the order from a traceback, which is the order of a printed
    582     # traceback when read top to bottom (most recent call last)
    583     if is_frame(frame_or_tb):

File ~/WarpFusion/WarpFusion0.23.11/warpenv/lib/python3.10/site-packages/stack_data/utils.py:98, in iter_stack(frame_or_tb)
     96 while current:
     97     yield current
---> 98     if is_frame(current):
     99         current = current.f_back
    100     else:

File ~/WarpFusion/WarpFusion0.23.11/warpenv/lib/python3.10/site-packages/stack_data/utils.py:90, in is_frame(frame_or_tb)
     89 def is_frame(frame_or_tb: Union[FrameType, TracebackType]) -> bool:
---> 90     assert_(isinstance(frame_or_tb, (types.FrameType, types.TracebackType)))
     91     return isinstance(frame_or_tb, (types.FrameType,))

File ~/WarpFusion/WarpFusion0.23.11/warpenv/lib/python3.10/site-packages/stack_data/utils.py:177, in assert_(condition, error)
    175 if isinstance(error, str):
    176     error = AssertionError(error)
--> 177 raise error

AssertionError: 

Is this error occurs from my settings?

How to solve this problem?

Sxela commented 11 months ago

Looks like the problem is in your negative prompt

sunmin-lee99 commented 11 months ago

@Sxela Wow!! You're RIGHT!! My negative prompt was wrong 😂 I try to solve this problem for days before I write issue in github! Thank you!! Have a nice day! 🥰