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

Precision Full Parameter Missing #19

Open
hooovahh opened this issue Sep 4, 2022 · 1 comment
Open

Precision Full Parameter Missing #19

hooovahh opened this issue Sep 4, 2022 · 1 comment

Comments

@hooovahh
Copy link

hooovahh commented Sep 4, 2022

Is there a way to add the --precision full option back in? My 1650 renders a green image every time if I don't have that input. I tried editing the script to force it full, but I haven't had any luck.

@Amdersiteen
Copy link

Amdersiteen commented Sep 19, 2022

Hi
in your txt2imghd.py script Add:

to your imports:

from contextlib import nullcontext

to your option parser around line 356:

parser.add_argument( 
   "--precision",
        type=str,
        help="evaluate at this precision",
       choices=["full", "autocast"],
       default="full" #make your default as you want it to be
    )

Line 440 & 507:

precision_scope = autocast if opt.precision=="autocast" else nullcontext
          with torch.no_grad():

Don't forget to indent as needed.

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

2 participants