Git Product home page Git Product logo

Comments (4)

remghoost avatar remghoost commented on May 26, 2024 1

Got it. So I figured out why it wasn't working (for me at least) and have a temporary fix.
I'll leave it in a new message so it will alert you on it.

edit- It seems like your stacktrace is different from mine, but perhaps my solution will still work for you.

tl;dr - Enable "Save text information about generation parameters as chunks to png files" in A1111.

In my stacktrace it calls the metadata_to_json.py script and fails once it reaches line 10.

import serverHelper
# metadata_str = 'cute cat\nSteps: 20, Sampler: Euler a, CFG scale: 7.0, Seed: 2253354038, Size: 512x512, Model hash: 3e16efc8, Seed resize from: -1x-1, Denoising strength: 0, Conditional mask weight: 1.0'
def convertMetadataToJson(metadata_str):
print(metadata_str)
last_new_line_index = metadata_str.rindex('\n')
prompt = metadata_str[:last_new_line_index]
other_settings = metadata_str[last_new_line_index+1:]

And according to ChatGPT, this is what that line is doing.

This line of code is finding the index of the last occurrence of the newline character '\n' in the metadata_str string. The rindex() method is used to find the index of the rightmost occurrence of the specified value in the string, so this line is finding the rightmost occurrence of the newline character in metadata_str. The result is stored in the last_new_line_index variable.

And because there is no metadata to look for that character, it probably returns null, which the other modules aren't a fan of.

I'll poke around and see if I can figure out a permanent fix for those of us that don't want the image generation data saved in the .png. But for now, enable that setting in A1111 and it should work fine for you.

from auto-photoshop-stablediffusion-plugin.

remghoost avatar remghoost commented on May 26, 2024

I've had this error in A1111 since my most recent pull.

I'm fairly certain it's an A1111 problem.

Here's an issue from that repo that has the same error.
AUTOMATIC1111/stable-diffusion-webui#7120 (comment)

edit - It seems to be a problem with extensions. After fixing that problem with A1111, it still pops up in the Photoshop server and prevents the generated image from being passed into Photoshop.

edit 2 - I'm beginning to think that it's the fastapi and starlette not being updated to the correct version. I'll see if updating them fixes the issue.

edit 3 - Did not fix the problem.

from auto-photoshop-stablediffusion-plugin.

kindLee-alasikoo avatar kindLee-alasikoo commented on May 26, 2024

I have a same error

from auto-photoshop-stablediffusion-plugin.

AbdullahAlfaraj avatar AbdullahAlfaraj commented on May 26, 2024

@kindLee-alasikoo I've fixed this in the latest build, you should try installing using the one click plugin.ccx, installer?
https://discord.com/channels/1054937599392891000/1055247602578374728/1072213800654225490

from auto-photoshop-stablediffusion-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.