mirror of
https://github.com/huggingface/diffusers.git
synced 2026-01-27 17:22:53 +03:00
update
This commit is contained in:
@@ -11,7 +11,6 @@
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
import inspect
|
||||
import os
|
||||
import re
|
||||
|
||||
|
||||
@@ -215,9 +215,8 @@ def infer_original_config_file(class_name, checkpoint):
|
||||
|
||||
|
||||
def fetch_original_config(pipeline_class_name, checkpoint, original_config_file=None):
|
||||
|
||||
def is_valid_url(url):
|
||||
pattern = r'^(http|https):\/\/([\w.-]+)(\.[\w.-]+)+([\/\w\.-]*)*\/?$'
|
||||
pattern = r"^(http|https):\/\/([\w.-]+)(\.[\w.-]+)+([\/\w\.-]*)*\/?$"
|
||||
return bool(re.match(pattern, url))
|
||||
|
||||
if os.path.isfile(original_config_file):
|
||||
|
||||
@@ -792,6 +792,7 @@ class StableDiffusionXLImg2ImgPipeline(
|
||||
self.unet.config.addition_time_embed_dim * len(add_time_ids) + text_encoder_projection_dim
|
||||
)
|
||||
expected_add_embed_dim = self.unet.add_embedding.linear_1.in_features
|
||||
|
||||
if (
|
||||
expected_add_embed_dim > passed_add_embed_dim
|
||||
and (expected_add_embed_dim - passed_add_embed_dim) == self.unet.config.addition_time_embed_dim
|
||||
|
||||
Reference in New Issue
Block a user