Skip to content
Discussion options

You must be logged in to vote

A friend was able to figure it out and help me out. In case someone is trying to figure out how to generate an image with txt2img from inside Automatic1111, here's the code:

`# Generate thumbnails
def generate_thumbnail_for_model(model_name, suffix):
# Initialize processed to None
processed = None

# Fetch set data
set_data = get_set_data(current_set_name)
print(f"Retrieved set data for '{current_set_name}': {set_data}")

try:
    # Set up processing parameters
    p = processing.StableDiffusionProcessingTxt2Img(
        sd_model=shared.sd_model,
        outpath_samples="",
        outpath_grids="",
        prompt=set_data.get("prompt", "Default Prompt"),
        negative_prompt=set_data.g…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by MNeMoNiCuZ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant