mirror of
https://github.com/lllyasviel/stable-diffusion-webui-forge.git
synced 2026-02-06 16:09:58 +00:00
Now backend rewrite is about 50% finished. Estimated finish is in 72 hours. After that, many newer features will land.
15 lines
478 B
Python
15 lines
478 B
Python
import torch
|
|
|
|
|
|
class JointTokenizer:
|
|
def __init__(self, huggingface_components):
|
|
self.clip_l = huggingface_components.get('tokenizer', None)
|
|
self.clip_g = huggingface_components.get('tokenizer_2', None)
|
|
|
|
|
|
class JointCLIP(torch.nn.Module):
|
|
def __init__(self, huggingface_components):
|
|
super().__init__()
|
|
self.clip_l = huggingface_components.get('text_encoder', None)
|
|
self.clip_g = huggingface_components.get('text_encoder_2', None)
|