mirror of
https://github.com/lllyasviel/stable-diffusion-webui-forge.git
synced 2026-02-08 17:09:59 +00:00
implement args for new backend
This commit is contained in:
7
backend/args.py
Normal file
7
backend/args.py
Normal file
@@ -0,0 +1,7 @@
|
||||
import argparse
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
|
||||
parser.add_argument("--cuda-stream", action="store_true")
|
||||
|
||||
args = parser.parse_known_args()[0]
|
||||
@@ -1,5 +1,5 @@
|
||||
import torch
|
||||
import argparse
|
||||
from backend import args
|
||||
|
||||
|
||||
def stream_context():
|
||||
@@ -56,11 +56,6 @@ current_stream = None
|
||||
mover_stream = None
|
||||
using_stream = False
|
||||
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("--cuda-stream", action="store_true")
|
||||
args = parser.parse_known_args()[0]
|
||||
|
||||
if args.cuda_stream:
|
||||
current_stream = get_current_stream()
|
||||
mover_stream = get_new_stream()
|
||||
|
||||
Reference in New Issue
Block a user