Giter Club home page Giter Club logo

Comments (6)

MoonRide303 avatar MoonRide303 commented on August 26, 2024

@lllyasviel I noticed you did initial version of fix in 1.0.35, but it could be improved a bit - instead of:

                def refresh_seed(r, s):
                    if r:
                        return random.randint(1, 1024*1024*1024)
                    else:
                        return s

in webui.py I'd go with

                def refresh_seed(r, s):
                    if r or not isinstance(s, int) or s < 0 or s > 2**63 - 1:
                        return random.randint(0, 2**63 - 1)
                    else:
                        return s

to refresh seed in case user entered value out of allowed range.

You could also bump max_seed in async_worker.py from 1024*1024*1024 to 2**63 - 1. People use 64-bit machines these days, and you already use similar values in core.py - I made all of them consistent, and staying in 0 to 2**63-1 range on my fork.

from fooocus.

lllyasviel avatar lllyasviel commented on August 26, 2024

negative or large seed will still work as they willl be preprocessed inner worker

from fooocus.

MoonRide303 avatar MoonRide303 commented on August 26, 2024

@lllyasviel They will work, but in your version they will be silently re-generated, and not displayed to the user in the UI.

from fooocus.

lllyasviel avatar lllyasviel commented on August 26, 2024

this impl cannot get same results from same negative number as seed

from fooocus.

MoonRide303 avatar MoonRide303 commented on August 26, 2024

It just generates new seed (from valid range) when out-of-range number is entered.

from fooocus.

MoonRide303 avatar MoonRide303 commented on August 26, 2024

Works fine in v2.1.739 (seeds from 0 to 2 ** 63 - 1 are now supported).

from fooocus.

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.