mirror of
https://github.com/lllyasviel/Fooocus.git
synced 2026-08-16 13:13:16 +02:00
simplify
This commit is contained in:
@@ -27,12 +27,10 @@ def remove_pattern(x, pattern):
|
||||
|
||||
class FooocusExpansion:
|
||||
def __init__(self):
|
||||
self.use_fp16 = model_management.should_use_fp16()
|
||||
|
||||
self.tokenizer = AutoTokenizer.from_pretrained(fooocus_expansion_path)
|
||||
self.model = AutoModelForCausalLM.from_pretrained(fooocus_expansion_path)
|
||||
|
||||
if self.use_fp16:
|
||||
if model_management.should_use_fp16():
|
||||
self.model.half()
|
||||
|
||||
load_device = model_management.text_encoder_device()
|
||||
|
||||
Reference in New Issue
Block a user