xlinx / sd-webui-decadetw-auto-prompt-llm

sd-webui-auto-prompt-llm
MIT License
39 stars 4 forks source link

[feature] support wildcard or dynamic prompt to output more different results #13

Open AhBumm opened 1 week ago

AhBumm commented 1 week ago

maybe Read the input field of the prompt directly as llm prompt will be a good way

and vision llm seems not working, with error log:

Traceback (most recent call last):
  File "E:\stable-diffusion-webui-forge\venv\lib\site-packages\gradio\queueing.py", line 536, in process_events
    response = await route_utils.call_process_api(
  File "E:\stable-diffusion-webui-forge\venv\lib\site-packages\gradio\route_utils.py", line 285, in call_process_api
    output = await app.get_blocks().process_api(
  File "E:\stable-diffusion-webui-forge\venv\lib\site-packages\gradio\blocks.py", line 1919, in process_api
    inputs = await self.preprocess_data(
  File "E:\stable-diffusion-webui-forge\venv\lib\site-packages\gradio\blocks.py", line 1650, in preprocess_data
    processed_input.append(block.preprocess(inputs_cached))
  File "E:\stable-diffusion-webui-forge\venv\lib\site-packages\gradio\components\image.py", line 197, in preprocess
    return image_utils.format_image(
  File "E:\stable-diffusion-webui-forge\venv\lib\site-packages\gradio\image_utils.py", line 30, in format_image
    path = processing_utils.save_pil_to_cache(
TypeError: save_pil_to_file() got an unexpected keyword argument 'name'

thanks for your great work!

AhBumm commented 1 week ago

a new problems. when multi batch will use the 1 prompt from the first batch. i can't just roll many image in different scene.

AhBumm commented 1 week ago

and import setting seems not work image

xlinx commented 1 week ago

maybe Read the input field of the prompt directly as llm prompt will be a good way

do u mean sd-prompt directly for llm-user-prompt?

I feel sd-prompt leave for pytorch vae lanten space keyword. Ex 1girl. llm-user-prompt leave for human us use. Is it better right?

AhBumm commented 1 week ago

maybe Read the input field of the prompt directly as llm prompt will be a good way

do u mean sd-prompt directly for llm-user-prompt?

I feel sd-prompt leave for pytorch vae lanten space keyword. Ex 1girl. llm-user-prompt leave for human us use. Is it better right?

yes, sd-prompt directly for llm-user-prompt maybe easier to support wildcard. pytorch vae lanten space keyword seems not that important for flux. only use the Natural language could also get a great image

xlinx commented 1 week ago
  1. okie, after FLUX i seems have the same feeling too, therfor add a checkbox like [USE SD-PROMPT AS LLM-PROMPT]?

  2. the vision issue, sd-web-ui work well but forge show the error above(TypeError: save_pil_to_file() got an unexpected keyword argument 'name')? let me install forge try it.

issue2 should be ok now. [hotfix] change gradio.Image type from path to PIL.Image avoid copy paste img source wo a real file obj.

AhBumm commented 1 week ago
  1. okie, after FLUX i seems have the same feeling too, therfor add a checkbox like [USE SD-PROMPT AS LLM-PROMPT]?
  2. the vision issue, sd-web-ui work well but forge show the error above(TypeError: save_pil_to_file() got an unexpected keyword argument 'name')? let me install forge try it.

issue2 should be ok now. [hotfix] change gradio.Image type from path to PIL.Image avoid copy paste img source wo a real file obj.

import setting and vision llm work after update! 🎉🎉

AhBumm commented 1 week ago
  1. okie, after FLUX i seems have the same feeling too, therfor add a checkbox like [USE SD-PROMPT AS LLM-PROMPT]

oh! we still need a place to input lora name and lora tag. add a checkbox like [USE SD-PROMPT AS LLM-PROMPT] seems not the best way to do. my bad

xlinx commented 1 week ago
  1. okie, after FLUX i seems have the same feeling too, therfor add a checkbox like [USE SD-PROMPT AS LLM-PROMPT]

oh! we still need a place to input lora name and lora tag. add a checkbox like [USE SD-PROMPT AS LLM-PROMPT] seems not the best way to do. my bad

oh~Lora... i forgot it too;

u can try new feature LLM-Text-Loop 螢幕擷取畫面 2024-09-04 170623 螢幕擷取畫面 2024-09-04 170929 螢幕擷取畫面 2024-09-04 171136 螢幕擷取畫面 2024-09-04 171311

AhBumm commented 1 week ago
  1. okie, after FLUX i seems have the same feeling too, therfor add a checkbox like [USE SD-PROMPT AS LLM-PROMPT]

oh! we still need a place to input lora name and lora tag. add a checkbox like [USE SD-PROMPT AS LLM-PROMPT] seems not the best way to do. my bad

oh~Lora... i forgot it too;

u can try new feature LLM-Text-Loop 螢幕擷取畫面 2024-09-04 170623 螢幕擷取畫面 2024-09-04 170929 螢幕擷取畫面 2024-09-04 171136 螢幕擷取畫面 2024-09-04 171311

i tried that feature, but i don't understand how it work🥲, and it seems to break the system prompt of [LLM-text]

AhBumm commented 1 week ago

a new problems. when multi batch will use the 1 prompt from the first batch. i can't just roll many image in different scene.

I use a js to do this job😂

let clickCount = 0;
function clickButton() {
    var generateButton = document.querySelector("#txt2img_generate");

    if (generateButton) {
        generateButton.click();
        console.log('clicked');

        clickCount++;

        //       click times ↓
        if (clickCount < 10) {
            setTimeout(clickButton, 90000); // wait 90s to next click 
        } else {
            console.log('done!');
        }
    } else {
        console.warn('button not found');
    }
}

clickButton();
xlinx commented 1 week ago
AhBumm commented 1 week ago
  • batch mean same prompt with different random seed.
  • u can try Before after action
  • whats ur purpose ?
  • why not just rightClick on Generate choice Generate forever
  1. every image with Different LLM-Answer prompt was best, or in every batch count have Different prompt from LLM-Answer, not different random seed
  2. I tried Before after action. it need user to write a file to replace [LLM-Your-Prompt]
  3. I want in the same [LLM-Your-Prompt],but each batch count or single image could have Different prompt from LLM-Answer
  4. I tried rightClick on Generate choice Generate forever, but all the image use the same LLM-Answer prompt. And with js scripts single click will be more LLM-Answer for each batch of t2i gen
xlinx commented 1 week ago

螢幕擷取畫面 2024-09-07 132046

AhBumm commented 1 week ago
  • batch=2 -> click gen -> llm-ans1 -> image1(llm-ans-1) , image2(llm-ans-1) | different content same style.
  • next time gen click -> llm-ans2 got 2 image same prompt same style
  • work like above, that is not u expect?

螢幕擷取畫面 2024-09-07 132046

I think the Advantages of Auto LLM is to generate many prompts. More batches should get more different prompts. Not many pictures in a same prompt. is not much different from using llm externally and copy into the webui.