Doug Smith
  • NEW!
    NEW!  Connect Ideas Across Notes
    Save time and share insights. With Paragraph Citation, you can quote others’ work with source info built in. If someone cites your note, you’ll see a card showing where it’s used—bringing notes closer together.
    Got it
      • Create new note
      • Create a note from template
        • Sharing URL Link copied
        • /edit
        • View mode
          • Edit mode
          • View mode
          • Book mode
          • Slide mode
          Edit mode View mode Book mode Slide mode
        • Customize slides
        • Note Permission
        • Read
          • Only me
          • Signed-in users
          • Everyone
          Only me Signed-in users Everyone
        • Write
          • Only me
          • Signed-in users
          • Everyone
          Only me Signed-in users Everyone
        • Engagement control Commenting, Suggest edit, Emoji Reply
      • Invite by email
        Invitee

        This note has no invitees

      • Publish Note

        Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

        Your note will be visible on your profile and discoverable by anyone.
        Your note is now live.
        This note is visible on your profile and discoverable online.
        Everyone on the web can find and read all notes of this public team.

        Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

        Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

        Explore these features while you wait
        Complete general settings
        Bookmark and like published notes
        Write a few more notes
        Complete general settings
        Write a few more notes
        See published notes
        Unpublish note
        Please check the box to agree to the Community Guidelines.
        View profile
      • Commenting
        Permission
        Disabled Forbidden Owners Signed-in users Everyone
      • Enable
      • Permission
        • Forbidden
        • Owners
        • Signed-in users
        • Everyone
      • Suggest edit
        Permission
        Disabled Forbidden Owners Signed-in users Everyone
      • Enable
      • Permission
        • Forbidden
        • Owners
        • Signed-in users
      • Emoji Reply
      • Enable
      • Versions and GitHub Sync
      • Note settings
      • Note Insights New
      • Engagement control
      • Make a copy
      • Transfer ownership
      • Delete this note
      • Save as template
      • Insert from template
      • Import from
        • Dropbox
        • Google Drive
        • Gist
        • Clipboard
      • Export to
        • Dropbox
        • Google Drive
        • Gist
      • Download
        • Markdown
        • HTML
        • Raw HTML
    Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
    Create Create new note Create a note from template
    Menu
    Options
    Engagement control Make a copy Transfer ownership Delete this note
    Import from
    Dropbox Google Drive Gist Clipboard
    Export to
    Dropbox Google Drive Gist
    Download
    Markdown HTML Raw HTML
    Back
    Sharing URL Link copied
    /edit
    View mode
    • Edit mode
    • View mode
    • Book mode
    • Slide mode
    Edit mode View mode Book mode Slide mode
    Customize slides
    Note Permission
    Read
    Only me
    • Only me
    • Signed-in users
    • Everyone
    Only me Signed-in users Everyone
    Write
    Only me
    • Only me
    • Signed-in users
    • Everyone
    Only me Signed-in users Everyone
    Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    1
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Restoration SD Workflow This is a restoration process I used with stable diffusion. My goal was more of an "artistic restoration" than a 1:1 so I was ok with some things slightly changing. This covers the idea of the process I used, but doesn't go into detail with tool installation or direct usage in automatic1111. ## Where I started and where I wound up I had a photograph of my great great great grandparents -- I believe the photo is from the 1850-1860's or so. I also believe it's a "crayon enlargement", aka [photo-crayotype](https://en.wikipedia.org/wiki/Photo-crayotype) ![](https://i.imgur.com/bA5L3pz.jpg =375x500) I just worked with a camera phone photo because I didn't want to damage it, and I could get a clearer photo. And I wound up with a photo like this: ![](https://i.imgur.com/Q3boVKy.jpg) ## Tools I used * Automatic1111 * StableDiffusion * ControlNet * [Elegance Model](https://civitai.com/models/5564/elegance) * An image editor (doesn't matter which) * A display tablet (optional) ## My process ### Initial image processing First thing I did was crop it, set an aspect ratio I was going to work with (I decided to go with 1:1), and then I used a "auto" filter in my image editor to kind of set the contrast. I wound up with a photo like this. ![](https://i.imgur.com/j04EpCZ.jpg =400x400) You can see where the "crayon" process was used for the original a little better now, especially the hair of both subjects, and both eyes. I actually tried to generate from here. But, I wasn't getting the results that I wanted. So I painted out the speckled background. Sketched in some extention of the subjects, and also added a kind of "cloth backdrop" to it (which I generated in midjourney and then cut to fit) So I wound up with this: ![](https://i.imgur.com/y6G2oM1.jpg =412x412) ### Prompting Next, I brought it into img2img, both as the source image and also used it to set a control net and used the canny preprocessor and a canny model. I didn't do much to change defaults. I started to put together a prompt, and after a number of iterations, this was the winner: ``` Professional Full body photo of a middle aged handsome dutch man and a beautiful dutch woman, arms around one another, white sheet backdrop, 1880s, 1880s new york city fashion, bowtie, dress with belt, high class clothing, chic, elegant, detailed eyes, (detailed skin, supple skin pores), (portrait), natural lighting, (backlighting:0.6), shallow depth of field, 8mm film grain, photographed on a Leica 10772 M-P, 50mm lens, F2.8, (highly detailed, intricate details, fine), 8k, HDR, deep focus, depth of field, albumin print photography by Dorothea Lange, Alasdair McLellan, Anders Petersen Negative prompt: (oversaturated:1.3), bad hands, lowers, 3d render, cartoon, long body, ((blurry)), duplicate, ((duplicate body parts)), (disfigured), (poorly drawn), (extra limbs), fused fingers, extra fingers, (twisted), malformed hands, ((((mutated hands and fingers)))), contorted, conjoined, ((missing limbs)), logo, signature, text, words, low res, boring, mutated, artifacts, bad art, gross, ugly, poor quality, low quality, ((beard)) Steps: 100, Sampler: DPM++ 2M Karras, CFG scale: 7, Seed: -1, Face restoration: CodeFormer, Size: 512x512, Model hash: e3055c494a, Model: elegance_37, Denoising strength: 0.85, Mask blur: 4, ControlNet Enabled: True, ControlNet Module: canny, ControlNet Model: controlnetPreTrained_cannyV10 [e3fe7712], ControlNet Weight: 1, ControlNet Guidance Start: 0, ControlNet Guidance End: 1 ``` I borrowed some of the prompt terms from examples from the Elegant model. Here's a preliminary run -- this is before I added the backdrop and the extra drawing. ![](https://i.imgur.com/pjQNLpx.jpg =400x400) Then, I fiddled with the denoising amount on the source image mostly, and I didn't change much for controlnet, maybe I lowered a threshhold a little. Once I started getting half decent results, I started to do a large number of runs. I generated in the neighborhood of 100 and went from there. Then, eventually I picked a "winner" to base edits on. ### Inpainting I chose this one because the dress was pretty close, her face was pretty nice, and my great great great grandfather was mostly there. ![](https://i.imgur.com/lD9TD4S.png =512x512) I didn't love his face though, so I found another run with a face that I liked, and I replaced it. In this next photo you can see how I replaced two things to work on in-painting. * The face with a new face, but not perfect * Then, I redrew the hand. ![](https://i.imgur.com/6nwRSi9.png) TIP: Make sure you use layers in your editor. This is how I was able to extract this work to share with you for later. It's helpful to keep iterating using the layers and going back and forth between image editor and inpainting in SD. I would then use img2img inpaint, and I'd first draw around his face to fix the kind of "seam" that I left. Then I would inpaint over the hand. For both of these, I used a fairly low denoising strength, maybe .3 or .4. I feel like the hand "was ok-ish" but not perfect at this point. But the power of inpainting is awesome, I get a free upgrade on my paint job... ![](https://i.imgur.com/J0nYxtx.png) I kind of think it's still a little dark. But overall, I'm happy with it. SD still has hand problems, and the starting data to work with was really tough for the hand too. It was probably the most challenging part. I also did this for a few other details, including the belt and the bow tie. TIP: Generate a bunch of runs for your inpaintings and pick the best ones! After I test a prompt a couple of times, I run a batch of a dozen or so and I see if I have a winner. ## Where I wound up The final image. ![](https://i.imgur.com/SXQLhMD.jpg) A before and after view ![](https://i.imgur.com/U8ymfoy.jpg)

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password
    or
    Sign in via Google Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully