lllyasviel / stable-diffusion-webui-forge

GNU Affero General Public License v3.0
8.44k stars 825 forks source link

[Bug]: clip skip seems to be not working #317

Closed Hugs288 closed 9 months ago

Hugs288 commented 9 months ago

Checklist

What happened?

images with clip skip 1 and 2 come out identical in both sd15 and sdxl here is an example 00003-996818721 ^clip skip 2 00002-996818721 ^clip skip 1

Steps to reproduce the problem

add clip skip slider to user interface and generate

What should have happened?

webui should produce different images

What browsers do you use to access the UI ?

Google Chrome

Sysinfo

sysinfo-2024-02-18-15-40.json

Console logs

Python 3.10.11 (tags/v3.10.11:7d4cc5a, Apr  5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)]90/90 [00:18<00:00,  3.92it/s]
Version: f0.0.14v1.8.0rc-latest-184-g43c9e3b5
Commit hash: 43c9e3b5ce1642073c7a9684e36b45489eeb4a49
Launching Web UI with arguments: --ckpt-dir G:\models\Stable-diffusion
Total VRAM 24564 MB, total RAM 31962 MB
Set vram state to: NORMAL_VRAM
Device: cuda:0 NVIDIA GeForce RTX 4090 : native
VAE dtype: torch.bfloat16
2024-02-18 19:06:15.059519: I tensorflow/core/util/port.cc:113] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
WARNING:tensorflow:From J:\aistuff\stable-diffusion-webui\venv\lib\site-packages\keras\src\losses.py:2976: The name tf.losses.sparse_softmax_cross_entropy is deprecated. Please use tf.compat.v1.losses.sparse_softmax_cross_entropy instead.

Using pytorch cross attention
*** "Disable all extensions" option was set, will only load built-in extensions ***
*** Extension "sd-webui-lama-cleaner-masked-content" requires "sd-webui-controlnet" which is not installed.
*** Error loading script: detect_extension.py
    Traceback (most recent call last):
      File "J:\aistuff\stable-diffusion-webui\modules\scripts.py", line 544, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "J:\aistuff\stable-diffusion-webui\modules\script_loading.py", line 10, in load_module
        module_spec.loader.exec_module(module)
      File "<frozen importlib._bootstrap_external>", line 883, in exec_module
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "J:\aistuff\stable-diffusion-webui\scripts\detect_extension.py", line 18, in <module>
        with open(requirements_path, "r") as file:
    FileNotFoundError: [Errno 2] No such file or directory: 'J:\\aistuff\\stable-diffusion-webui\\extensions-builtin\\sd_forge_svd\\requirements.txt'

---
ControlNet preprocessor location: J:\aistuff\stable-diffusion-webui\models\ControlNetPreprocessor
Loading weights [a0811d92ce] from G:\models\Stable-diffusion\aingdiffusion_v160.safetensors
2024-02-18 19:06:21,868 - ControlNet - INFO - ControlNet UI callback registered.
Running on local URL:  http://127.0.0.1:7860
model_type EPS
UNet ADM Dimension 0

To create a public link, set `share=True` in `launch()`.
Startup time: 13.4s (prepare environment: 1.7s, import torch: 3.1s, import gradio: 0.9s, setup paths: 4.2s, other imports: 0.4s, list SD models: 0.9s, load scripts: 1.3s, create ui: 0.4s, gradio launch: 0.1s, add APIs: 0.2s).
Using pytorch attention in VAE
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
Using pytorch attention in VAE
extra {'cond_stage_model.clip_l.text_projection', 'cond_stage_model.clip_l.logit_scale'}
loaded straight to GPU
To load target model BaseModel
Begin to load 1 model
To load target model SD1ClipModel
Begin to load 1 model
Model loaded in 2.4s (load weights from disk: 0.2s, forge load real models: 2.0s, calculate empty prompt: 0.1s).
Traceback (most recent call last):
  File "J:\aistuff\stable-diffusion-webui\modules_forge\main_thread.py", line 37, in loop
    task.work()
  File "J:\aistuff\stable-diffusion-webui\modules_forge\main_thread.py", line 26, in work
    self.result = self.func(*self.args, **self.kwargs)
  File "J:\aistuff\stable-diffusion-webui\modules\txt2img.py", line 111, in txt2img_function
    processed = processing.process_images(p)
  File "J:\aistuff\stable-diffusion-webui\modules\processing.py", line 750, in process_images
    res = process_images_inner(p)
  File "J:\aistuff\stable-diffusion-webui\modules\processing.py", line 820, in process_images_inner
    p.init(p.all_prompts, p.all_seeds, p.all_subseeds)
  File "J:\aistuff\stable-diffusion-webui\modules\processing.py", line 1212, in init
    raise Exception(f"could not find upscaler named {self.hr_upscaler}")
