mirror of
https://github.com/lllyasviel/stable-diffusion-webui-forge.git
synced 2026-04-29 18:51:31 +00:00
make none default to clip
This commit is contained in:
@@ -2,6 +2,7 @@ import collections
|
|||||||
import importlib
|
import importlib
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
import math
|
||||||
import threading
|
import threading
|
||||||
import enum
|
import enum
|
||||||
|
|
||||||
@@ -386,10 +387,11 @@ def apply_alpha_schedule_override(sd_model, p=None):
|
|||||||
class FakeInitialModel:
|
class FakeInitialModel:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.cond_stage_model = None
|
self.cond_stage_model = None
|
||||||
|
self.chunk_length = 75
|
||||||
|
|
||||||
def get_prompt_lengths_on_ui(self, prompt):
|
def get_prompt_lengths_on_ui(self, prompt):
|
||||||
r = len(prompt.strip('!,. ').replace(' ', ',').replace('.', ',').replace('!', ',').replace(',,', ',').replace(',,', ',').replace(',,', ',').replace(',,', ',').split(','))
|
r = len(prompt.strip('!,. ').replace(' ', ',').replace('.', ',').replace('!', ',').replace(',,', ',').replace(',,', ',').replace(',,', ',').replace(',,', ',').split(','))
|
||||||
return r, r
|
return r, math.ceil(max(r, 1) / self.chunk_length) * self.chunk_length
|
||||||
|
|
||||||
|
|
||||||
class SdModelData:
|
class SdModelData:
|
||||||
|
|||||||
Reference in New Issue
Block a user