CivArchive
    SD3 Medium Slightly Decensored (Perturbed) - %2 (clips+t5 fp16)
    NSFW
    Preview 1

    credits to Thyri

    Perturbed Version of SD3 using script (replace input and output location)

    1. download sd3 from huggingface

    2. put script in a .py (replace input with sd3 model location and output location with where and what you want to name it). modify 0.01 to how much you want it to be perturbed (0.01 = 1%)

    3. execute the .py using "python your_py_script.py" (maybe you need to activate your virtual environment)


    import torch

    from safetensors.torch import load_file, save_file

    # Load the safetensors model

    model = load_file('__INPUT LOCATION__')

    # Extract the keys and tensors

    keys = model.keys()

    dic = {key: model[key] for key in keys}

    # Define parts to filter

    parts = ['diffusion_model']

    count = 0

    # Perturb the specified parts

    for k in keys:

    if all(part in k for part in parts):

    v = dic[k]

    print(f'{k}: {v.std()}')

    dic[k] += torch.normal(torch.zeros_like(v), v.std() * 0.01)

    count += 1

    print(f'Total perturbed tensors: {count}')

    # Save the perturbed model

    save_file(dic, '__OUTPUT LOCATION__')

    Description

    FAQ

    Checkpoint
    SD 3

    Details

    Downloads
    1,223
    Platform
    SeaArt
    Platform Status
    Available
    Created
    6/14/2024
    Updated
    6/15/2024
    Deleted
    -

    Files

    Available On (1 platform)

    Same model published on other platforms. May have additional downloads or version variants.