Exception: could not find upscaler named 4x_foolhardy_Remacri
could not find upscaler named 4x_foolhardy_Remacri
*** Error completing request
*** Arguments: ('task(6muufn89lvgl8r0)', <gradio.routes.Request object at 0x000001CCB0F0FB80>, 'pixel art, masterpiece, best quality, rating: general, newest, Fallen shadow, yandere, chocolate, heart-shaped pupils, single wrist cuff, symbol-shaped pupils, solo, hands on own face, dress, food-themed clothes, criss-cross halter, waist bow, hood up, heart, shaded face, arm ribbon, grey cape, cloak, capelet, hands on own cheeks, smile, grey capelet, black dress, frills, halterneck, leg ribbon, cape, short dress, frilled dress, looking at viewer, petite, simple background, pink background, outline, white background, brown background', 'bad quality, bad anatomy, worst quality, low quality, low resolution, extra fingers, blur, blurry, ugly, wrong proportions, watermark, image artifacts, lowres, ugly,  jpeg artifacts, deformed, noisy image, deformation, skin moles', [], 50, 'Euler a', 1, 1, 7, 1024, 768, True, 0.1, 1.5, '4x_foolhardy_Remacri', 40, 0, 0, 'Use same checkpoint', 'Use same sampler', '', '', ['Downcast alphas_cumprod: True', 'RNG: GPU'], 0, False, '', 0.8, 996818721, False, -1, 0, 0, 0, ControlNetUnit(input_mode=<InputMode.SIMPLE: 'simple'>, use_preview_as_input=False, batch_image_dir='', batch_mask_dir='', batch_input_gallery=[], batch_mask_gallery=[], generated_image=None, mask_image=None, hr_option='Both', enabled=False, module='None', model='None', weight=1, image=None, resize_mode='Crop and Resize', processor_res=-1, threshold_a=-1, threshold_b=-1, guidance_start=0, guidance_end=1, pixel_perfect=False, control_mode='Balanced', save_detected_map=True), ControlNetUnit(input_mode=<InputMode.SIMPLE: 'simple'>, use_preview_as_input=False, batch_image_dir='', batch_mask_dir='', batch_input_gallery=[], batch_mask_gallery=[], generated_image=None, mask_image=None, hr_option='Both', enabled=False, module='None', model='None', weight=1, image=None, resize_mode='Crop and Resize', processor_res=-1, threshold_a=-1, threshold_b=-1, guidance_start=0, guidance_end=1, pixel_perfect=False, control_mode='Balanced', save_detected_map=True), ControlNetUnit(input_mode=<InputMode.SIMPLE: 'simple'>, use_preview_as_input=False, batch_image_dir='', batch_mask_dir='', batch_input_gallery=[], batch_mask_gallery=[], generated_image=None, mask_image=None, hr_option='Both', enabled=False, module='None', model='None', weight=1, image=None, resize_mode='Crop and Resize', processor_res=-1, threshold_a=-1, threshold_b=-1, guidance_start=0, guidance_end=1, pixel_perfect=False, control_mode='Balanced', save_detected_map=True), False, 7, 1, 'Constant', 0, 'Constant', 0, 1, 'enable', 'MEAN', 'AD', 1, False, 1.01, 1.02, 0.99, 0.95, False, 0.5, 2, False, 256, 2, 0, False, False, 3, 2, 0, 0.35, True, 'bicubic', 'bicubic', False, 0, 'anisotropic', 0, 'reinhard', 100, 0, 'subtract', 0, 0, 'gaussian', 'add', 0, 100, 127, 0, 'hard_clamp', 5, 0, 'None', 'None', False, 'MultiDiffusion', 768, 768, 64, 4, False, False, False, 'positive', 'comma', 0, False, False, 'start', '', 1, '', [], 0, '', [], 0, '', [], True, False, False, False, False, False, False, 0, False, 1) {}
    Traceback (most recent call last):
      File "J:\aistuff\stable-diffusion-webui\modules\call_queue.py", line 57, in f
        res = list(func(*args, **kwargs))
    TypeError: 'NoneType' object is not iterable

---
100%|██████████████████████████████████████████████████████████████████████████████████| 50/50 [00:04<00:00, 11.81it/s]
To load target model AutoencoderKL██████████████████████▉                              | 49/90 [00:04<00:03, 13.04it/s]
Begin to load 1 model
Upscale script freed memory successfully.
tiled upscale: 100%|███████████████████████████████████████████████████████████████████| 30/30 [00:01<00:00, 17.39it/s]
100%|██████████████████████████████████████████████████████████████████████████████████| 40/40 [00:10<00:00,  3.96it/s]
Total progress: 100%|██████████████████████████████████████████████████████████████████| 90/90 [00:17<00:00,  5.08it/s]
100%|██████████████████████████████████████████████████████████████████████████████████| 50/50 [00:04<00:00, 12.40it/s]
Upscale script freed memory successfully.███████████████▉                              | 49/90 [00:03<00:03, 13.13it/s]
tiled upscale: 100%|███████████████████████████████████████████████████████████████████| 30/30 [00:01<00:00, 18.08it/s]
100%|██████████████████████████████████████████████████████████████████████████████████| 40/40 [00:10<00:00,  3.90it/s]
Total progress: 100%|██████████████████████████████████████████████████████████████████| 90/90 [00:17<00:00,  5.20it/s]
Total progress: 100%|██████████████████████████████████████████████████████████████████| 90/90 [00:17<00:00,  3.83it/s]

Additional information

-

lllyasviel commented 9 months ago

i just tested with fresh install.

clip skip works without problem and results are same with webui 1.8.0rc

Hugs288 commented 9 months ago

thats weird, ill update if i can find out whats causing it

DoctorDerp commented 8 months ago

thats weird, ill update if i can find out whats causing it

I also cant get clip skip to work as well. It does nothing on my end.

Hugs288 commented 8 months ago

thats weird, ill update if i can find out whats causing it

I also cant get clip skip to work as well. It does nothing on my end.

i think it has to do with applying forges files to an a1111 repo

i downloaded a clean install of forge and moved my a1111 extensions into it instead of using my a1111 repo with forges files dumped into it and it works properly now

T3chRomanc3r commented 8 months ago

thats weird, ill update if i can find out whats causing it

I also cant get clip skip to work as well. It does nothing on my end.

Same issue. Have installed portable version, and clip skip doesn't have an effect at all

kalle07 commented 5 months ago

same issue

@Hugs288 , where i find these forges and how i aplpy it ?