Code Monkey home page Code Monkey logo

sd_deepnude's Introduction

Stable diffusion deepnude

This approach uses stable diffusion inpainting technology that assumes to be better than the previous original idea implementation

For now it needs you to:

  1. run local Automatic1111 webui with the --nowebui flag
  2. install python deps
  3. download "cm.lib" from any source that provides deepnude weights (google it) and to place the file inside the "checkpoints" folder in the repo root
  4. create your telegram bot with @botfather and to add its token to your env vars like export API_TOKEN=<insert-token-here>
  5. run the bot like python3 bot.py

And with that -- it just finally works mf!

sd_deepnude's People

Contributors

dominux avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sd_deepnude's Issues

The bot does not use the settings from sd_api.ru

async with httpx.AsyncClient(timeout=None) as client:
    r = await client.post(
        "http://localhost:7861/sdapi/v1/img2img",
        json={
            "init_images": [image],
            "resize_mode": "1",
            "denoising_strength": 0.9,
            "mask": mask,
            "mask_blur": 8,
            "prompt": "fully nude fit girl, big perfect sexy breast, hyper detailed, intricate skin texture, (goosebumps:1.3)",
            "negative_prompt": "(deformed, distorted, disfigured:1.3), poorly drawn, bad anatomy, wrong anatomy, extra limb, missing limb, floating limbs, (mutated hands and fingers:1.4), disconnected limbs, mutation, mutated, ugly, disgusting, blurry, amputation",
            "steps": 26,
            "sampler_index": "DPM++ SDE Karras",
            "inpaint_full_res": False,
            
    how to adjust these settings all climbed, from here he does not see them?

Python Version

What python version ? i using 3.10.6 and 3.11.4 and some modules won't installed.

KeyError

after running the bot.py i receive this issue, i have added the api key from the bot to the file

    API_TOKEN = os.environ["API KEY SEQUENCE"]
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\os.py", line 679, in __getitem__
    raise KeyError(key) from None
KeyError: 'API KEY SEQUENCE'

n

/

which version of realistic vision do you use?

May I ask which version of realistic vision do you use? Can you give out the model link or download url?

Because when I use SG161222/Realistic_Vision_V1.4 I got this error

ValueError: Incorrect configuration settings! The config of `pipeline.unet`: FrozenDict([('sample_size', 64), ('in_channels', 4), ('out_channels', 4), ('center_input_sample', False), ('flip_sin_to_cos', True), ('freq_shift', 0), ('down_block_types', ['CrossAttnDownBlock2D', 'CrossAttnDownBlock2D', 'CrossAttnDownBlock2D', 'DownBlock2D']), ('mid_block_type', 'UNetMidBlock2DCrossAttn'), ('up_block_types', ['UpBlock2D', 'CrossAttnUpBlock2D', 'CrossAttnUpBlock2D', 'CrossAttnUpBlock2D']), ('only_cross_attention', False), ('block_out_channels', [320, 640, 1280, 1280]), ('layers_per_block', 2), ('downsample_padding', 1), ('mid_block_scale_factor', 1), ('act_fn', 'silu'), ('norm_num_groups', 32), ('norm_eps', 1e-05), ('cross_attention_dim', 768), ('attention_head_dim', 8), ('dual_cross_attention', False), ('use_linear_projection', False), ('class_embed_type', None), ('num_class_embeds', None), ('upcast_attention', False), ('resnet_time_scale_shift', 'default'), ('_class_name', 'UNet2DConditionModel'), ('_diffusers_version', '0.10.2'), ('_name_or_path', 'C:\\Users\\Admin/.cache\\huggingface\\diffusers\\models--SG161222--Realistic_Vision_V1.3\\snapshots\\a427e813a6d4d6fef7dc2b36d5092f3281a8b998\\unet')]) expects 4 but received `num_channels_latents`: 4 + `num_channels_mask`: 1 + `num_channels_masked_image`: 4 = 9. Please verify the config of `pipeline.unet` or your `mask_image` or `image` input.

V2.0 and V1.3 do the same result.

Thanks.

Key Error

Traceback (most recent call last):
File "bot.py", line 13, in
API_TOKEN = os.environ["12345678900:abcdefghijklmnopqrstuvwxyz"]
File "C:\Users\User\AppData\Local\Programs\Python\Python38\lib\os.py", line 675, in getitem
raise KeyError(key) from None
KeyError: '12345678900:abcdefghijklmnopqrstuvwxyz'

Line 13 of bot.py:

# Bot token can be obtained via https://t.me/BotFather
API_TOKEN = os.environ["12345678900:abcdefghijklmnopqrstuvwxyz"]

run question

where is my checkpoints..
I'm not found this folder in my stable-diffusion

Error

I followed all the instructions, the bot does not respond to commands at all, but everything is configured and running correctly for me
bfb526f4-91c7-4a4e-bbb4-a0c7c2f22d60
d1b09407-55ab-4623-907d-1be8ca055d30

KeyError

Traceback (most recent call last):
File "E:\test\SD_deepnude-main\bot.py", line 13, in
API_TOKEN = os.environ["API_TOKEN"]
File "", line 679, in getitem
KeyError: 'API_TOKEN'

Inpaints the faces

When using the bot it in paints the face as well not just the clothes. how do you prevent this?

Original image size

None of the options from “resize image” work for me, even with a value of 0 it is stretched. How can I ensure that the original size of the photo is retained after applying the mask?
I tried upscaler, but it doesn't apply to the mask and is useless...

Problem with SD API

I'm using SD WebUI version 1.6.0 and the bot doesn't work.
Initially, the SD API parameters of this bot specified port 7861, while SD version 1.6.0 uses port 7860. Well, okay, I changed one digit and still can’t interact with the API, I get an error: {"detail":"Not Found"}.

In this regard, I would like to ask the author of this project, what is the highest version of the WebUI SD you tested your project on last time?

Or it may be that in version 1.6.0 the api was changed and because of this the bot stopped working.

Incomplete Command

There are no command given after python3 bot.py.
Please tell how it work after bot starting.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.