KnoBuddy / VisualDiffusion

A GUI for text2img diffusion, as a visual alternative to CLI and Jupyter Notebooks.
MIT License
29 stars 3 forks source link

[BUG] Multi-Step Prompt Problems and other things #9

Closed WorldTeacher closed 2 years ago

WorldTeacher commented 2 years ago

Describe the bug Bug 1 Adding one additional step is fine, every other step gets an error:

Exception in Tkinter callback
Traceback (most recent call last):
  File "/home/alexander/anaconda3/envs/progrockdiffusion/lib/python3.7/tkinter/__init__.py", line 1705, in __call__
    return self.func(*args)
  File "/home/alexander/anaconda3/envs/progrockdiffusion/lib/python3.7/tkinter/__init__.py", line 749, in callit
    func(*args)
  File "VisualDiffusion/prdgui.py", line 166, in refresh_image
    updater()
  File "VisualDiffusion/prdgui.py", line 556, in updater
    for k in prompt_text_entry[i].keys():
KeyError: '2'

Bug 2 (might be intentional though) The interface for Extra Args is gone, so no --gobig is possible

To Reproduce Steps to reproduce the behavior:

  1. Go to Gui
  2. Click on New Step, add a number
  3. Add new step
  4. See error

Expected behavior A third step should appear, of if it is intentional that there are only 2 steps, a message should be displayed

Screenshots

adding third prompt

Desktop (please complete the following information):

Additional context A persistent state of the GUI would be nice, as every time it is launched, you have to manually reopen Advanced, Clip Settings and Symmetry settings.

Images: old GUI...........................................................................................................................new GUI startup old vs new GUI

KnoBuddy commented 2 years ago

Yep... Hope you can work with the current issues for a little, I'll see how quickly I can get to them. If you set the steps you want for the prompt it can still be cool to change the prompts at steps 0, 100, 200, etc.

I'm hoping that single prompt mode has zero issues, and it's just the switching between and adding steps that is the issue.

As for extra args, honestly idk what my plans were. I debated a checkbox and some other options in another advanced frame.

Persistent settings sound fairly simple to implement.

WorldTeacher commented 2 years ago

Also just noticed that the batch name field is gone. Right now, the images are saved to the location specified in the gui_settings, but only because I used it in the old gui before. Can I set the location somehow?

KnoBuddy commented 2 years ago

I will have some time today. I can probably add the couple missing features. Idk if anything will get fixed with steps though.

KnoBuddy commented 2 years ago

The GUI is updated. Please let me know any issues you run into.

WorldTeacher commented 2 years ago

Thanks for the update, I have now tested it and when I try gobig, I get this error:

Traceback (most recent call last):
  File "prd.py", line 3034, in <module>
    slices, new_canvas_size = grid_slice(source_image, gobig_overlap, og_size, gobig_maximize)
  File "prd.py", line 2969, in grid_slice
    coordinates, new_size = grid_coords(source.size, og_size, overlap)
  File "prd.py", line 2914, in grid_coords
    uy = uy - original_y + overlap
TypeError: unsupported operand type(s) for +: 'int' and 'str'

Prompt Scheduling seems to work better now, as I am able to add more than 2 steps, and they even get displayed in the GUI.

WorldTeacher commented 2 years ago

Addition: when selecting models from the yellow or green section, the names get cut off at the first Letter Example Screenshot_20220821_132236 will be displayed as: Screenshot_20220821_132506

KnoBuddy commented 2 years ago

Thanks for the update, I have now tested it and when I try gobig, I get this error:

Traceback (most recent call last):
  File "prd.py", line 3034, in <module>
    slices, new_canvas_size = grid_slice(source_image, gobig_overlap, og_size, gobig_maximize)
  File "prd.py", line 2969, in grid_slice
    coordinates, new_size = grid_coords(source.size, og_size, overlap)
  File "prd.py", line 2914, in grid_coords
    uy = uy - original_y + overlap
TypeError: unsupported operand type(s) for +: 'int' and 'str'

Prompt Scheduling seems to work better now, as I am able to add more than 2 steps, and they even get displayed in the GUI.

This GoBig error should be fixed. Please update to see the latest changes.

KnoBuddy commented 2 years ago

Addition: when selecting models from the yellow or green section, the names get cut off at the first Letter Example Screenshot_20220821_132236 will be displayed as: Screenshot_20220821_132506

I believe that is an issue with PRD as all I am doing is rerouting the shell output into the GUI. I add a few occasional messages if PRD is already running and you click run again, but other than that everything is just the output from the CLI of PRD itself.

WorldTeacher commented 2 years ago

This GoBig error should be fixed. Please update to see the latest changes.

I'll update once my current run is complete and will test, thanks for letting me know

WorldTeacher commented 2 years ago

GoBig seems to work, it created the slices and made the image

WorldTeacher commented 2 years ago

gobig maximize caused one slice to be not enhanced, as it stopped halfway through, but that was likely because I started a gpu intense process. I'll close this and if anything else comes up, I'll create a new issue.

KnoBuddy commented 2 years ago

I have noticed gobig if you are at the limit of what your GPU can handle it will sometimes give me CUDA out of memory errors even though those settings normally work. I feel like some data is accumulating in the VRAM cache when you do multiple slices in a row.

WorldTeacher commented 2 years ago

I haven't noticed that, but that might be because the combination of models uses 11 out of the 24 GB, so there is more than enough VRAM available. But I can test with a larger selection of models.