Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(feature request) txt randomized combination generates prompt #19

Open
shiertier opened this issue Apr 12, 2023 · 0 comments
Open

(feature request) txt randomized combination generates prompt #19

shiertier opened this issue Apr 12, 2023 · 0 comments

Comments

@shiertier
Copy link

Hello,

I am writing to request a new feature in your program. Firstly, I would like to express my admiration for the impressive automation capabilities of your program. However, I am hoping to add a new functionality that involves prompt randomization.

I am sorry to inform you that I am not proficient in Go programming and thus I am unable to understand or modify the code myself. Therefore, I would like to request your assistance in implementing a new feature in your program.

I have been working on batch image generation and would like to incorporate randomization to achieve new content and experiences. Currently, I am using the following code to implement color randomization, with two text files containing 10 common and 150 rich colors respectively.

`for i in range(num_repeats):

#Prompt generation
use_random_color = True
if use_random_color:
    prompt = "random color theme"
    if random.random() <= 0.25:
        prompt = prompt.replace("random color theme ", "vibrant color")
    else:
        def get_random_color():
            if random.random() < 1/3:
                file_name = os.path.abspath(os.path.join(os.path.dirname(__file__), 'color.txt'))
            else:
                file_name = os.path.abspath(os.path.join(os.path.dirname(__file__), 'color_complete.txt'))
            with open(file_name, 'r', encoding='utf-8') as f:
                lines = f.readlines()
            random_color = random.choice(lines).strip() + " color theme"  # Select a random line of color themes
            while random_color == last_color:  # If it is the same color as the last random, it is randomized again
                random_color = random.choice(lines).strip() + " color theme"
            return random_color
        random_color = get_random_color()
        last_color = random_color
        prompt = prompt.replace("random color theme", random_color)
    print(prompt)
#Image generation`

Currently, my method of automation involves waiting for a set amount of time before sending commands to complete tasks. Unfortunately, I am unable to monitor queue tasks or download images via programs due to my limited knowledge of Python.

I recently used your program for automation, and I must say that its features are quite impressive. However, I believe that incorporating a particular feature could vastly improve the overall user experience. Ideally, this feature should enable me to use multiple word libraries contained in text files, which can be randomly combined to produce beautiful and unique works of art.

I hope to use dozens of different word libraries in text files and randomly combine them to create beautiful works of art. Perhaps automation combined with randomization could bring even more possibilities.

Hence, I am reaching out to you for help to implement this function in your program.

Thank you for taking the time to consider my request, and please let me know if there is anything else I can provide to assist you in creating this feature.

@shiertier shiertier changed the title Feature Request (feature request) txt randomized combination generates prompt Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant